fabric-loader icon indicating copy to clipboard operation
fabric-loader copied to clipboard

[Technical Request] Use maven-based or meta-based metadata to set normalized `McVersion` and release

Open teddyxlandlee opened this issue 2 years ago • 1 comments

McVersion#raw and McVersion#normalized is (kind of) enumerated from the release id string in version.json.

This makes Fabric Loader has to be updated timely when the new snapshot series are out.

I think those metadata should be published to Fabric Maven, or be added to Fabric Meta, rather than enumerating in the loader.

Plan 1: Meta

{
    "loader": {
      "separator": ".",
      "build": 19,
      "maven": "net.fabricmc:fabric-loader:0.14.19",
      "version": "0.14.19",
      "stable": true
    },
    "intermediary": {
      "maven": "net.fabricmc:intermediary:23w03a",
      "version": "23w03a",
      "stable": false
    },
+  "mcversion": {
+     "series": "1.19.4",
+     "normalized": "1.19.4-alpha.23.3.a"
+  }
    "launcherMeta": {
      // ...
    }
  },

This example adds a field into https://meta.fabricmc.net/v2/versions/loader/23w03a.

Old versions before 23w14a does not need to do this; this should only be used in the later releases.

Plan 2: use maven:

Similar to above, but publish a JSON into net.fabricmc:intermediary:23w03a:metadata@json

{
    "id": "23w03a",
    "series": "1.19.4",
    "normalized": "1.19.4-alpha.23.3.a"
}

Plan 3: add it into intermediary jar

intermediary v2 jar should be used, while the above json should be added into extras/version_metadata.json.

Please note that all the above plans should be only used in releases after 23w13a_or_b.

teddyxlandlee avatar Apr 04 '23 00:04 teddyxlandlee

I actually started work on this here: https://github.com/FabricMC/fabric-loom/pull/848

My plan was to add the target version to intermediary, however after speaking to @sfPlayer1 I started getting 2nd thoughts on it.

  • Player made a great point that loader should still be able to operate without intermediary so would still require the same existing logic.
  • I think its likely at somepoint the target version may be unknown or need to change, having it part of intermediary would allow us to re-release previous versions as needed, this sounds great untill:
    • Being able to hotfix/force update the target version will break any existing installs, this is not something I want to do.
    • As proved over the past weekend hotfixing intermediary is something that not all launchers handle correctly/well.
  • Its not uncommon for other things such as the entrypoint hooks to also require fixing.
  • Versions like 23w13a_or_b would have still needed a new loader release as they do not follow the general pattern.

Im a little unsure about what the best course of action is. I know for sure that loader should not make a network request for this at runtime as that will cause 1000 more issues than it solves.

The current solution is a little annoying, but it is simple and easy and doesnt have any of the above issues. Are a few small releases a year really a big issue?

modmuss50 avatar Apr 04 '23 10:04 modmuss50