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

Bug: Not able to interpret any code in playground #127

Open
Palanikannan1437 opened this issue Mar 4, 2024 · 7 comments
Open

Bug: Not able to interpret any code in playground #127

Palanikannan1437 opened this issue Mar 4, 2024 · 7 comments

Comments

@Palanikannan1437
Copy link

Palanikannan1437 commented Mar 4, 2024

Hey folks, thank you for building such a cool tool, this tool has greatly helped me in learning Rust, absolutely love it.

Description

I wanted to set it up locally and followed all the instructions as mentioned in "from source" section and was able to do it successfully without any errors.

  1. Getting permissions in the playground works properly
image
  1. But while trying to interpret ANY code (even the default one), gives me this error in the Stderr section
[2024-03-04T20:13:16Z DEBUG aquascope_front::plugin] Provided PluginArgs AquascopePluginArgs { should_fail: true, command: Interpreter }
[2024-03-04T20:13:16Z DEBUG rustc_plugin::cli] PLUGIN_ARGS={"should_fail":true,"command":"Interpreter"}
[DEBUG src/driver.rs:152 2024-03-04T20:13:16Z] - Running plugin...
[DEBUG src/plugin.rs:171 2024-03-04T20:13:16Z] - Running command with callbacks: ["/Users/palanikannan/.cargo/bin/aquascope-driver", "--crate-name", "aquascope_tmp_proj", "--edition=2021", "src/main.rs", "--error-format=json", "--json=diagnostic-rendered-ansi,artifacts,future-incompat", "--crate-type", "bin", "--emit=dep-info,metadata", "-C", "embed-bitcode=no", "-C", "debuginfo=2", "-C", "split-debuginfo=unpacked", "-C", "metadata=2f3c62f7dee3217d", "-C", "extra-filename=-2f3c62f7dee3217d", "--out-dir", "/private/var/folders/t3/2hkg5_r510d884kf_vpl4wbr0000gn/T/.tmpK1Vlgx/aquascope_tmp_proj/target/plugin-nightly-2023-08-25/debug/deps", "-C", "incremental=/private/var/folders/t3/2hkg5_r510d884kf_vpl4wbr0000gn/T/.tmpK1Vlgx/aquascope_tmp_proj/target/plugin-nightly-2023-08-25/debug/incremental", "-L", "dependency=/private/var/folders/t3/2hkg5_r510d884kf_vpl4wbr0000gn/T/.tmpK1Vlgx/aquascope_tmp_proj/target/plugin-nightly-2023-08-25/debug/deps", "--sysroot", "/Users/palanikannan/.rustup/toolchains/nightly-2023-08-25-x86_64-apple-darwin", "-Z", "identify-regions", "-Z", "mir-opt-level=0", "-Z", "track-diagnostics=yes", "-Z", "maximal-hir-to-mir-coverage", "-A", "warnings"]
[DEBUG src/plugin.rs:175 2024-03-04T20:13:16Z] - building compiler ...
error: the current sysroot was built without `-Zalways-encode-mir`, or libcore seems missing. Use `cargo miri setup` to prepare a sysroot that is suitable for Miri.

error: could not compile `aquascope_tmp_proj` (bin "aquascope_tmp_proj") due to previous error

I tried to run cargo miri setup and tried cargo make install-mdbook and cargo make playground post that but it doesn't seem to work even then, I'm getting the same output in the Stderr when trying to interpret any code. Could you please point me towards a potential fix? Thanks

@go-bears
Copy link

go-bears commented Mar 5, 2024

I'm seeing the same issue with the online web browser demo version.
I've tried accessing the visualizer in Firefox and Chrome, and I'm not seeing anything when I press the "interpret" or "permissions" buttons.

@gavinleroy
Copy link
Collaborator

I'm seeing the same issue with the online web browser demo version. I've tried accessing the visualizer in Firefox and Chrome, and I'm not seeing anything when I press the "interpret" or "permissions" buttons.

Thanks for reporting! The issue with the online playground is different from that reported above. It was already fixed and you should be able to enjoy Aquascope online again.

As for the local playground instance, there appears to be a misconfiguration in the repo. I'm currently traveling but will hopefully manage a fix in the next few days.

@Palanikannan1437
Copy link
Author

Hey there @gavinleroy, were you able to find some bandwidth for looking into the local playground issue 😅

@gavinleroy
Copy link
Collaborator

Yes, you need to make sure that the environment variable MIRI_SYSROOT is set to the path output by cargo miri setup. I've just updated the Makefile to do this, so if you pull it should work ™️. Let me know if that works for you locally.

@Palanikannan1437
Copy link
Author

Hey @gavinleroy, thank you so much for this. But even after this it doesn't seem to work 😅

What I did was,

  1. pulled the latest changes
  2. ran cargo make install-mdbook
  3. ran cargo make playground again

Am I missing something here?

@gavinleroy
Copy link
Collaborator

@Palanikannan1437 🤦 argh, my apologies. I inserted a typo into the Makefile, now that should be fixed and I've confirmed that others have been able to run the local playground as described. Please do let me know if that finally fixes the issue.

@eatPizza311
Copy link

Hi @gavinleroy
I am facing the same issue on a Mac machine, too.
I'm unsure why the MIRI_SYSROOT doesn't seem to be set up correctly.
The error message show that the "--sysroot", "/Users/.../.rustup/toolchains/nightly-2023-08-25-x86_64-apple-darwin" which is not reflex the result of cargo miri setup (It's "/Users/../Library/Caches/org.rust-lang.miri" on my end).
But after moving the line export MIRI_SYSROOT=$(cargo miri setup --print-sysroot) to the script field in [tasks.watch-server] section.
Everything works fine.
Maybe you can put the export command in both places?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants