Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#17053 closed enhancement (fixed)

MapCss stop loading rule on unknown instruction

Reported by: frodrigo Owned by: Don-vip
Priority: normal Milestone: 18.12
Component: Core validator Version:
Keywords: osmose france mapcss Cc:

Description (last modified by Don-vip)

On the goal of sharing validation between JOSM and Osmose-QA I have implemented MapCSS support into Osmose-QA. Osmose-QA rules may now be written in MapCSS, or converted to MapCSS.
Now I want to move to the next step, share Osmose-QA MapCSS files with JOSM.
On Osmose-QA I have add two "proprietaries" instructions: osmoseItemClassLevel and osmoseTags.
But JOSM fails load rules when it found an unknown instruction.

2018-11-30 22:06:45.846 INFO: Adding /../home/fred/tmp/osmose-backend/plugins/Bicycle.validator.mapcss to tag checker
2018-11-30 22:06:45.854 SEVERE: Cannot add MapCss rule: Cannot add instruction osmoseItemClassLevel: 4030/40301/2!

Osmose-QA MapCSS rules look like:

way[highway=cycleway][cycleway=track] {
    throwWarning: tr("{0} with {1}", "{0.tag}", "{1.tag}");
    osmoseItemClassLevel: "3032/30328/2";
    osmoseTags: list("tag", "highway", "cycleway");
    fixRemove: "cycleway";
}

Attachments (0)

Change History (11)

comment:1 by stoecker, 6 years ago

Maybe we should follow CSS and have arguments starting with "-" (i.e. -webkit-border-image) as private extensions and ignore them?

That would mean you need to rename them to -osmoseTags and we would need to ignore them.

I wouldn't generally open the checks - this will produce too many bad files.

Last edited 6 years ago by stoecker (previous) (diff)

comment:2 by frodrigo, 6 years ago

Yes it's a good idea. I'm open to rename in all existing Osmose MapCSS files.

comment:3 by Don-vip, 6 years ago

Description: modified (diff)
Keywords: osmose france added
Milestone: 18.12
Summary: MapCss stop loading rule on unkonw instructionMapCss stop loading rule on unknown instruction

Sounds good.

comment:4 by Don-vip, 6 years ago

Description: modified (diff)

comment:5 by Don-vip, 6 years ago

Owner: changed from team to Don-vip
Status: newassigned

comment:6 by Don-vip, 6 years ago

Resolution: fixed
Status: assignedclosed

In 14481/josm:

fix #17053 - ignore MapCSS declarations starting with "-" to allow external extensions (used by osmose)

comment:7 by Klumbumbus, 6 years ago

After next stable release wiki:/Rules/SuspiciousSwimming_Pool should be reverted to version 7.

Last edited 6 years ago by Klumbumbus (previous) (diff)

in reply to:  7 ; comment:8 by Don-vip, 6 years ago

Replying to Klumbumbus:

After next stable release wiki:/Rules/SuspiciousSwimming_Pool should be reverted to version 7.

Yes but the new declarations must be prefixed by "-".

Last edited 6 years ago by Klumbumbus (previous) (diff)

comment:9 by Don-vip, 6 years ago

Keywords: mapcss added

comment:10 by Don-vip, 6 years ago

In 14489/josm:

see #17053 - fix parsing regression involving the - operator

in reply to:  8 comment:11 by Klumbumbus, 6 years ago

Replying to Don-vip:

Replying to Klumbumbus:

After next stable release wiki:/Rules/SuspiciousSwimming_Pool should be reverted to version 7.

Yes but the new declarations must be prefixed by "-".

Changes were done.

Last edited 6 years ago by Klumbumbus (previous) (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Don-vip.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.