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

Fix create-obj / create-exe interaction #3392

Closed
fschutt opened this issue Nov 29, 2022 · 2 comments
Closed

Fix create-obj / create-exe interaction #3392

fschutt opened this issue Nov 29, 2022 · 2 comments
Assignees
Labels
bug Something isn't working create-exe priority-high High priority issue
Milestone

Comments

@fschutt
Copy link
Contributor

fschutt commented Nov 29, 2022

Currently create-obj just creates a static_defs.h and a wasm.h file in the current directory whereas create-exe consumes this file. These tests are reliant on the current directory, so they break very easily if you run them from any other directory.

Currently this test will fail:

make build-wasmer
WASMER_DIR=./package 
    cargo llvm-cov --workspace --lcov 
    --output-path lcov.info 
    --features cranelift,singlepass,wasmer-artifact-create,static-artifact-create,wasmer-artifact-load,static-artifact-load,webc_runner 
    --exclude wasmer-integration-tests-ios

... because the static_defs.h is being generated, but not included in the create-exe. We need to find a way to make the interaction between static_defs.h and wasm.h as smooth as possible and also ideally not generate them in the current directory (since that might not be what the user wants). Also, we need to make tests more reliable by never assuming relative file paths, always canonicalize them and never rely on the current directory being stable (no ./blah.h)

For example, this file path needs to be fixed to be configurable:

&[std::path::Path::new("static_defs.h").into()],

... so that we can have an interaction between create-obj generating that static-defs.h file and create-exe consuming it.

@fschutt fschutt added the bug Something isn't working label Nov 29, 2022
@fschutt
Copy link
Contributor Author

fschutt commented Nov 29, 2022

Tracking in #3393

@fschutt fschutt self-assigned this Dec 6, 2022
@fschutt fschutt added this to the v3.2 milestone Dec 6, 2022
@syrusakbary
Copy link
Member

This was fixed by #3531

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working create-exe priority-high High priority issue
Projects
None yet
Development

No branches or pull requests

3 participants