-
Notifications
You must be signed in to change notification settings - Fork 323
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
Fix the Engine version check in GUI #6570
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous error message gave instructions to modify a project to use a different engine version, while the new message does not; I assume this is an intentional change.
app/gui/config/src/lib.rs
Outdated
// ============== | ||
|
||
/// A wrapper for an error with information that the Engine version does not meet the requirements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a wrapper for an error or simply an error type?
/// The version of the Engine that was found. | ||
pub found: semver::Version, | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More whitespace.
app/gui/config/src/lib.rs
Outdated
) -> Result<(), UnsupportedEngineVersion> { | ||
// We don't want to rely on the `semver::VersionReq` semantics here. Unfortunately the | ||
// [Semantic Versioning specification](https://semver.org/) does not define the semantics of | ||
// of the version requirement operators, so different implementations may behave differently. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doubled of
// [Semantic Versioning specification](https://semver.org/) does not define the semantics of | ||
// of the version requirement operators, so different implementations may behave differently. | ||
// | ||
// The `semver::VersionReq` implementation follows the Cargo's implementation, namely: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the Cargo
// ``` | ||
// In particular, in order for any VersionReq to match a pre-release version, the VersionReq | ||
// must contain at least one Comparator that has an explicit major, minor, and patch version | ||
// identical to the pre-release being matched, and that has a nonempty pre-release component. | ||
// ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a source you can readily link for this?
@@ -64,3 +109,24 @@ pub fn read_args() -> Args { | |||
lazy_static! { | |||
pub static ref ARGS: Args = read_args(); | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing vertical space.
// Sanity check: required version must be supported. | ||
assert!(check_engine_version(&engine_version_required()).is_ok()); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about a test that would fail with semver::VersionReq
?
I don't think this is intentional to not report users with the error that Kaz mentioned above. @mwu-tow ? |
Feel free to merge it after fixing the issues. If there is Kaz review, there is no need for mine :) |
@wdanilo |
* develop: (28 commits) Add tests for Date.until, Date.next and Date.previous. (#6606) Improve `Non_Unique_Primary_Key` error, split file format detection into read/write, improve SQLite format detection (#6604) tokenize_to_columns or parse_to_columns results in a single column we shouldn't add the 1 (#6607) Fix node editing race condition (#6594) Add format to the in-memory Column (#6538) Fix dashboard issues (part 2) (#6511) Fix visualisation type selector artifacts rendered after node preview visualisation was closed. (#6575) Revert typescript CI Lint changes (#6602) Fix the Engine version check in GUI (#6570) Show error pop-up when failing to rename a project (#6366) Small changes from Book Club issues (#6533) "at_least_one" flag for tokenize_to_rows (#6539) Benchmark Engine job runs only engine, not Enso benchmarks (#6534) Catch 5813 and avoid crash (#6585) Fix opening links in desktop IDE (#6507) Identify SyntaxError exception and avoid printing a stack trace (#6574) Fix dashboard issues (#6502) Let ChangesetBuilder.invalidated search even container elements (#6548) Fix #5075: stop panning on full-screen visualisation (#6530) Only `Join_Kind.Inner` removes the common-named columns (#6564) ...
…ing-6287 * develop: Fix issues with missing sourcemaps (#6572) Fix asset delete; implement project delete and project rename (#6566) Fix #6377: Change ctrl-r shortcut (#6620) Add tests for Date.until, Date.next and Date.previous. (#6606) Improve `Non_Unique_Primary_Key` error, split file format detection into read/write, improve SQLite format detection (#6604) tokenize_to_columns or parse_to_columns results in a single column we shouldn't add the 1 (#6607) Fix node editing race condition (#6594) Add format to the in-memory Column (#6538) Fix dashboard issues (part 2) (#6511) Fix visualisation type selector artifacts rendered after node preview visualisation was closed. (#6575) Revert typescript CI Lint changes (#6602) Fix the Engine version check in GUI (#6570)
Pull Request Description
This PR fixes #6560.
The fix has a few elements:
2023.1.1
.VersionReq
fromsemver
crate which did not behave intuitively when the required version had a prerelease suffix. Now we rely directly on Semantic Versioning rules of precedence.Important Notes
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
Scala,
Java,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
./run ide build
.