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

Package cygwin #26

Merged
merged 13 commits into from
Oct 23, 2018
Merged

Package cygwin #26

merged 13 commits into from
Oct 23, 2018

Conversation

bryphe
Copy link
Collaborator

@bryphe bryphe commented Oct 22, 2018

This addresses #12 and #13 - we're taking a snapshot of Cygwin at build time, and including the .cygwin folder as part of our NPM package.

The NPM package ends up being ~120MB, but low on dependencies - and installs much faster than the equivalent operation via the cygwin installer.

A few changes that were needed:

  • Explicitly call out folders / files to include in package.json
  • Set the NODE_OPTIONS to use a larger heap size, otherwise the publish step fails with an out-of-memory error.
  • Delete items in the /var/cache folder, as cached packages are kept there, and we don't need those once they are unpacked - they'd just weigh the package down.

@ManasJayanth
Copy link
Member

@bryphe
Copy link
Collaborator Author

bryphe commented Oct 23, 2018

Does this also help with Windows: Upgrading / downgrading 'esy' always reinstalls cygwin layer?

Good question. This doesn't directly fix that issue, but it does mean that esy-bash is now more 'cacheable' - in that the NPM package can be cached in its entirety. Before, even if esy-bash was cached, the cygwin setup steps would always be run! So I believe this should improve the behavior when reinstalling esy.

For CI to get these improvements - we'll need to make sure the npm cache is specified in the travis/appveyor cache sections.

@bryphe bryphe merged commit 29fd344 into master Oct 23, 2018
@bryphe bryphe deleted the bryphe/package-cygwin branch October 23, 2018 01:22
bryphe added a commit that referenced this pull request Oct 23, 2018
* Create build-cygwin.js

* Update appveyor.yml / package.json

* Update build step to remove cache

* Continue fixing up files

* Temporarily tweak package name

* v0.0.100

* Update appveyor / build scripts

* Revert package.json

* Fix up comments

* Remove unused yarn install

* Try fixing appveyor

* Add space

* Add defaults folder

Bump version -> 0.2.24

Set version to 0.2.1
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.

2 participants