Modify

Opened 13 months ago

Closed 9 months ago

Last modified 4 months ago

#15310 closed enhancement (fixed)

The Great Deprecation Cleanup

Reported by: Don-vip Owned by: team
Priority: normal Milestone: 17.12
Component: Core Version:
Keywords: deprecation Cc: jBeata, floscher, michael2402

Description (last modified by Don-vip)

With #15229 + #15182 + #13036 we have deprecated a lot of public APIs.

December 2017 will be time to get rid of them to start 2018 on a clean state :)

Attachments (1)

mapillary.JPG (17.6 KB) - added by Don-vip 10 months ago.

Download all attachments as: .zip

Change History (58)

comment:1 Changed 13 months ago by Don-vip

Description: modified (diff)

comment:2 Changed 12 months ago by Don-vip

Description: modified (diff)

comment:3 in reply to:  description Changed 12 months ago by bastiK

Replying to Don-vip:

December 2017 will be time to get rid of them to start 2018 on a clean state :)

Right now, there are 1687 deprecation warnings in the public plugin repository.

comment:4 Changed 12 months ago by Don-vip

Yes I guessed it would be a huge task. I plan to add this indicator to JOSM-integration job, based on a binary analysis of jar files and not the source code, so we can spot Github plugins too.

By the way I see an increase of plugin incompatibilities (i.e: bug reports coming!). Are you sure you deprecated the preference events without changing a signature?

comment:5 in reply to:  4 Changed 12 months ago by bastiK

Replying to Don-vip:

By the way I see an increase of plugin incompatibilities (i.e: bug reports coming!).

#15342 is the only one I'm aware of (caused by move of Setting class).

Are you sure you deprecated the preference events without changing a signature?

Yes, should work.

comment:6 Changed 12 months ago by Don-vip

Cc: jBeata added

OK. Only these plugins are flagged as currently not binary compatible:

  1. josm-config: unmaintained, I'm going to remove it from list (Mapbox does not reply to my messages)
  2. auto_tools: https://github.com/mapbox/auto-tools/issues/21
  3. ImproveOsm: jBeata
  4. OpenStreetCam: jBeata
  5. scoutsigns: jBeata
  6. freemapkapor: https://github.com/FreemapSlovakia/freemapKaPor/issues/9
  7. matsim: https://github.com/matsim-org/josm-matsim-plugin/issues/65
Last edited 12 months ago by Don-vip (previous) (diff)

comment:7 Changed 12 months ago by floscher

The latest version of josm-matsim-plugin is now successfully compiled against JOSM 12885 (plugin.main.version=12881) without using deprecated methods from JOSM core.

comment:8 in reply to:  6 ; Changed 12 months ago by bastiK

Replying to Don-vip:

OK. Only these plugins are flagged as currently not binary compatible:

  1. josm-config: unmaintained, I'm going to remove it from list (Mapbox does not reply to my messages)
  2. auto_tools: https://github.com/mapbox/auto-tools/issues/21
  3. ImproveOsm: jBeata
  4. OpenStreetCam: jBeata
  5. scoutsigns: jBeata
  6. freemapkapor: https://github.com/FreemapSlovakia/freemapKaPor/issues/9
  7. matsim: https://github.com/matsim-org/josm-matsim-plugin/issues/65

How can you tell?

comment:9 Changed 12 months ago by jBeata

We have updated the Telenav plugins and replaced the deprecated methods.

comment:10 Changed 12 months ago by bastiK

jBeata, thanks for updating the Telenav plugins! We try to avoid breaking changes, but sometimes it is not possible. Judging from the plugins in the main repository, I did not expect the refactored API to be used that much.

If we can fix plugins that are broken by JOSM core changes until the subsequent monthly release, this would be ideal. Then the users of the tested versions will not experience any problems, as long as they update their plugins regularly.

Please let us know if you have any suggestions to make this easier.

comment:11 in reply to:  8 Changed 12 months ago by Don-vip

Replying to bastiK:

How can you tell?

the check-plugins ant target checks it. This appears then in Jenkins as "Plugin incompatibilities".

comment:12 in reply to:  10 Changed 12 months ago by jBeata

Replying to bastiK:

jBeata, thanks for updating the Telenav plugins! We try to avoid breaking changes, but sometimes it is not possible. Judging from the plugins in the main repository, I did not expect the refactored API to be used that much.

If we can fix plugins that are broken by JOSM core changes until the subsequent monthly release, this would be ideal. Then the users of the tested versions will not experience any problems, as long as they update their plugins regularly.

Please let us know if you have any suggestions to make this easier.

No problem, I have added support for also josm-latest for Telenav plugins, but I have encountered some issues with JOSM versioning system. So as a quick fix we have updated the josm-tested library and merged the changes from the josm-latest branch. I'm sending an email with more details to Vincent, since I'm not sure what we did wrong. Sorry for the inconvenience.

Last edited 12 months ago by jBeata (previous) (diff)

comment:13 Changed 12 months ago by bastiK

Let's make a cut:

All methods, classes and fields that are marked deprecated in version 12921 will be removed at the end of December 2017.

For anything deprecated from now on (after r12921), the time of removal is decided later.

comment:14 Changed 10 months ago by Don-vip

I think I will have updated all OSM-SVN plugins by the end of the month.

comment:15 Changed 10 months ago by Don-vip

In 13173/josm:

see #15310 - remove most of deprecated APIs

comment:16 Changed 10 months ago by Don-vip

step 1 done: removed almost all deprecated APIs except heading()/getDx()/getDy() (see #14120, need help), everything related to colors (there is migration code and I don't know if we must update it or remove it; Paul I let this to you) and everything related to directories (change quite recent).

Let's see which plugins break now.

comment:17 Changed 10 months ago by Don-vip

Paul, can you please also take a look to Plugin.copy(String, String)? It calls a deprecated API, so I didn't remove it. I don't know if you prefer to update the method body or deprecate it as well. It's called only by a single plugin.

Last edited 10 months ago by Don-vip (previous) (diff)

comment:18 Changed 10 months ago by Don-vip

In 13174/josm:

see #15310 - fix unit tests, warnings

comment:19 Changed 10 months ago by Don-vip

OK we have the following plugin breakages:

ImproveWay	45	
CADTools	33	
kendzi3d	30	
markseen	18	
SeaChart	15	
ContourOverlappingMerge	13	
tofix	11	
osm-obj-info	8	
globalsat	8	
austriaaddresshelper	7	
geotools	6	
TombPlugin	4	
EasyPresets	3	
kartverketimport	2	
changesetID	2	
ColorPlugin	1	

comment:20 Changed 10 months ago by Don-vip

Ticket #15607 has been marked as a duplicate of this ticket.

comment:22 Changed 10 months ago by Don-vip

Ticket #15608 has been marked as a duplicate of this ticket.

comment:23 Changed 10 months ago by Don-vip

In 13175/josm:

see #15310 - minor fixes, performance test still failing

comment:24 Changed 10 months ago by Don-vip

In 13180/josm:

see #15310 - remove Main.worker

comment:25 Changed 10 months ago by SanderH

comment:26 Changed 10 months ago by Don-vip

In 13182/josm:

see #15310 - cacheDir is unused, deprecate new methods

comment:27 Changed 10 months ago by stoecker

In 13187/josm:

see #15310 - drop old style side button support

comment:28 Changed 10 months ago by Don-vip

In 13192/josm:

see #15310 - remove support for draw.rawgps.layer.wpt property, kind-of deprecated 6 years ago in r4282

comment:29 in reply to:  17 Changed 10 months ago by bastiK

Replying to Don-vip:

Paul, can you please also take a look to Plugin.copy(String, String)? It calls a deprecated API, so I didn't remove it. I don't know if you prefer to update the method body or deprecate it as well. It's called only by a single plugin.

We can deprecate the method, but it doesn't matter. (Please go ahead, I have no time for JOSM at the moment.)

comment:30 Changed 10 months ago by Don-vip

In 13193/josm:

see #15310 - deprecate Plugin.copy(String, String)

comment:31 in reply to:  27 Changed 10 months ago by Klumbumbus

Replying to stoecker:

In 13187/josm:

see #15310 - drop old style side button support

This affects the mapillary plugin

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2017-12-03 18:09:08 +0100 (Sun, 03 Dec 2017)
Build-Date:2017-12-03 17:11:49
Revision:13190
Relative:URL: ^/trunk

Identification: JOSM/1.5 (13190 de) Windows 10 64-Bit
OS Build number: Windows 10 Pro 1709 (16299)
Memory Usage: 1485 MB / 3641 MB (996 MB allocated, but free)
Java version: 1.8.0_151-b12, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: \Display0 1680x1050
Maximum Screen Size: 1680x1050
VM arguments: [-Djava.security.manager, -Djava.security.policy=file:<java.home>\lib\security\javaws.policy, -DtrustProxy=true, -Djnlpx.home=<java.home>\bin, -Djnlpx.origFilenameArg=C:\Program Files (x86)\josm-latest-mehr-RAM.jnlp, -Djnlpx.remove=true, -Djava.util.Arrays.useLegacyMergeSort=true, -Djnlpx.heapsize=1024m,4096m, -Djnlpx.splashport=57894, -Djnlpx.jvm=<java.home>\bin\javaw.exe]
Dataset consistency test: No problems found

Plugins:
...
+ Mapillary (v1.5.8)
...

Last errors/warnings:
- E: Fehler beim Laden des Bildes 'Xmas_event.png'
- W:  Amenity: Could not get presets icon Xmas_event.png
- W: No configuration settings found.  Using hardcoded default values for all pools.
- W: Warnung: Das Absuchen der Datei 'site-svn.openstreetmap.org-_applications_editors_josm_plugins_opendata_modules.txt' nach Modulinformationen ist fehlgschlagen. Überspringe.
- E: Handled by bug report queue: org.openstreetmap.josm.plugins.PluginException: In der Erweiterung Mapillary ist ein Fehler aufgetreten.. Ursache: java.lang.reflect.InvocationTargetException. Ursache: java.lang.IllegalArgumentException: No icon provided


=== REPORTED CRASH DATA ===
BugReportExceptionHandler#handleException:
No data collected.

Warning issued by: BugReportExceptionHandler#handleException

=== STACK TRACE ===
Thread: AWT-EventQueue-2 (48) of javawsApplicationThreadGroup
org.openstreetmap.josm.plugins.PluginException: In der Erweiterung Mapillary ist ein Fehler aufgetreten.
	at org.openstreetmap.josm.plugins.PluginProxy.handlePluginException(PluginProxy.java:60)
	at org.openstreetmap.josm.plugins.PluginProxy.mapFrameInitialized(PluginProxy.java:71)
	at org.openstreetmap.josm.gui.MainPanel.updateContent(MainPanel.java:78)
	at org.openstreetmap.josm.gui.MainPanel$1.beforeFirstLayerAdded(MainPanel.java:155)
	at org.openstreetmap.josm.gui.layer.MainLayerManager.realAddLayer(MainLayerManager.java:263)
	at org.openstreetmap.josm.gui.layer.LayerManager.lambda$addLayer$0(LayerManager.java:217)
	at org.openstreetmap.josm.gui.util.GuiHelper.runInEDTAndWaitWithException(GuiHelper.java:234)
	at org.openstreetmap.josm.gui.layer.LayerManager.addLayer(LayerManager.java:217)
	at org.openstreetmap.josm.gui.layer.LayerManager.addLayer(LayerManager.java:206)
	at org.openstreetmap.josm.actions.NewAction.actionPerformed(NewAction.java:31)
...
Caused by: java.lang.IllegalArgumentException: No icon provided
	at org.openstreetmap.josm.gui.SideButton.<init>(SideButton.java:43)
	at org.openstreetmap.josm.plugins.mapillary.gui.MapillaryMainDialog.<init>(MapillaryMainDialog.java:60)
	at org.openstreetmap.josm.plugins.mapillary.gui.MapillaryMainDialog.getInstance(MapillaryMainDialog.java:139)
	at org.openstreetmap.josm.plugins.mapillary.MapillaryPlugin.mapFrameInitialized(MapillaryPlugin.java:104)
	... 50 more
}}
Last edited 10 months ago by Don-vip (previous) (diff)

Changed 10 months ago by Don-vip

Attachment: mapillary.JPG added

comment:32 Changed 10 months ago by Don-vip

@Dirk: Mapillary plugin does not use icons at all. Do we really want to throw an exception in this case? I think it's perfectly valid:


comment:33 Changed 10 months ago by stoecker

Actually because of still limited space consideration in this menu I'd prefer if they add images...

In core are help/next.png, help/previous.png already there and the other buttons e.g. could get a red and blue circle?

Last edited 10 months ago by Don-vip (previous) (diff)

comment:34 in reply to:  33 Changed 10 months ago by Don-vip

Cc: floscher added

Replying to stoecker:

In core are help/next.png, help/previous.png already there and the other buttons e.g. could get a red and blue circle?

@floscher: what do you think?

comment:35 Changed 10 months ago by Zverikk

Cc: floscher removed

Why not allow buttons without icons? Not all developers are graphic designers.

comment:36 in reply to:  35 Changed 10 months ago by stoecker

Replying to Zverikk:

Why not allow buttons without icons? Not all developers are graphic designers.

Because this menu very often is small and thus the texts get cut. That's the reason why there is a SideButton class at all, so that these menus use the space as optimal as possible.

comment:37 Changed 10 months ago by Klumbumbus

Ticket #15632 has been marked as a duplicate of this ticket.

comment:38 Changed 10 months ago by Don-vip

Cc: floscher added

comment:39 Changed 10 months ago by Don-vip

Ticket #15636 has been marked as a duplicate of this ticket.

comment:40 Changed 10 months ago by anonymous

Ticket #15638 has been marked as a duplicate of this ticket.

comment:41 Changed 10 months ago by stoecker

Beside the two arrows above e.g. following two images could be used:

https://commons.wikimedia.org/wiki/File:Blue_sphere.svg
https://commons.wikimedia.org/wiki/File:Nuvola_apps_krec.svg

They have LGPL license.

comment:42 Changed 10 months ago by Don-vip

comment:43 Changed 9 months ago by Don-vip

https://github.com/JOSM/Mapillary/releases/tag/v1.5.9 has been released, so this issue is gone.

One last issue to fix, the performance tests are broken since r13173 but I have difficulties to fix them.
@team: I'd love to get some help here :)

comment:44 Changed 9 months ago by michael2402

Just wanted to give you a short heads-up:

I finished my master thesis last month and should have more free time next year.

I'll have some days time to help cleaning up stuff during the next week, so feel free to assign me a topic (otherwise, I'll search through the ticket list). I'm looking forward to cleaning up some modern code after patching some 13+ year old swing applications at work :D

comment:45 Changed 9 months ago by michael2402

Cc: michael2402 added

comment:46 Changed 9 months ago by Don-vip

be nice with old apps, JOSM goes on its 11th year ;)

I'd like some help on two topics if you have some time:

  • I have broken performance tests and can't find how to fix them (again a problem of fixtures/state)
  • I don't know how to fix the bearing/heading and dx/dy deprecation warnings in plugins

comment:47 Changed 9 months ago by michael2402

OK, then I'll focus on the MapViewState issues ;-)

Do you have a specific plugin file for the deprecation warnings?

comment:48 Changed 9 months ago by Don-vip

Sure, you can take a look at Jenkins:

CommandLine.java:294, Java Compiler (javac), Priority: Normale
getDx() in ImageryLayer has been deprecated

CommandLine.java:294, Java Compiler (javac), Priority: Normale
getDy() in ImageryLayer has been deprecated

Correlator.java:132, Java Compiler (javac), Priority: Normale
heading(LatLon) in LatLon has been deprecated

OffsetDialogButton.java:146, Java Compiler (javac), Priority: Normale
heading(LatLon) in LatLon has been deprecated

OffsetDialogButton.java:255, Java Compiler (javac), Priority: Normale
heading(LatLon) in LatLon has been deprecated

ImproveWayAccuracyAction.java:462, Java Compiler (javac), Priority: Normale
heading(LatLon) in LatLon has been deprecated

IRSRectifyPlugin.java:56, Java Compiler (javac), Priority: Normale
getDx() in ImageryLayer has been deprecated

IRSRectifyPlugin.java:57, Java Compiler (javac), Priority: Normale
getDy() in ImageryLayer has been deprecated

TagRoundaboutAction.java:244, Java Compiler (javac), Priority: Normale
heading(LatLon) in LatLon has been deprecated

TagRoundaboutAction.java:252, Java Compiler (javac), Priority: Normale
heading(LatLon) in LatLon has been deprecated

TagRoundaboutAction.java:253, Java Compiler (javac), Priority: Normale
heading(LatLon) in LatLon has been deprecated

TagRoundaboutAction.java:435, Java Compiler (javac), Priority: Normale
heading(LatLon) in LatLon has been deprecated

TagRoundaboutAction.java:436, Java Compiler (javac), Priority: Normale
heading(LatLon) in LatLon has been deprecated

TagRoundaboutAction.java:546, Java Compiler (javac), Priority: Normale
heading(LatLon) in LatLon has been deprecated

Congratulations for your thesis :) Do we have to call you Doctor now? :)

comment:49 Changed 9 months ago by michael2402

I'm not into the heading formula, but from what I understand heading() should just be -bearing(), see #12524

No, I won't get a doctors degree.

comment:50 Changed 9 months ago by michael2402

In 13243/josm:

See #15310: Replace use of dx/dy in bookmark loading/storing code.

comment:51 Changed 9 months ago by Don-vip

In 13254/josm:

see #15310 - remove deprecated ProgressInputStream constructor

comment:52 Changed 9 months ago by Don-vip

Resolution: fixed
Status: newclosed

This ticket is fixed, the remaining deprecated methods come from #14120.

comment:53 Changed 8 months ago by Don-vip

In 13333/josm:

see #15310 - remove Preferences.getColor() methods

comment:54 Changed 6 months ago by Don-vip

In 13543/josm:

see #15310 - remove deprecated color stuff

comment:55 Changed 6 months ago by Don-vip

In 13548/josm:

see #15310 - remove forgotten deprecated preferences stuff

comment:56 Changed 6 months ago by Don-vip

In 13563/josm:

see #15310 - fix javadoc

comment:57 Changed 4 months ago by Don-vip

In 13864/josm:

see #15310 - remove dead code

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.