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

Express more complicated conditions on required or loaded versions of a package? #5387

Open
ThomasBreuer opened this issue Feb 28, 2023 · 0 comments

Comments

@ThomasBreuer
Copy link
Contributor

Since pull request #5375 got merged, we can express in the PackageInfo.g file of a package that certain files from the package shall be read if other packages are available. More precisely, one can specify required minimal versions of these other packages.

However, it is currently not possible to specify maximal version numbers or ranges of version numbers.
It may happen that such a package extension provides different code, depending on the versions of the required other packages, for example:

"Read the file file2 if version at least 2.0 of package A is loaded, but read file1 if a smaller version of package A is loaded."

The handling of version numbers in IsPackageLoaded, IsPackageMarkedForLoading, CompareVersionNumbers does not support the latter condition, it knows only the relations "at least the given version" and "equal to the given version":
The string "= 2.2" means that the version must be equal to 2.2, and each of the strings "2.3", ">= 2.3", "<= 2.3" means that the version must be at least 2.3.

Are there perhaps other situations where the current handling of version numbers is not sufficient?

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

No branches or pull requests

1 participant