Skip to content

Conversation

@fwdekker
Copy link
Owner

@fwdekker fwdekker commented Oct 3, 2023

Fixes #464.

Stores the plugin's version in the user's settings to allow version detection in the future. Furthermore, though Settings remains the usual object with a templateList (and perhaps other fields in the future (cf. #469?)), the class PersistentSettings now acts as if settings are saved as an Element (i.e. as XML). When settings are loaded, PersistentSettings has the opportunity to modify the XML before deserialising it into a Settings. Therefore, if there are incompatibilities between versions that the default XML deserialiser cannot handle, a small bit of code can be added to make these modifications automatically.

@fwdekker fwdekker added the feature New feature or request label Oct 3, 2023
@fwdekker fwdekker self-assigned this Oct 3, 2023
@codecov
Copy link

codecov bot commented Oct 3, 2023

Codecov Report

Merging #477 (6c25739) into main (0ccf143) will decrease coverage by 0.34%.
The diff coverage is 56.52%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #477      +/-   ##
==========================================
- Coverage   85.27%   84.93%   -0.34%     
==========================================
  Files          50       51       +1     
  Lines        1881     1899      +18     
  Branches      317      328      +11     
==========================================
+ Hits         1604     1613       +9     
- Misses        216      225       +9     
  Partials       61       61              

@fwdekker
Copy link
Owner Author

fwdekker commented Oct 3, 2023

Decreased coverage is likely due to #upgrade not being tested. Which makes sense, because the code in there is intentionally placeholder dead code. But it's very likely that it'll be used as of v3.1.0.

@fwdekker fwdekker merged commit 823f872 into main Oct 3, 2023
@fwdekker fwdekker deleted the backwards-compatibility branch October 3, 2023 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ensure future backwards compatibility

2 participants