question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[RFC] MelonInfo constructor with `(int, int, int)` versioning

See original GitHub issue

MelonLoader’s preferred versioning system is SemVer, which commonly uses 3 integers delimited by periods. Some creators have accidentally put a v into their version number not expecting ML to add one. Using an integer tuple would prevent this.

Since this would be an override, it shouldn’t break old mods using the old constructor.

Additionally, this would allow in the future for MelonLoader to check if a dependency’s version meets the minimum that a mod requires.

Example:

[assembly: MelonInfo(typeof(...), "Name", "1.2.3", "Author", "Link")] could be converted to [assembly: MelonInfo(typeof(...), "Name", (1, 2, 3), "Author", "Link")]

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
loukylorcommented, Dec 2, 2021

Why not (int, int, int) or (int, int, int, string), then the string just gets appended to the end when it is written to console or printed?

Ex: [assembly: MelonInfo(typeof(...), "Name", (1, 2, 3, "-beta"), "Author", "Link")] which would print version as 1.2.3-beta. The string parameter could be called comment, branch, or something along those lines.

Edit: It may also be helpful to add a method into MelonUtils that converts SemVer strings into the int/string representation of it.

0reactions
HerpDerpinstinecommented, Oct 26, 2022

Moving this back to v0.6.0 as the recent attempt for v0.5.7 caused Melon compilation issues.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Version Constructor (System)
Initializes a new instance of the Version class using the specified major, minor, and build values. public: Version(int major, int minor, int build);....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found