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

Dependency Constant Version Tables #685

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

uniboi
Copy link
Contributor

@uniboi uniboi commented Apr 1, 2024

#if HAS_UEBERBLICK
// This compiles only if the dependency is loaded. No matter the version of the dependency
#endif

#if HAS_UEBERBLICK && HAS_UEBERBLICK.major == 1
// This compiles ONLY if the dependency version is 1.x.x
#endif

#if HAS_UEBEBLICK && HAS_UEBERBLICK.major == 1 && HAS_UEBERBLICK.minor >= 2 && HAS_UEBERBLICK.minor <= 5
// This compiles only if the dependency's version is between 1.2.x - 1.5.x
#endif
  • if a dependency is not loaded, the constant is 0
  • otherwise the dependency is a table that holds major, minor and patch keys for the versions of the mod
  • only valid versions are inserted in the table. e.g. 1.x.x would only expose the major key
  • build & pre-release info is ignored

@GeckoEidechse GeckoEidechse changed the title Depedency Constant Version Tables Dependency Constant Version Tables Apr 1, 2024
@GeckoEidechse GeckoEidechse added needs testing Changes from the PR still need to be tested needs code review Changes from PR still need to be reviewed in code labels Apr 1, 2024
@GeckoEidechse
Copy link
Member

Oooh, I like this a lot :D

I assume the commented out code is still planned to be cleaned up? ^^

@catornot catornot self-requested a review April 2, 2024 23:31
uniboi and others added 2 commits April 3, 2024 13:50
Co-authored-by: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>
Copy link
Member

@catornot catornot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

your semver parser crashed :|

patch is empty and minor has a .
image

no stack trace in logs

mods that made it crash : live holo & holo mimic

it crashed at CreateSlot("patch", stoi(patch)); btw

@GeckoEidechse
Copy link
Member

I guess this needs a preliminary check if mod version is even properly formatted and fail out if not?

@github-actions github-actions bot added the merge conflicts Blocked by merge conflicts, waiting on the author to resolve label Jun 17, 2024
@GeckoEidechse
Copy link
Member

@uniboi bump
(especially cause merge conflicts atm)

@GeckoEidechse
Copy link
Member

Converting to draft until merge conflicts are addressed. cc @uniboi

@GeckoEidechse GeckoEidechse marked this pull request as draft August 13, 2024 13:22
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 needs code review Changes from PR still need to be reviewed in code needs testing Changes from the PR still need to be tested
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants