Skip to content
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

Break circular dependency between http and testing crates #2668

Merged

Conversation

itowlson
Copy link
Contributor

I'm not sure quite what was going on here (well, that's always a reassuring start to a PR) but updating to latest main made rust-analyser weird and unresponsive and unwilling to load updated dependencies. There were a lot of errors in the log about a circular dependency. I couldn't see where the http->testing dependency was used, and when I broke it, nothing seemed to fail, and rust-analyser seemed a lot happier. So here it is - if I'm missing something, please let me know (if CI doesn't tell me first!).

(The change revved a bunch of unrelated stuff in Cargo.lock. I'm not sure if that's anything we need to worry about but just so you know.)

@itowlson itowlson requested a review from rylev July 22, 2024 01:26
@itowlson itowlson force-pushed the break-circular-dependency-spin-http-spin-testing branch from fdc30a1 to 53a2b8d Compare July 22, 2024 01:58
@itowlson
Copy link
Contributor Author

The first take on this PR failed because something brought in a new version of rustls which in turn brought in an AWS crate (!), which refused to compile in CI because it objected to the cc compiler. I am trying pinning conformance-test to a SHA instead of main (and, for now, have chosen a SHA before the latest commit, to see if that fixes it; it does seem to remove the AWS dependency from the lockfile but we shall see). Apologies @rylev for possibly fouling up what you are trying to do with the conformance-test integration (but of course I will not commit any change of this nature without your say-so!).

@itowlson itowlson force-pushed the break-circular-dependency-spin-http-spin-testing branch from 53a2b8d to 1c8fb60 Compare July 22, 2024 02:22
@itowlson
Copy link
Contributor Author

Revved it to the latest commit on conformance-tests and somehow that didn't seem to bring back the AWS dependency so heaven knows where that came from. Maybe the main pointer was picking up some crazy local cache thing while generating the lockfile. Anyway pushed with that later rev and WE SHALL SEE.

@itowlson
Copy link
Contributor Author

Okay I am not sure what is going on with that AWS library (aws-lc-sys) that refuses to compile on cc. It's not associated with conformance-tests, because I can bring conformance-tests to the latest commit and it's grand. But as soon as run cargo update, the library appears. It's a dependency of rustls 0.23.11, which gets roped in by reqwest 0.12.5. (Everything else we have is happy with rustls 0.22, which doesn't have the problem dependency.)

The cc build issue was raised in a now-closed issue with the rustls maintainers, whose reponse was basically "sucks to be you." So it's not gonna be fixed, and we can't avoid running cargo update forever! So the fix is really to stop CI using cc - it compiled locally for me on WSL so evidently there is some different default between my Rust and CI Rust.

@rylev After determining that AWS was unrelated to conformance-tests, I tried resetting the conformance-tests dependency back to main, but once again rust-analyser started complaining with the errors:

image

So I am leaving this PR with the pinned SHA. But happy to take your guidance on this. Sorry for all the faff.

Copy link
Collaborator

@rylev rylev left a comment

Choose a reason for hiding this comment

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

Sorry for the hassle here! I'd actually like to get away from using branch in the Cargo.toml and instead pin to specific revs. I've done this in my branch here: #2663, so I think this is totally fine.

@rylev
Copy link
Collaborator

rylev commented Jul 22, 2024

I'm going to merge this (the CI failure is a known issue and unrelated to the change here).

@rylev rylev merged commit ee6a267 into fermyon:main Jul 22, 2024
16 of 17 checks passed
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.

2 participants