-
Notifications
You must be signed in to change notification settings - Fork 13.3k
submodule detection for proper fix on #96188 #109848
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
Conversation
I feel like the approach to get submodules is good, but I don't think the code does the wanted thing. I haven't tested my theory, but I feel like you should cache the submodules list. This avoids a problem (I think) where the first path goes until the end of the file, and the second path does nothing, because the cursor is already at the end, and is not rewound. The other option would be to rewind the file, but it would be less efficient. |
File is 34 lines long :D And I don't think it will ever reach more than ~70. Doing proper caching will require keeping those values in the parent configuration within HashMap for O(1) access. Wouldn't that be overkill for this particular purpose? I would prefer forgetting the values once we finish the process here rather than keeping it in memory permamently. |
Just remember now, and even with HashMap O(1) will not be possible because we don't have the complete values https://github.com/rust-lang/rust/blob/0c95fc504e881c796bd1a042b72b1d4c445c47a5/src/bootstrap/builder.rs#L501 so we will need to iterate the values no mather what |
A HashMap is definitely overkill, I was thinking about keeping the Vec that you build. |
We can do that by adding it to Config, or require extra arg for |
31fab18
to
0f4ca79
Compare
Now it should be much better @albertlarsan68 |
There is already |
This isn't needed, I updated the existing |
1b73ce3
to
77dcd01
Compare
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.
r=me with the unwrap
changed to expect
This commit resolves an internal FIXME note within the bootstrap by implementing submodule detection. This is accomplished through an iterative process over the `.gitmodules` file. Signed-off-by: ozkanonur <[email protected]>
@bors r=albertlarsan68 rollup |
Rollup of 6 pull requests Successful merges: - rust-lang#107236 (Add T-bootstrap label to tools) - rust-lang#109847 (Only create graphviz nodes for reachable MIR bb's) - rust-lang#109848 (submodule detection for proper fix on rust-lang#96188) - rust-lang#109932 (Source code scrollbar) - rust-lang#109952 (Move comment about python2 closer to the place it's used) - rust-lang#109956 (Tweak debug outputs to make debugging new solver easier) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This commit resolves an internal FIXME note within the bootstrap by implementing submodule detection. This is accomplished through an iterative process over the
.gitmodules
file.r? @albertlarsan68