PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: davidlattimore/wild (rust)

Issue:
Add support for -z defs
The flag `-z defs` affects linking of shared objects. It should mean that we give an error if a symbol is referenced, but not defined, where normally, for shared objects, we don't do that.

The test can probably be something similar to this.

```c
//#LinkArgs:-Bshareable -z defs
//#Static:false
//#ExpectError:foo

int foo(void);

int call_foo(void) {
    return foo() + 2;
}
```

Pull request:
add: defs z option
Add defs option for z flag. Closes #810


Patch:
diff --git a/libwild/src/args.rs b/libwild/src/args.rs
index 9bf62a6..7d610cb 100644
--- a/libwild/src/args.rs
+++ b/libwild/src/args.rs
@@ -355,6 +355,7 @@ pub(crate) fn parse<F: Fn() -> I, S: AsRef<str>, I: Iterator<Item = S>>(input: F
                 "noexecstack" => args.execstack = false,
                 "nocopyreloc" => args.allow_copy_relocations = false,
                 "nodelete" => args.needs_nodelete_handling = true,
+                "defs" => args.no_undefined = true,
                 _ => {
                     warn_unsupported(&format!("-z {arg}"))?;
                     // TODO: Handle these


Test patch:
diff --git a/wild/tests/integration_tests.rs b/wild/tests/integration_tests.rs
index fa09a38..1e4fcfe 100644
--- a/wild/tests/integration_tests.rs
+++ b/wild/tests/integration_tests.rs
@@ -2371,7 +2371,8 @@ fn integration_test(
         "shared.c",
         "duplicate_strong_symbols.c",
         "preinit-array.c",
-        "exception.cc"
+        "exception.cc",
+        "z-defs.c"
     )]
     program_name: &'static str,
     #[allow(unused_variables)] setup_symlink: (),
diff --git a/wild/tests/sources/z-defs.c b/wild/tests/sources/z-defs.c
new file mode 100644
index 0000000..b549f33
--- /dev/null
+++ b/wild/tests/sources/z-defs.c
@@ -0,0 +1,7 @@
+//#LinkArgs:-Bshareable -z defs
+//#Static:false
+//#ExpectError:foo
+
+int foo(void);
+
+int call_foo(void) { return foo() + 2; }
Repository: ResearchObject/ro-crate-py (python)

Issue:
Add contentUrl property to files when it's known
E.g., when a remote file is added with `fetch_remote=True`. See https://github.com/ResearchObject/ro-crate/pull/189#issuecomment-1227697348.

Pull request:
Add contentUrl when fetching remote files
Closes #133.

Patch:
diff --git a/rocrate/model/file.py b/rocrate/model/file.py
index 9251aeb..a5d1c43 100644
--- a/rocrate/model/file.py
+++ b/rocrate/model/file.py
@@ -59,6 +59,7 @@ class File(FileOrDir):
                     if self.fetch_remote:
                         out_file_path.parent.mkdir(parents=True, exist_ok=True)
                         urllib.request.urlretrieve(response.url, out_file_path)
+                        self._jsonld['contentUrl'] = str(self.source)
         elif self.source is None:
             # Allows to record a File entity whose @id does not exist, see #73
             warnings.warn(f"No source for {self.id}")


Test patch:
diff --git a/test/test_write.py b/test/test_write.py
index 10f0ec3..6fb57b6 100644
--- a/test/test_write.py
+++ b/test/test_write.py
@@ -150,6 +150,7 @@ def test_remote_uri(tmpdir, helpers, fetch_remote, validate_url, to_zip):
     if fetch_remote:
         out_file = out_crate.dereference(file_.id)
         assert (out_path / relpath).is_file()
+        assert out_file["contentUrl"] == url
     else:
         out_file = out_crate.dereference(url)
         assert not (out_path / relpath).exists()