Skip to content

Make JTSConfig load lazy - #3369

Merged
pomadchin merged 3 commits into
locationtech:masterfrom
pomadchin:fix/jts-config-load
Apr 1, 2021
Merged

pomadchin merged 3 commits into
locationtech:masterfrom
pomadchin:fix/jts-config-load

Conversation

@pomadchin

@pomadchin pomadchin commented Mar 30, 2021 •

Copy link
Copy Markdown
Member

Overview

This PR fixes the JTS config loading ordering. That could cause bad JTS factories init, since sometimes the reference.conf file could be loaded into memory after the call to the config. That could cause following errors:

Caused by: pureconfig.error.ConfigReaderException: Cannot convert configuration to a geotrellis.vector.conf.JtsConfig. Failures are:
  at the root:
    - (merge of system properties,reference.conf @ jar:file:/.../sbt/1.4.9/ssl-config-core_2.12-0.4.0.jar!/reference.conf: 1) Key not found: 'geotrellis'.

For the context: this could only happen in runs through SBT.
I did a little bit of tracing down the history of this bug and it turned out that it appeared in 1.4.0 and all 1.4.x versions are affected. However, in 1.5.x (checked with RC2) this issue is gone.

Checklist

  • ./CHANGELOG.md updated, if necessary. Link to the issue if closed, otherwise the PR.

@pomadchin pomadchin self-assigned this Mar 30, 2021
@pomadchin pomadchin added the bug label Mar 31, 2021

@jisantuc jisantuc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with local publication in the setting that produced the bug, eeverything's great 🎉

@pomadchin
pomadchin merged commit 01d46f2 into locationtech:master Apr 1, 2021
@pomadchin
pomadchin deleted the fix/jts-config-load branch April 1, 2021 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants