-
Notifications
You must be signed in to change notification settings - Fork 43
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
pick, harvest and winnow functions exported from std should respect available systems #337
Comments
That's what #41 attempted to capture, as well.
This is one of the nix quirks that contributed to the need to have a special purpose CLI a la
We may reopen #41 again, but similar to Hive's collectors, we'd need a generic enough interface that can be implemented as part of |
Does not help when using I think we can make and overridable variant of winnow, for frameworks like std and hive to be able to add some context to the predicate, as now the predicate is being directly passed to the filterAttrs, or just to expand predicate parameters with more context Here is super-naive implementation of passing more context to winnow's predicate: Expanded winnow suits well into the |
Hm not sure about this. The
The problem I have is just that they aren't currently very strong contracts / guarantees inside the Nix community. But there may be a way that we can enforce them inside Paisano-based projects. If we do that, encouraging / enforcing the use of |
Problem is that Also, I do not think that filterting should be done on exclusively on paisano's side. To me, paisano provides solid abstractions, while std contains more specific implementations (blocktypes for example). As such, I do not think that paisano should differentiate between the types of harvested blocks at all and if we want to enforce some kind of contracts, frameworks like std and hive are a better place, because they have the blocktypes implementations.
Did not knew about the existence of lazyDerivation, but I do not think that we can enforce its usage, as lazyDerivations are indistinguishable from plain derivations. |
Currently, using either of these methods will uplift to all 4 systems ({darwin,linux}-{aarch64,x86_64}), while some block types may not support some of the systems.
A good example will be the "installable" block type, which are packages with
meta.platforms
attribute that is not respected.For example, GraalVM EE 21 (LTS) does not have a distribution for darwin-aarch64, but is available for other 3 platforms from the list.
The expected result would be that
nix flake show
would yield the correct output, respecting some meta attribute (meta.platforms
in case of installable/packages). However, now it will try to evaluate the package that is not possible to be built on some platforms.Another reasonable solution may be expanding winnow (or another special "harvester") will have an expanded predicate that will have a "system" attribute as well, so some functionality may be excluded for some systems where they do not make sense
The text was updated successfully, but these errors were encountered: