nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: cedar-policy/cedar
Pull request #1423 (2025-01-13 17:16:00)

bump language version to 4.2
## Description of changes

Bumps the language version to 4.2.  This will be the new language version as of SDK 4.3.0.  Differences from language 4.1 (SDK 4.2.0) include the `isEmpty` operator, which warrants a minor bump.

Previously, the `main` branch was incorrectly reporting 4.0 as the language version, even though the released SDK 4.2.x correctly reports 4.1 as the language version for 4.2.x.

cdisselkoen: As noted in the PR description, SDK 4.2.x reports language version 4.1, but the change was never made on `main`.  This is also documented in [this table](https://docs.cedarpolicy.com/other/doc-history.html).

Patch:
diff --git a/cedar-policy/src/api.rs b/cedar-policy/src/api.rs
index dc10a721..c68664cf 100644
--- a/cedar-policy/src/api.rs
+++ b/cedar-policy/src/api.rs
@@ -71,7 +71,7 @@ pub(crate) mod version {
         static ref SDK_VERSION: Version = env!("CARGO_PKG_VERSION").parse().unwrap();
         // Cedar language version
         // The patch version field may be unnecessary
-        static ref LANG_VERSION: Version = Version::new(4, 0, 0);
+        static ref LANG_VERSION: Version = Version::new(4, 2, 0);
     }
     /// Get the Cedar SDK Semantic Versioning version
     #[allow(clippy::module_name_repetitions)]


Test patch:
diff --git a/cedar-policy/src/tests.rs b/cedar-policy/src/tests.rs
index 3e2e1afb..6a9f6a76 100644
--- a/cedar-policy/src/tests.rs
+++ b/cedar-policy/src/tests.rs
@@ -6292,7 +6292,7 @@ mod version_tests {
 
     #[test]
     fn test_lang_version() {
-        assert_eq!(get_lang_version().to_string(), "4.0.0");
+        assert_eq!(get_lang_version().to_string(), "4.2.0");
     }
 }