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

[Making aegir smaller] Add support for pkg/pkg-bundle #262

Closed
wants to merge 4 commits into from

Conversation

mkg20001
Copy link
Contributor

@mkg20001 mkg20001 commented Sep 16, 2018

This adds the missing pkg.scripts field to allow aegir to be bundled using pkg/pkg-bundle which is part of #215.
This is part of an effort to write https://github.com/mkg20001/aegir-bundle which depends on writing https://github.com/mkg20001/pkg-bundle
Note: Currently WIP, the CLI isn't working properly yet.

Commands that work:

@mkg20001 mkg20001 mentioned this pull request Oct 1, 2018
4 tasks
@daviddias
Copy link
Member

Same feedback from #216 (comment) applies to this one, @mkg20001.

@mkg20001
Copy link
Contributor Author

mkg20001 commented Oct 2, 2018

@diasdavid I will squash the commits once things start somehow working because currently some fixes are duplicated (for ex. the eslint fix) anyways and for now I'm just trying to make it work. I will clean the duplicate fixes later.

@mkg20001
Copy link
Contributor Author

mkg20001 commented Oct 5, 2018

I don't think I'll be able to finish this alone. Most of the work is in https://github.com/mkg20001/pkg-bundle which is a fork of pkg that uses the existing bundling code to create single-file bundles, instead of node executables like pkg did and the other part of the effort goes into https://github.com/mkg20001/aegir-bundle which is handling the bundling of aegir and retrieving/executing of the bundle.
Maintaining, or rather writing it is hard as it's basically messing with node's internals. Sure, it's possible to write something like this cleanly but I simply don't have the time right now to focus on so many things and also do each of those things great.
Giving this endeavor up doesn't seem like a wise choose considering it isn't far from completion, but I don't think I can and should be the only one putting work into this.

So to make it short: Would there be any members of the IPFS team/maintainers of aegir/other people that would like to help me finish this? Remember that this might make a huge impact on installation time and performance of aegir which could make all of IPFS's contributors life easier.

@mkg20001 mkg20001 changed the title Add support for pkg/pkg-bundle [Making aegir smaller] Add support for pkg/pkg-bundle Oct 10, 2018
@mkg20001
Copy link
Contributor Author

// cc @ipfs/dx

@victorb
Copy link
Member

victorb commented Oct 10, 2018

Maintaining, or rather writing it is hard as it's basically messing with node's internals

Yeah, that doesn't sound very fun nor maintainable in the future as it'll be breaking often.

I think an easier effort right now (with maybe not the same amount of impact but at least easier to do) is to go through the top-level dependencies and try to remove the biggest ones or find other ways of installing them to reduce the disk space.

The only clear decision I will make is that the DX WG won't take ownership over this specific change as it'll be too much work at this point. Maybe there are other JS/NodeJS devs more excited about this and want to implement it?

@mkg20001
Copy link
Contributor Author

mkg20001 commented Oct 10, 2018

Maintaining, or rather writing it is hard as it's basically messing with node's internals

Yeah, that doesn't sound very fun nor maintainable in the future as it'll be breaking often.

It should be noted though that https://github.com/zeit/pkg has not needed many changes in a long time and most of the changes pkg-bundle would need, would come from upstream, so rebasing and testing would be the only maintaince thing that would be necessarry to do.

considering it isn't far from completion

There is only a few bugs with the child_process transformer that prevent things such as webpack/mocha from running correctly. Once these are solved the CLI should just work. (Considering I didn't need to change a single line in aegir's code so far to get lint-commits and docs cmds to work, I don't expect this to break soon. The only changes I think will be necesarry would be to the test cmd to spawn nyc/mocha in a way that pkg-bundle could detect that the executable is inside the bundle and spawn that using the wrapper)

@hugomrdias
Copy link
Member

old pr gonna close this, feel free to reopen

@hugomrdias hugomrdias closed this Jul 12, 2019
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.

4 participants