-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix panic in dagreader with raw nodes #3403
Conversation
Ooops, I broke tests. |
License: MIT Signed-off-by: Jakub Sztandera <[email protected]>
License: MIT Signed-off-by: Jakub Sztandera <[email protected]>
License: MIT Signed-off-by: Jakub Sztandera <[email protected]>
5b41fd6
to
1817d10
Compare
Should be fixed. Let's see CI run. |
License: MIT Signed-off-by: Jakub Sztandera <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch and fix @Kubuxu, what would I do without you :)
Before we merge this, lets dry it up a bit, the overlap between the old NewRNSC stuff and the bufDagReader code seems a bit off.
"io" | ||
) | ||
|
||
type bufDagReader struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't we go ahead and replace all of the NewRNSC
stuff with this now? It seems weird that they both serve roughly the same purpose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the interface of DagReader supersedes RSC and bufDagReader is nop-closers on bytes.
} | ||
dr.linkPosition++ | ||
|
||
switch nxt := nxt.(type) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should just call NewDagReader
now, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really, as cases for Dir, metadata and symlinks are a bit different.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handled it a bit differently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure? They look like the same piece of code...
License: MIT Signed-off-by: Jakub Sztandera <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, i get it now. LGTM!
This doesn't resolve issue yet, I have to refactor a bit so and I want to run CI over this refactor.
Resolves #3399