-
Notifications
You must be signed in to change notification settings - Fork 248
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 binary case of Toolchain::install
#175
Comments
Toolchain::install
Toolchain::install
For the sub-task "build tarball with platform", how do we generalize the "build" operation for any package? Aren't we essentially re-creating Another option would be to use |
Also worth noting that on Windows, making a symlink to the "built" file might not be enough, since the executable might just be JS with a There's a package that npm and yarn use to create fake symlinks that are actually |
Those are great questions. The flip issue is that if we delegate to an actual global install, we still need a way to make the global package invisible to projects, in particular to make sure its binaries don't end up on the |
There's one part where I'm not sure if we're talking past each other: I didn't ever expect that we'd reimplement the build process. I meant we'd delegate to the package manager to do the build. What I had in mind was something like:
This isn't duplicating most of the functionality of the package manager, but it does duplicate the part that wires up the global binaries. Does that include the fake symlink stuff you're talking about? Maybe another possibility is to do the global install and then manually "uninstall" it by moving the results off to the side? |
I think I see where my misunderstanding was. I’m so used to thinking about working with packages from source, where unpacking and running But of course we’re not downloading the source, we’re downloading the bundled npm package, which will be ready to go if we just run The point about fake symlinks may still be needed, however, since the binaries will be in whatever state the package author wanted them in, so we’ll have to figure out how to call them from the shims. Also I don’t think the top-level binaries will be put into a |
Implement the
Tool::PackageBinary
case oftoolchain::install(tool: Tool)
:~/.notion/tools/inventory/packages/$package/
~/.notion/tools/image/packages/$package/
package.json || user default
)~/.notion/tools/user/installed/$package/package.toml
~/.notion/tools/user/bins/
for each tool in the package to point to~/.notion/tools/user/installed/$package/
~/.notion/exe/shim
May need to be implemented simultaneously with #176.
Depends on:
Toolchain::install
#174 GeneralizeToolchain::install
The text was updated successfully, but these errors were encountered: