Conversation
d8a17dd to
ffec7f1
Compare
|
I figured out a solution to the error. |
ffec7f1 to
f62fe36
Compare
raboof
left a comment
There was a problem hiding this comment.
Intent is 👍 , one question about the code, haven't tested.
flake-info/src/data/export.rs
Outdated
| #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] | ||
| #[allow(non_snake_case)] | ||
| pub struct Team { | ||
| members: Option<OneOrMany<Maintainer>>, |
There was a problem hiding this comment.
I'm not super familiar with this codebase yet, but I wonder if it wouldn't be simpler for this to be a Vec (or Option<Vec>) here?
There was a problem hiding this comment.
Would be much simpler, yes. Specifically Option<OneOrMany<T>> sounds like a complicated way to specify Vec<T>. Perhaps it has benefits when (de-)serializing.
There was a problem hiding this comment.
Option<OneOrMany<T>> is done in many other places so I used it because of that
There was a problem hiding this comment.
I had the impression that it is used in the contract between the 'nix side' and 'flake-info', but not between 'flake-info' and elasticsearch model - and that this struct is used for the latter. As said I'm not super familiar with this codebase yet, though, so I could be mistaken.
There was a problem hiding this comment.
Yeah, I'm not sure either. I think it does everything lol.
There was a problem hiding this comment.
is import.rs the 'nix side' and export.rs the 'elasticsearch side'?
my guess was that OneOrMany would support both "foo" and [ "foo" "bar" ] due to nix being flexibly typed, but we can be a bit more strict on our 'own' side.
There was a problem hiding this comment.
I have no idea lol.
|
NixOS/nixpkgs#400458 was just merged, we should get this PR before it hits nixos-unstable and entries disappear from https://search.nixos.org. |
|
I'm not a huge fan of merging this feature without figuring out whether that How have you tested this change? |
|
I tried testing this with the |
I haven't tried testing it because idk how to test this and the README doesn't help. |
so it works even for teams that don't have GitHub teams
|
The page now shows "This package has no maintainers. If you find it useful, please consider becoming a maintainer!" in the "Maintainers" section when the package has no individual maintainers but only teams - that might be something to fix as well? |
|
I have proposed two fixes for this PR in RossComputerGuy#1 and RossComputerGuy#2 |
meta.teams support: show team name
meta.teams support: fix export
|
Doesn't work, got this error: |
|
can you PR an update changing the |
|
Oh, I can't right now... I can in about 6 hours. |
Fixes #907
We should get this close with NixOS/nixpkgs#400458.
My lack of experience with rust got me some progress but I couldn't get past this error:
So whoever reviews this needs to know Rust. We need
membersto be a list because that's what it is in Nix. But it doesn't returnOneOrManyapplied to the mapped list.