Modify

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#18830 closed enhancement (fixed)

Remove PreferencesUtils#readPrefsFromJS due to Nashorn removal

Reported by: simon04 Owned by: simon04
Priority: normal Milestone: 20.05
Component: Core Version:
Keywords: javascript nashorn java15 Cc: Don-vip

Description


Attachments (0)

Change History (11)

comment:1 by Don-vip, 5 years ago

Or simply drop it. It's here since :ticket:4421#comment:34 but I don't think it's being used much. We should ask on @josm-dev

comment:2 by simon04, 5 years ago

https://lists.openstreetmap.org/pipermail/josm-dev/2020-March/008285.html


Nashorn was in use for three features of JOSM core:

  1. JavaScript API of JOSM configuration XML files, Help/Preferences/ImportExport#JavaScriptAPI


… we don't see a viable alternative. We plan to remove this

feature with the next JOSM release unless someone steps up with a
killer-user-case and migration plan

Version 0, edited 5 years ago by simon04 (next)

comment:4 by simon04, 5 years ago

Summary: Migrate PreferencesUtils#readPrefsFromJS to non-JavaScript/non-NashornRemove PreferencesUtils#readPrefsFromJS due to Nashorn removal

comment:5 by Don-vip, 5 years ago

Milestone: 20.0320.04

Descoping to release 20.03 early to address #18798, as we receive a lot of duplicates, and to allow some time for feedback, even if I think nobody will show up.

comment:6 by simon04, 5 years ago

Owner: changed from team to simon04
Status: newassigned

Removing PreferencesUtils#readPrefsFromJS is the easy part. The ScriptEngine, however, is heavily used via CustomConfigurator.XMLCommandProcessor#evalVars in order to evaluate various strings/values, such as Help/Preferences/ImportExport#Variablesmessageboxesandaskinguser

What should we do?

  1. Rewrite evalVars to only lookup variables, but not compute values?
  2. Rewrite evalVars to mimic the most important computations (such as math and string computations)?
  3. Rewrite evalVars to use MapCSS functions?
  4. Use https://github.com/beanshell/beanshell or a similar library?
  5. …?

in reply to:  6 comment:7 by simon04, 5 years ago

Replying to simon04:

What should we do?

  1. Rewrite evalVars to only lookup variables, but not compute values?

I chose this variant.

comment:8 by simon04, 5 years ago

Resolution: fixed
Status: assignedclosed

In 16329/josm:

fix #18830 - Remove PreferencesUtils#readPrefsFromJS due to Nashorn removal

comment:9 by simon04, 5 years ago

In 16330/josm:

see #18830 - Remove Utils#getJavaScriptEngine due to Nashorn removal

comment:11 by Klumbumbus, 5 years ago

Milestone: 20.0420.05

Milestone renamed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain simon04.
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.