Skip to content

Test that including stdsimd as a submodule in libstd succeeds #602

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

Closed
wants to merge 12 commits into from

Conversation

gnzlbg
Copy link
Contributor

@gnzlbg gnzlbg commented Nov 22, 2018

So I'm not sure how thorough this test is - cc @alexcrichton is ./x.py check enough? it doesn't appear to catch the issue that @jethrogb ran into, but AFAICT the stdsimd submodule is being appropriately replaced and ./x.py succeeds =/

I haven't enabled this for mipsel and the thumb targets, but for all other targets this appears to work.

ci/run.sh Outdated
git submodule sync
./x.py clean

cp -r "${stdsimd}"/* src/stdsimd/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should use git to do the syncing. Also I'm pretty sure x.py will revert any non-committed changes you make to submodules

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To let git do the sync'ing, I have to update the .gitmodules to the repo of the code, then I have to go into src/stdsimd and fetch the repo, pull in the right commit, and then commit the upgrade of stdsimd anyways in the rust-lang/rust repo.

I thought it would just be easier to overwrite the stdsimd code in rust-lang/rust with the one that travis already checked out. I might need to commit the changes though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just do something like this:

cd src/stdsimd
git remote add CI ../../path/to/stdsimd
git fetch CI
git checkout (commit)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll give that a try. Doesn't one still need to update the .gitmodules file ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fatal: reference is not a tree: 129db7f

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that means you don't have the remote configured/fetched correctly. The code you have now looks nothing like I had suggested, I'm not sure if/how this would work.

Copy link
Contributor Author

@gnzlbg gnzlbg Nov 23, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code you suggested produced the exact same error. As I mentioned before, the .gitmodules of rust-lang/rust points to rust-lang-nursery/stdsimd and not to the CI branch. I think it has to be updated for any of this to work.

@alexcrichton
Copy link
Member

I personally feel like this is a bit overboard on the CI budget/complexity, I'm fine discovering these issues after the fact, they don't really come up all that often I think

@jethrogb
Copy link
Contributor

jethrogb commented Nov 23, 2018

I personally feel like this is a bit overboard on the CI budget/complexity, I'm fine discovering these issues after the fact, they don't really come up all that often I think

I don't agree with this. In fact, I think that any flow that gates landing things in rust master that could possibly be influenced by stdsimd should also be tested in stdsimd CI.

stdsimd's main purpose is to be a submodule of core/std. However, because stdsimd PRs are not tested in this combination, the chances are high that something will land that will break building core/std. This puts a large burden on the person who requires updates of stdsimd in core/std (because they need some bug fix or new feature to be included upstream): their upstream changes are potentially now blocked by changes made in stdsimd that have nothing to do with the stdsimd changes they want to include upstream. Instead, this responsibility should lie with the author of the broken code.

As for this not happening "all that often", two different core/std-breaking bugs (#599 and #603) were introduced in just the 3 weeks since stdsimd was last updated upstream.

@alexcrichton
Copy link
Member

@jethrogb I'm basically personally the architect of CI for crates like libc and rust-lang/rust. It's great to test things, and believe me when I say I don't undervalue it. I have had lots of experience with things like this, and this sort of integration is practically guaranteed to be far more work to keep running than it would be to fix regressions and not acutally effective at preventing all regressions. Preventing regressions like this sort of integration is just being vigilant and not refactoring every few weeks.

Updating any submodule in rust-lang/rust is a PITA because it turns out there's a lot of vectors to introduce subtle bugs. We just do the best we can with the resources we have.

@gnzlbg
Copy link
Contributor Author

gnzlbg commented Nov 23, 2018 via email

@alexcrichton
Copy link
Member

As another example of why we should not do this, I believe the motivational factor of #603 wouldn't have been caught by this. The bug there is in documentation, not in the standard library itself.

I'm gonna go ahead and close this as I feel relatively strongly this won't end up pulling its weight in the meantime, but we can always reconsider later!

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

Successfully merging this pull request may close these issues.

3 participants