-
Notifications
You must be signed in to change notification settings - Fork 197
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 mono runtime test config #958
base: main
Are you sure you want to change the base?
Changes from 4 commits
d6da02a
dbab743
43ca36b
1b1d549
631156d
902e792
60295c5
22bbc58
08ae2d8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -540,7 +540,7 @@ fn tests(name: &str, dir_name: &str) -> Result<Vec<PathBuf>> { | |||||||
fs::write(dst, contents).unwrap(); | ||||||||
} | ||||||||
|
||||||||
let mut csproj = wit_bindgen_csharp::CSProject::new_mono( | ||||||||
let csproj = wit_bindgen_csharp::CSProject::new_mono( | ||||||||
out_dir.clone(), | ||||||||
&assembly_name, | ||||||||
world_name, | ||||||||
|
@@ -553,6 +553,7 @@ fn tests(name: &str, dir_name: &str) -> Result<Vec<PathBuf>> { | |||||||
csproj.generate()?; | ||||||||
|
||||||||
let dotnet_root_env = "DOTNET_ROOT"; | ||||||||
let configuration = "Debug"; | ||||||||
let dotnet_cmd: PathBuf; | ||||||||
match env::var(dotnet_root_env) { | ||||||||
Ok(val) => dotnet_cmd = Path::new(&val).join("dotnet"), | ||||||||
|
@@ -563,10 +564,10 @@ fn tests(name: &str, dir_name: &str) -> Result<Vec<PathBuf>> { | |||||||
|
||||||||
cmd.current_dir(&out_dir); | ||||||||
|
||||||||
cmd.arg("build") | ||||||||
cmd.arg("publish") | ||||||||
.arg(out_dir.join(format!("{camel}.csproj"))) | ||||||||
.arg("-c") | ||||||||
.arg("Debug") | ||||||||
.arg(configuration) | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
.arg("/p:PlatformTarget=AnyCPU") | ||||||||
.arg("--self-contained") | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for me After I install workload
Which makes sense for preview6. With preview7 I get
Which means There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nothing about this will work without the workload, I'm testing against daily builds of 9 using https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had to add |
||||||||
.arg("-o") | ||||||||
|
@@ -586,7 +587,7 @@ fn tests(name: &str, dir_name: &str) -> Result<Vec<PathBuf>> { | |||||||
panic!("failed to compile"); | ||||||||
} | ||||||||
|
||||||||
let out_wasm = out_wasm.join("AppBundle").join(assembly_name); | ||||||||
let out_wasm = out_dir.join("bin").join(configuration).join("net9.0").join("AppBundle").join(assembly_name); | ||||||||
let mut wasm_filename = out_wasm.clone(); | ||||||||
wasm_filename.set_extension("wasm"); | ||||||||
|
||||||||
|
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.
Wit-bindgen doesn't produce the object file directly anymore,
I've used:
In https://github.com/bytecodealliance/componentize-dotnet/pull/35/files#diff-7f4dfa8be7454aa047e35760bfbb0f95c0e1402fd34943606ccd9975e45b8b71
Not sure if
_WasiLinkStepArgs
is the same?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.
it's another case of bad coevolution dotnet/runtime#107194 but they will be
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 resolution there is that everybody should use LinkerArg over all the other options