paketo-buildpacks / node-module-bom

Apache License 2.0
1 stars 1 forks source link

Support custom stacks #132

Open ghost opened 2 years ago

ghost commented 2 years ago

Is there anything preventing this buildpack from supporting custom stacks? I'm working on a custom stack based on RHEL and I get this error when trying to include the node buildpack in my custom builder:

ERROR: validating buildpacks: buildpack paketo-buildpacks/node-module-bom@0.4.2 does not support stack com.my.custom.stack

I think a similar change is being implemented for the go buildpack at the moment. https://github.com/paketo-buildpacks/go/issues/651#issuecomment-1260080543

Essentially, I'm asking for these lines be added to the end of buildpack.toml and metadata.dependencies be updated accordingly:

[[stacks]]
  id = "*"
sophiewigmore commented 2 years ago

Hey @ben-galusha, I think it depends on if the CycloneDX BOM tool that the buildpack installs will work on any stack. Buildpacks that provide dependencies such as this one are difficult to move over to the * stack because it implies that the dependency can work on anything. Maybe it'll just work but some investigation is needed.

For example, the Cpython buildpack provides python. It recently moved over to the * stack but had a bunch of new logic implemented to compile the python dependency at build-time depending on the stack to guarantee compatibility.

All this is to say, I don't think we can just move this buildpack to the * stack, it will depend on how the dependency needs to be handled! Perhaps @paketo-buildpacks/nodejs-maintainers have more insight into a plan for this.