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

Replace symlinking in Travis build with npm scripts #338

Merged
merged 1 commit into from Apr 16, 2018

Conversation

@rcjsuen
Copy link
Contributor

commented Apr 13, 2018

In npm 5 (which is included in Node.js 8), symbolic links in the node_modules folder are now replaced by what's in the npm registry. This means that symbolic links that were originally created in .travis.yml prior to invoking npm install were getting deleted and replaced by packages from the npm registry. As a result, we now need to create the symbolic links after npm install has completed.

Pushing the linking magic down to an npm script instead of only performing this as part of the CI build also allows it to be reused for local development. This has the advantage of making local development more closely match what is happening in the CI builds.

Replace symlinking in Travis build with npm scripts
In npm 5 (which is included in Node.js 8), symbolic links in the
node_modules folder are now replaced by what's in the npm registry.
As a result, symbolic links between the language server packages now
need to be created after npm install has completed.

Pushing the linking down to being a npm script instead of performing
this as part of the CI build also allows it to be reused for local
development. This has the advantage of making local development more
closely match what is happening in the CI builds.

Signed-off-by: Remy Suen <remy.suen@gmail.com>
@dbaeumer

This comment has been minimized.

Copy link
Member

commented Apr 16, 2018

@rcjsuen thanks a lot for the PR. Very welcome.

@dbaeumer dbaeumer merged commit 9ac7662 into microsoft:master Apr 16, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla All CLA requirements met.
Details
@dbaeumer

This comment has been minimized.

Copy link
Member

commented Apr 16, 2018

I change the script to pure JS since there are cases where sub modules are hoisted and the links are missed.

@rcjsuen rcjsuen deleted the rcjsuen:symlink-fix branch Apr 16, 2018

@rcjsuen

This comment has been minimized.

Copy link
Contributor Author

commented Apr 16, 2018

@dbaeumer Ah, okay. Sorry I didn't catch that. Thanks for fixing the build problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.