Navigation Menu

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 dependency list parsing in RustAsset for paths on Windows #2651

Merged

Conversation

lmorchard
Copy link
Contributor

@lmorchard lmorchard commented Feb 18, 2019

↪️ Pull Request

Fixes #2184

When importing a Rust asset on Windows, an error like this occurs:

×  Error writing to cache: ENOENT: no such file or directory, stat 'C:\Users\lmorc\devel\rust-wasm-play\src\C'

This appears to be an issue with how RustAsset attempts to parse a deps file using ":" - which fails on Windows because ":" is a part of file paths like C:\users\...

Switching that parsing to ": " seems to address the problem.

💻 Examples

Just following the basic Rust example from the docs

🚨 Test instructions

Build the example from the docs on Windows under PowerShell (e.g. not within a WSL Ubuntu Bash shell) - no error should occur.

✔️ PR Todo

  • Added/updated unit tests for this change
    • Sorry, I'm rather new to Parcel and didn't find existing unit tests for RustAsset.js to modify. But, since this was a one-character fix, I thought it would be more handy to submit the PR as-is 😟
  • Filled out test instructions (In case there aren't any unit tests)
  • Included links to related issues/PRs

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

Successfully merging this pull request may close these issues.

[Rust] Can't build simple project
2 participants