-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
Update to Hyper 1 #524
Update to Hyper 1 #524
Conversation
@Byron, just wanted to get your early feedback. I have managed to make the API crates compile. At least, it passes for: make storage1-clean storage1 storage1-cargo ARGS=test It remains to update the CLI template. Is this something that would would be willing to accept, or is it not the direction you want to take? |
Thank you, the work looks very promising and I'd be happy if we could see it through. My recommendation is to get CI green first - the issues there seem to be unrelated to the CLI for now. And regarding the CLI, I believe to remember that they didn't compile before your change either, it degenerated (maybe CI isn't actually testing these), and getting them to work again would be greatly appreciated - maybe there are still useful to some. |
Now the CI fails at the CLIs. I will then tackle them next. |
I added storage1 to the CI list to show the error I am facing (was passing for the other ones on the list). Please take a look. Looks like there is some confusion regarding |
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.
Thanks a lot, this is great work and I think it is very, very promising!
That the CLI fails to compile for storage1
wouldn't even be a hold-up for this PR - the CLI was fully broken before this PR, and now it's only partially out of sync with the API with certain APIs even , I'd call that a huge improvement already.
With that said, I also don't know why it gets its typing wrong, maybe it's a split-brain issue somewhere?
However, there is one question I had when looking at a removal.
Further, did you managed to run cargo check
on all the APIs? Do they still work?
If so, I think we can try to get this PR merged and a new major release created.
Thanks again!
@@ -703,17 +698,6 @@ else { | |||
request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); | |||
% endif | |||
let mut req_result = { | |||
% if resumable_media_param: |
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.
Would this not be missing somewhere?
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.
I was planning to ask you about this. It was getting in the way, but I could not find how it was actually used. It looks like dead code. The way I see it is that should_ask_dlg_for_url
is always false. Or what is going on here?
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.
Right! I checked and the variable was false from the very beginning, so it could never have worked anyway.
Also something I just noticed is the 'assignment as side-effect of if-condition' dark magic that is performed here, and it's incredible that I was the author of this 😅.
In any case, I agree that under the circumstances, it should definitely be removed.
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.
Thanks a lot for following up!
From my point of view this would be ready to merge, unless of course you'd like to perform more testing or try to figure out how to fix that last remaining CLI generation issue.
It's entirely up to you.
@@ -703,17 +698,6 @@ else { | |||
request_value_reader.seek(io::SeekFrom::Start(0)).unwrap(); | |||
% endif | |||
let mut req_result = { | |||
% if resumable_media_param: |
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.
Right! I checked and the variable was false from the very beginning, so it could never have worked anyway.
Also something I just noticed is the 'assignment as side-effect of if-condition' dark magic that is performed here, and it's incredible that I was the author of this 😅.
In any case, I agree that under the circumstances, it should definitely be removed.
I have plugged in a few Python linters and cleaned up trailing whitespace and such. Also, clarified the CI workflow. I will try to regenerate all APIs and run the checks with the tests now. |
OK, I am able to generate all APIs and the following succeeds: make cargo-api ARGS=check |
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.
Thanks a lot for the exhaustive update and modernisation!
It's great that CI is now more granular, too. Maybe it could be split between API and CLI as well so it's more clear that only CI currently fails, and nothing else.
Maybe with all the time spent in the code-base, it will soon become more obvious why some CLIs don't yet build. It seemed like it must be a small thing… .
@@ -25,9 +25,3 @@ make: | |||
cargo: | |||
keywords: [protocol, web, api] | |||
doc_base_url: https://docs.rs | |||
dependencies: |
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.
It's a great idea to bring it all into the generator file.
Closes #459.