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

Add test for remapping paths #1786

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Add test for remapping paths #1786

wants to merge 2 commits into from

Conversation

brson
Copy link
Contributor

@brson brson commented Dec 11, 2024

Closes #1704

What

Adds a test case that absolute paths embedded in the wasm by rustc are remapped to relative paths, as implemented previously in #1594

Why

Previously implemented feature needs tests.

Known limitations

This will have a minor merge conflict with #1736


This adds the eth_abi example as a test fixture. It is the project I use to test the remapping feature. Not all soroban projects exhibit the problem of embedding absolute paths; this test is implemented such that it both confirms that eth_abi exhibits the problem, and stellar-cli fixes it.

Comment on lines +194 to +200
#[derive(Eq, PartialEq, Copy, Clone)]
enum Remap {
Yes,
No,
}

fn run(contract_name: &str, manifest_path: &std::path::Path, remap: Remap) -> bool {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL this pattern 👏🏻.

@leighmcculloch leighmcculloch enabled auto-merge (squash) December 20, 2024 08:29
@leighmcculloch
Copy link
Member

@brson Thanks for following up with this test!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog (Not Ready)
Development

Successfully merging this pull request may close these issues.

Add test case for remapping of absolute paths in panic messages
2 participants