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

Implements RFC 8, fixing #606 #986

Merged
merged 1 commit into from
Oct 1, 2021
Merged

Conversation

jpgneves
Copy link
Contributor

@jpgneves jpgneves commented Mar 5, 2021

Make sure these boxes are checked! πŸ“¦βœ…

  • You have the latest version of rustfmt installed
$ rustup component add rustfmt
  • You ran cargo fmt on the code base before submitting
  • You reference which issue is being closed in the PR text

✨✨ πŸ˜„ Thanks so much for contributing to wasm-pack! πŸ˜„ ✨✨

Fixes #606, test included.

@simlay
Copy link
Contributor

simlay commented Jul 4, 2021

I've pulled this branch and tested it. It looks correct. @jpgneves could you pull in the recent changes from master?

@jpgneves
Copy link
Contributor Author

jpgneves commented Jul 6, 2021

I've pulled this branch and tested it. It looks correct. @jpgneves could you pull in the recent changes from master?

@simlay Thanks! I just rebased off of master.

@jpgneves
Copy link
Contributor Author

@simlay Not wanting to put undue pressure, is there any chance this can be looked at? Thanks!

Copy link
Contributor

@simlay simlay left a comment

Choose a reason for hiding this comment

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

I think this is good minus my one concern about removing the out_dir on every build.

@drager is the one who actually has merge/publish rights.

@@ -37,6 +37,7 @@ fn find_manifest_from_cwd() -> Result<PathBuf, failure::Error> {

/// Construct our `pkg` directory in the crate.
pub fn create_pkg_dir(out_dir: &Path) -> Result<(), failure::Error> {
let _ = fs::remove_dir_all(&out_dir); // Clean up any existing directory and ignore errors
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm. It's unclear if we need to remove the entire out directory. It may not be a big deal but say someone has some npm link going on pointed at the pkg directory, this may break it on every rebuild. I'm not sure if npm link does a symlink or a hard link (or is that not a thing with directories) which I think would be the difference.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I can see your point. npm link documentation claims they are symlinks.

That said, I don't feel strongly about this. I personally tend to want my tests to run on a as clean as possible environment to avoid spurious failures due to other tests leaving cruft behind, but I'm happy to remove this cleanup if that makes sense to you.

Copy link
Contributor

Choose a reason for hiding this comment

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

We're seeing errors that I think are in relation to this as reported at #1099 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

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

I've raised a PR to revert this change: #1110

@drager drager added this to the 0.11.0 milestone Sep 5, 2021
@simlay
Copy link
Contributor

simlay commented Sep 30, 2021

@drager bump.

Copy link
Member

@drager drager left a comment

Choose a reason for hiding this comment

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

Thank you!

@callensm
Copy link

Is there a timeline for when this RFC fix is going to be released? NPM dependencies still seem to be broken in v0.10.2.

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.

Implement support for RFC 8, transitive NPM dependencies
5 participants