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

Customize the layering strategy #9

Closed
grahamc opened this issue Feb 18, 2022 · 1 comment · Fixed by #15
Closed

Customize the layering strategy #9

grahamc opened this issue Feb 18, 2022 · 1 comment · Fixed by #15

Comments

@grahamc
Copy link
Collaborator

grahamc commented Feb 18, 2022

From #4:

Currently, packages are split into layers based on how often they are referred to by other packages. But the reality for Rails is that most changes happen in gems and the source code, and not in the system dependencies. The source code and gems get stuck in that big final layer.

Ideally, we could customize layers the following can get their own layers:

  • individual gems + deps
  • compiled assets (output can be different without changes to Ruby code)
  • Ruby code (which can change without modifying the asset output)

Here's a related promising PR: NixOS/nixpkgs#122608

@samueldr
Copy link
Collaborator

Noting here that while NixOS/nixpkgs#157670 seems relevant, and might help in many situations, it won't provide the desired control over layers. It only allows ensuring specific layers are made, dependencies of these layers may still be pushed in the "upper-most" (last) layer.

So e.g. having app.wrappedRuby in an explicit layer does not ensure all of its dependencies are present in previous layers, or at the layer itself.

What this means is that the "catch-all" layer with leftovers may still change in uncontrollable undesirable ways, and it may still be the biggest layer depending on layering elsewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

2 participants