Skip to content

feat: Implement mod versioning#1051

Merged
Alystrasz merged 27 commits intoR2NorthstarTools:mainfrom
Alystrasz:feat/mod-versioning
Sep 5, 2025
Merged

feat: Implement mod versioning#1051
Alystrasz merged 27 commits intoR2NorthstarTools:mainfrom
Alystrasz:feat/mod-versioning

Conversation

@Alystrasz
Copy link
Copy Markdown
Collaborator

@Alystrasz Alystrasz commented Dec 9, 2024

Implementation of R2Northstar/NorthstarLauncher#828 new manifest format, going from:

{
  "Parkour": false,
  "HUD Revamp v2": false
}

to:

{
  "Parkour": {
    "0.2.0": false,
    "0.2.1": false
  },
  "HUD Revamp v2": {
    "2.0.0": false
  }
}

If the current version of the manifest cannot be defined automatically, NORTHSTAR_MODS_MANIFEST_VERSION default value will be used instead.

(This is not a breaking change, as the current manifest format support is preserved.)

TODOs

  • Fix set_mod_enabled_status with mods we don't know the version to enable/disable (e.g. core mods/mod settings)
  • Add a manifest version parameter to rebuild_enabled_mods_json
  • PR description
  • Add testing instructions

Testing

With this contribution, Flightcore supports both manifest versions dynamically, which means you can switch between profiles using different versions with no issues.

To test this, I configured a R2Northstar profile with current manifest format, and a R2Development profile with new manifest format:

mod-versioning-support.webm

v0 (current format) manifest: enabledmods.json
v1 (new format) manifest: enabledmods.json

@Alystrasz
Copy link
Copy Markdown
Collaborator Author

Alystrasz commented Dec 9, 2024

@GeckoEidechse what should happen when flightcore can't load enabledmods.json file (thus not being able to determine manifest version being used)?
Should we rebuild enabledmods.json using v0 (old format) or v1?

@GeckoEidechse
Copy link
Copy Markdown
Member

I'd say rebuild in v0 for now but have a feature flag or simple conditional check to tell it to rebuild in v1 instead. That way we can just "flip the switch" when we release the corresponding update in Northstar.

@GeckoEidechse
Copy link
Copy Markdown
Member

Clippy CI errors are from update in Rust toolchain and will be fixed by #1053

@Alystrasz Alystrasz marked this pull request as ready for review December 12, 2024 00:39
@github-actions github-actions bot added the merge conflicts Blocked by merge conflicts, waiting on the author to resolve label Mar 2, 2025
@github-actions github-actions bot removed the merge conflicts Blocked by merge conflicts, waiting on the author to resolve label Apr 6, 2025
@Alystrasz
Copy link
Copy Markdown
Collaborator Author

Tested today with the new Northstar release candidate, still works with both old and new manifesto formats:

multi-versions.webm

@Alystrasz Alystrasz merged commit 6f9ad6d into R2NorthstarTools:main Sep 5, 2025
7 checks passed
@Alystrasz Alystrasz deleted the feat/mod-versioning branch September 5, 2025 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants