Modify

Opened 3 months ago

Last modified 10 days ago

#15310 new enhancement

The Great Deprecation Cleanup

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

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 2 weeks ago.

Download all attachments as: .zip

Change History (43)

comment:1 Changed 3 months ago by Don-vip

Description: modified (diff)

comment:2 Changed 3 months ago by Don-vip

Description: modified (diff)

comment:3 in reply to:  description Changed 3 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 3 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 3 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 3 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: unmaintained, I'm going to remove it from list (Mapbox does not reply to my messages)
  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
Version 0, edited 3 months ago by Don-vip (next)

comment:7 Changed 3 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 3 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 3 months ago by jBeata

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

comment:10 Changed 3 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 2 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 2 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 2 months ago by jBeata (previous) (diff)

comment:13 Changed 2 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 4 weeks ago by Don-vip

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

comment:15 Changed 3 weeks ago by Don-vip

In 13173/josm:

see #15310 - remove most of deprecated APIs

comment:16 Changed 3 weeks 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 3 weeks 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 3 weeks ago by Don-vip (previous) (diff)

comment:18 Changed 3 weeks ago by Don-vip

In 13174/josm:

see #15310 - fix unit tests, warnings

comment:19 Changed 3 weeks 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 3 weeks ago by Don-vip

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

comment:22 Changed 3 weeks ago by Don-vip

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

comment:23 Changed 2 weeks ago by Don-vip

In 13175/josm:

see #15310 - minor fixes, performance test still failing

comment:24 Changed 2 weeks ago by Don-vip

In 13180/josm:

see #15310 - remove Main.worker

comment:25 Changed 2 weeks ago by SanderH

comment:26 Changed 2 weeks ago by Don-vip

In 13182/josm:

see #15310 - cacheDir is unused, deprecate new methods

comment:27 Changed 2 weeks ago by stoecker

In 13187/josm:

see #15310 - drop old style side button support

comment:28 Changed 2 weeks 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 2 weeks 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 2 weeks ago by Don-vip

In 13193/josm:

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

comment:31 in reply to:  27 Changed 2 weeks 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 2 weeks ago by Don-vip (previous) (diff)

Changed 2 weeks ago by Don-vip

Attachment: mapillary.JPG added

comment:32 Changed 2 weeks 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 13 days 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 days ago by Don-vip (previous) (diff)

comment:34 in reply to:  33 Changed 13 days 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 13 days 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 13 days 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 13 days ago by Klumbumbus

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

comment:38 Changed 13 days ago by Don-vip

Cc: floscher added

comment:39 Changed 12 days ago by Don-vip

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

comment:40 Changed 11 days ago by anonymous

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

comment:41 Changed 11 days 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 days ago by Don-vip

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to Don-vip
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


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

 
Note: See TracTickets for help on using tickets.