Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Implement mod versioning #1051

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

Alystrasz
Copy link
Contributor

@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
Contributor 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
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
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge conflicts Blocked by merge conflicts, waiting on the author to resolve
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants