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

Resolve min as the earliest compatible Julia version (compatible with the user's project) #202

Merged
merged 34 commits into from
Aug 30, 2024

Conversation

omus
Copy link
Contributor

@omus omus commented Jan 5, 2024

Introduces a special version "MIN" "min" which when passed in as the version allows the user to test against the earliest version of Julia compatible with their project. In order to determine this version the project file is read.

If we want we can choose another name for this special version but I would like to keep the name short as this usually appears in the CI check name which can already be quite long.

Update: We've decided on "min" as the special version name

@omus
Copy link
Contributor Author

omus commented Jan 5, 2024

Did some basic local testing but need to add real tests before this is ready for review

@omus omus marked this pull request as ready for review January 9, 2024 01:20
@omus omus requested a review from a team as a code owner January 9, 2024 01:20
@DilumAluthge
Copy link
Member

Does this work for all julia = "..." compat entries, or just some? Can we document which ones it works for?

DilumAluthge
DilumAluthge previously approved these changes Jun 19, 2024
action.yml Show resolved Hide resolved
src/installer.ts Show resolved Hide resolved
// Use the highest available version that matches versionInput
let version = semver.maxSatisfying(availableReleases, versionInput, {includePrerelease})
if (version == null) {
if (!version) {
Copy link
Member

Choose a reason for hiding this comment

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

What's the difference between (!version) (this PR) and if (version == null) (on master)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So the issue with the original code is that null == undefined is also true so the original statement is kind of misleading. I switched things to be based on "truthy"-ness so now we thrown an exception on any value that is coerced into a false such as null, undefined, or "".

src/installer.ts Show resolved Hide resolved
src/installer.ts Outdated Show resolved Hide resolved
@DilumAluthge
Copy link
Member

@omus Looks like there are some merge conflicts.

@DilumAluthge DilumAluthge changed the title Support the special version "MIN" Resolve min as the earliest compatible Julia version (compatible with the user's project) Jun 19, 2024
@DilumAluthge DilumAluthge changed the title Resolve min as the earliest compatible Julia version (compatible with the user's project) Resolve MIN as the earliest compatible Julia version (compatible with the user's project) Jun 19, 2024
Copy link
Member

@IanButterworth IanButterworth left a comment

Choose a reason for hiding this comment

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

With #234 merged I think it makes sense to make this lowercase min

@DilumAluthge
Copy link
Member

With #234 merged I think it makes sense to make this lowercase min

Seems reasonable to me.

@DilumAluthge DilumAluthge dismissed their stale review July 19, 2024 18:41

stale - MIN needs to be changed to min

@IanButterworth
Copy link
Member

@omus do you agree with that change? I could take this PR over?

@omus omus changed the title Resolve MIN as the earliest compatible Julia version (compatible with the user's project) Resolve min as the earliest compatible Julia version (compatible with the user's project) Aug 30, 2024
IanButterworth
IanButterworth previously approved these changes Aug 30, 2024
@omus omus merged commit 014c323 into master Aug 30, 2024
64 checks passed
@omus omus deleted the cv/min-version branch August 30, 2024 15:58
@giordano

This comment was marked as resolved.

@IanButterworth
Copy link
Member

Should be fixed. Sorry. I forgot to update the tag to the tip of the release branch after missing adding that index file.
(Our detailed dev docs need some additional check...)

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

Successfully merging this pull request may close these issues.

4 participants