Opened 6 years ago
Closed 6 years ago
#17247 closed defect (invalid)
Dead code in opendata plugin?
Reported by: | GerdP | Owned by: | Don-vip |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Plugin opendata | Version: | |
Keywords: | utilsplugin2 | Cc: |
Description (last modified by )
In [o34812] I removed
public static Collection<OsmPrimitive> selectAllInside(Collection<OsmPrimitive> selected, DataSet dataset) { return selectAllInside(selected, dataset, true); }
because I found no reference to it. Now I've noticed that org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.ToulouseDataSetHandler
uses it.
It seems this class is not compiled with ant but in Eclipse it is not excluded.
Should I partially revert the change in [o34812] or should I change the Eclipse project to ignore this source?
Attachments (1)
Change History (10)
comment:1 by , 6 years ago
Description: | modified (diff) |
---|
follow-up: 5 comment:2 by , 6 years ago
by , 6 years ago
Attachment: | opendata.png added |
---|
follow-up: 6 comment:3 by , 6 years ago
comment:4 by , 6 years ago
Cc: | removed |
---|---|
Component: | Plugin opendata → Plugin utilsplugin2 |
Owner: | changed from | to
comment:5 by , 6 years ago
Replying to Don-vip:
This is no dead code at all. Modules are compiled separately than the plugin because rarely updated. Can you please revert your change?
done with [o34862-34864]
comment:6 by , 6 years ago
Replying to Don-vip:
My Eclipse project is as follows. See where are the build files:
Did you update opendata and utilsplugin2 before creating this screenshot?
I still don't understand why I did not see an error when using ant clean dist in opendata. Needs some more diggin..
comment:7 by , 6 years ago
OK, I think now I understand. The code is only compiled when you run ant in directory modules. On my machine this also doesn't work:
C:\josm\plugins\opendata\modules>ant clean dist Buildfile: C:\josm\plugins\opendata\modules\build.xml clean: clean: [delete] Deleting directory C:\josm\plugins\opendata\modules\fr.datagouvfr\build [delete] Deleting: C:\josm\plugins\opendata\dist\fr.datagouvfr.jar clean: [delete] Deleting directory C:\josm\plugins\opendata\modules\fr.paris\build [delete] Deleting: C:\josm\plugins\opendata\dist\fr.paris.jar clean: [delete] Deleting directory C:\josm\plugins\opendata\modules\fr.toulouse\build dist: init: [mkdir] Created dir: C:\josm\plugins\opendata\modules\fr.datagouvfr\build [mkdir] Created dir: C:\josm\plugins\opendata\modules\fr.datagouvfr\build\META-INF compile: [echo] compiling sources for ../../dist/fr.datagouvfr.jar ... [javac] Compiling 18 source files to C:\josm\plugins\opendata\modules\fr.datagouvfr\build revision: [delete] Deleting: C:\josm\plugins\opendata\modules\fr.datagouvfr\REVISION copy-resources: [copy] Copying 1 file to C:\josm\plugins\opendata\modules\fr.datagouvfr\build copy-images: [copy] Copying 1 file to C:\josm\plugins\opendata\modules\fr.datagouvfr\build\images dist: [echo] creating fr.datagouvfr.jar ... [copy] Copying 2 files to C:\josm\plugins\opendata\modules\fr.datagouvfr\build [jar] Building jar: C:\josm\plugins\opendata\dist\fr.datagouvfr.jar init: [mkdir] Created dir: C:\josm\plugins\opendata\modules\fr.paris\build [mkdir] Created dir: C:\josm\plugins\opendata\modules\fr.paris\build\META-INF compile: [echo] compiling sources for ../../dist/fr.paris.jar ... [javac] Compiling 12 source files to C:\josm\plugins\opendata\modules\fr.paris\build revision: [delete] Deleting: C:\josm\plugins\opendata\modules\fr.paris\REVISION copy-resources: copy-images: [copy] Copying 1 file to C:\josm\plugins\opendata\modules\fr.paris\build\images dist: [echo] creating fr.paris.jar ... [copy] Copying 2 files to C:\josm\plugins\opendata\modules\fr.paris\build [jar] Building jar: C:\josm\plugins\opendata\dist\fr.paris.jar init: [mkdir] Created dir: C:\josm\plugins\opendata\modules\fr.toulouse\build [mkdir] Created dir: C:\josm\plugins\opendata\modules\fr.toulouse\build\META-INF compile: [echo] compiling sources for ../../dist/fr.toulouse.jar ... [javac] Compiling 50 source files to C:\josm\plugins\opendata\modules\fr.toulouse\build [javac] C:\josm\plugins\opendata\modules\fr.toulouse\src\org\openstreetmap\josm\plugins\opendata\modules\fr\toulouse\datasets\services\MarchesPleinVentHandler.java:49: error: unclosed character literal [javac] hours += day[1]+" "+value.replace(" ", "").replace('ÔÇô','-').replace('h', ':').replace(":-", ":00-"); [javac] ^ [javac] C:\josm\plugins\opendata\modules\fr.toulouse\src\org\openstreetmap\josm\plugins\opendata\modules\fr\toulouse\datasets\services\MarchesPleinVentHandler.java:49: error: ';' expected [javac] hours += day[1]+" "+value.replace(" ", "").replace('ÔÇô','-').replace('h', ':').replace(":-", ":00-"); [javac] ^ [javac] C:\josm\plugins\opendata\modules\fr.toulouse\src\org\openstreetmap\josm\plugins\opendata\modules\fr\toulouse\datasets\services\MarchesPleinVentHandler.java:49: error: illegal character: '\u201c' [javac] hours += day[1]+" "+value.replace(" ", "").replace('ÔÇô','-').replace('h', ':').replace(":-", ":00-"); [javac] ^ [javac] C:\josm\plugins\opendata\modules\fr.toulouse\src\org\openstreetmap\josm\plugins\opendata\modules\fr\toulouse\datasets\services\MarchesPleinVentHandler.java:49: error: ';' expected [javac] hours += day[1]+" "+value.replace(" ", "").replace('ÔÇô','-').replace('h', ':').replace(":-", ":00-"); [javac] ^ [javac] C:\josm\plugins\opendata\modules\fr.toulouse\src\org\openstreetmap\josm\plugins\opendata\modules\fr\toulouse\datasets\services\MarchesPleinVentHandler.java:49: error: unclosed character literal [javac] hours += day[1]+" "+value.replace(" ", "").replace('ÔÇô','-').replace('h', ':').replace(":-", ":00-"); [javac] ^ [javac] C:\josm\plugins\opendata\modules\fr.toulouse\src\org\openstreetmap\josm\plugins\opendata\modules\fr\toulouse\datasets\services\MarchesPleinVentHandler.java:49: error: not a statement [javac] hours += day[1]+" "+value.replace(" ", "").replace('ÔÇô','-').replace('h', ':').replace(":-", ":00-"); [javac] ^ [javac] C:\josm\plugins\opendata\modules\fr.toulouse\src\org\openstreetmap\josm\plugins\opendata\modules\fr\toulouse\datasets\services\MarchesPleinVentHandler.java:49: error: illegal start of expression [javac] hours += day[1]+" "+value.replace(" ", "").replace('ÔÇô','-').replace('h', ':').replace(":-", ":00-"); [javac] ^ [javac] C:\josm\plugins\opendata\modules\fr.toulouse\src\org\openstreetmap\josm\plugins\opendata\modules\fr\toulouse\datasets\services\MarchesPleinVentHandler.java:49: error: ';' expected [javac] hours += day[1]+" "+value.replace(" ", "").replace('ÔÇô','-').replace('h', ':').replace(":-", ":00-"); [javac] ^ [javac] 8 errors BUILD FAILED C:\josm\plugins\opendata\modules\build.xml:13: The following error occurred while executing this line: C:\josm\plugins\opendata\modules\build.xml:8: The following error occurred while executing this line: C:\josm\plugins\opendata\modules\fr.toulouse\build.xml:41: Compile failed; see the compiler error output for details. Total time: 1 second C:\josm\plugins\opendata\modules>ant -version Apache Ant(TM) version 1.9.7 compiled on April 9 2016 C:\josm\plugins\opendata\modules>javac -version javac 1.8.0_201 C:\josm\plugins\opendata\modules>
This looks like an utf-8 problem. Maybe in one of my tools?
comment:8 by , 6 years ago
Component: | Plugin utilsplugin2 → Plugin opendata |
---|---|
Owner: | changed from | to
Fixed with [o34865]
Open question: Why are the modules not compiled with these commands?
cd plugins\opendata ant clean dist
comment:9 by , 6 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Because modules are not meant to be updated as often as plugin. Only when needed.
This is no dead code at all. Modules are compiled separately than the plugin because rarely updated. Can you please revert your change?