Modify

Opened 4 years ago

Closed 4 years ago

Last modified 2 years ago

#18272 closed defect (fixed)

[Patch] Stop creating validator folder

Reported by: bagage Owned by: team
Priority: minor Milestone: 19.10
Component: Core validator Version: latest
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

  1. Run new version of JOSM

What is the expected result?

Validator should use JOSM preferences to store its items.

What happens instead?

It still creates a folder in user settings ($HOME/.local/JOSM/validator on GNU/Linux).

Attached patch should address the problem (really looking forward to gitlab migration though!).

Please provide any additional information below. Attach a screenshot if possible.

Build-Date:2019-06-16 15:08:02
Revision:15171
Is-Local-Build:true

Identification: JOSM/1.5 (15171 SVN en) Linux Debian GNU/Linux bullseye/sid
Memory Usage: 1051 MB / 4450 MB (362 MB allocated, but free)
Java version: 1.8.0_232-8u232-b09-1-b09, Debian, OpenJDK 64-Bit Server VM
Screen: :0.0 1920x1080
Maximum Screen Size: 1920x1080
Java package: openjdk-8-jre:amd64-8u232-b09-1
Java ATK Wrapper package: libatk-wrapper-java:all-0.37.1-1
libcommons-compress-java: libcommons-compress-java:-
libcommons-logging-java: libcommons-logging-java:all-1.2-2
fonts-noto: fonts-noto:all-20181227-1
liboauth-signpost-java: liboauth-signpost-java:-
VM arguments: [-javaagent:/opt/ideaIU-2018.2/idea-IU-182.3684.101/lib/idea_rt.jar=33929:/opt/ideaIU-2018.2/idea-IU-182.3684.101/bin, -Dfile.encoding=UTF-8]
Program arguments: [${HOME}/code/osm/josm/caudalie.joz, --lang=en]

Plugins:
+ apache-commons (35092)
+ buildings_tools (35171)
+ cadastre-fr (35167)
+ conflation (0.6.4)
+ ejml (35122)
+ geotools (35169)
+ jts (35122)
+ scripting (30796)
+ todo (30306)
+ utilsplugin2 (35177)

Last errors/warnings:
- E: Failed to locate image 'dialogs/reorderlayers'
- W: No configuration settings found.  Using hardcoded default values for all pools.
- E: Handled by bug report queue: org.openstreetmap.josm.tools.JosmRuntimeException: Fatal: failed to locate image 'reverse.???'. This is a serious configuration problem. JOSM will stop working.
- E: Handled by bug report queue: java.lang.reflect.InvocationTargetException. Cause: java.lang.IllegalStateException: Dialog was already created

Attachments (1)

Stop_creating_validator_directory.patch (1.2 KB ) - added by bagage 4 years ago.
patch

Download all attachments as: .zip

Change History (11)

by bagage, 4 years ago

patch

comment:1 by Don-vip, 4 years ago

Milestone: 19.10

comment:2 by Don-vip, 4 years ago

Milestone: 19.10
Owner: changed from team to bagage
Status: newneedinfo

It seems it will break validator ignored errors.

comment:3 by bagage, 4 years ago

What makes you feel so?

The checkValidatorDir method only creates the folder ~/.local/share/JOSM/validator, but we do not write anymore in that directory.

Previously we wrote ~/.local/share/JOSM/validator/ignorederrors but now we write in josm preferences directly. We only read that file once to migrate its content to JOSM preferences. For that we first ensure it exists:

Path path = Paths.get(getValidatorDir()).resolve("ignorederrors");
try {
    if (path.toFile().exists()) {
          /* migrate to josm preferences */

I'm not sure to understand what it would break?

Last edited 4 years ago by Don-vip (previous) (diff)

comment:4 by Don-vip, 4 years ago

Ah, I thought we still used this file. Since when does JOSM migrate it to preferences? Maybe it's time to get rid of this compatibility code as well.

comment:5 by bagage, 4 years ago

I think it is since revision r14828?

Last edited 4 years ago by Don-vip (previous) (diff)

comment:6 by Don-vip, 4 years ago

OK. Current JOSM usage is as follows:
below r14828, around 20%:

 205 ( 2.6%)*9329
  96 ( 1.2%)*14178
  58 ( 0.7%)*14382
  60 ( 0.8%)*14460
 118 ( 1.5%)*14620
  94 ( 1.2%)*14760
 114 ( 1.5%)*14824

above r14828, around 80%:

 104 ( 1.3%)*14945
 177 ( 2.3%)*15031
 224 ( 2.9%)*15155
  93 ( 1.2%) 15233
 463 ( 6.0%)*15238
 593 ( 7.7%)*15322
4271 (55.2%)*15390
  51 ( 0.7%) 15479

It's only 8 months old, we can wait a few months still to have a higher percentage.

comment:7 by Don-vip, 4 years ago

Milestone: 19.10
Owner: changed from bagage to team
Status: needinfonew

comment:8 by Don-vip, 4 years ago

Priority: normalminor

comment:9 by Don-vip, 4 years ago

Resolution: fixed
Status: newclosed

In 15485/josm:

fix #18272 - Stop creating validator folder (patch by bagage)

comment:10 by Don-vip, 2 years ago

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

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. 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.