Skip to content

Avoid confusion with the word "labels" in context of a map file or store - #1640

Merged
devemux86 merged 3 commits into
mapsforge:masterfrom
Sublimis:labels-concept-1
Jan 25, 2025
Merged

devemux86 merged 3 commits into
mapsforge:masterfrom
Sublimis:labels-concept-1

Conversation

@Sublimis

@Sublimis Sublimis commented Jan 21, 2025 •

Copy link
Copy Markdown
Contributor

Avoid confusion with the word "labels" in context of a map file or store - an elegant solution.

  • No behavior change, everything continues to work as before.
  • Minimizes the number of changes in the code.
  • Users are notified that two (rarely used) methods have been renamed.

#1637
#1636

@devemux86

Copy link
Copy Markdown
Collaborator

@Sublimis Thanks, although it would be better not to rename the public API.

If we decide to rename it, we should just rename it.
Without also have and maintain the old API, as it will be mentioned in the changelog.

(Note: MultiMapDataStore adaptation is left for a separate step, to avoid conflicts with #1635 )

If we go for it, the pull request must be complete in all related classes.
#1635 can be adapted later.

@devemux86

Copy link
Copy Markdown
Collaborator

@Sublimis Or first merge #1635 (there are review comments) and then see this.

@Sublimis

Copy link
Copy Markdown
Contributor Author

If we go for it, the pull request must be complete in all related classes.

It is complete, as the readLabels() are still intact. No behavior nor interface change.
So this only applies to the scenario where we remove the readLabels() completely.
There is basically zero effort in maintaining these "old" methods, because all they do is call their "new" counterparts. When someone in the future, after a few versions, comes to this code, simply delete readLabels() and MapFile.Selector.LABELS and that's that.

#1635 will now be updated.

@devemux86

Copy link
Copy Markdown
Collaborator

@Sublimis It's better to rename / remove them in all classes that they exist.
Instead of maintaining deprecated code. Changelog exists for this purpose.

@devemux86

Copy link
Copy Markdown
Collaborator

(Note: MultiMapDataStore adaptation is left for a separate step, to avoid conflicts with #1635 )

@Sublimis Now that #1635 was merged, this needs to rename the readLabels in all classes.

Also please remove the deprecated methods and enum. We can mention them in changelog.

Note: This branch has conflicts that must be resolved.

@devemux86 devemux86 added this to the 0.24.0 milestone Jan 25, 2025
@devemux86
devemux86 merged commit 94e4499 into mapsforge:master Jan 25, 2025
@devemux86

Copy link
Copy Markdown
Collaborator

@Sublimis Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants