-
Notifications
You must be signed in to change notification settings - Fork 76
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 max request size #64
Conversation
hmm my version and yours of rustfmt are not in sync |
The struggle is real. This is how we attempted to work around this: We pinned down a specific version because we found the spurious changes to be annoying: |
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.
@davepacheco looks good to me
Cool! Thanks for doing this. What do you think about using the Default trait for Yes, I think it would be great to add the other two fields here (definitely not a blocker for this PR). |
Can’t implement default on a type like usize want me to make a new type for it |
8af802f
to
ee4c7fe
Compare
Did that :) |
I reckon we could provide a manual implementation of Then you could... let cfg = ConfigDropshot {
bind_address: "127.0.0.1:0".parse().unwrap(),
..Default::default()
}; ... and you'd be proofed against future additional fields. |
530cda7
to
503ad18
Compare
Yeah, I was talking about implementing Either way is okay right now but it looks like both style and the test suite aren't passing. Are there tests for the new change? I don't see them but maybe it's exercised by the tests that are failing? |
Oh gotcha I’ll fix that! My bad!
…On Mon, Dec 7, 2020 at 8:53 AM David Pacheco ***@***.***> wrote:
Yeah, I was talking about implementing Default for ConfigDropshot, not a
new type. (I don't have a feeling either way about using a new type here.)
This would make it easy for us to provide defaults for other fields in the
future. (I wonder if it would make it harder for us to force people to
specify fields for which it doesn't make sense to have a default?)
Either way is okay right now but it looks like both style and the test
suite aren't passing. Are there tests for the new change? I don't see them
but maybe it's exercised by the tests that are failing?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#64 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALA23G3ODKL7IALSHG5CV3STUCB7ANCNFSM4ULPBRDQ>
.
|
Also those tests fail for me on master so I wonder if it's something with my setup..? Will look into it. |
Okay re-did this so that it is Default on DropshotConfig. Also sorry about the fmt changing.... |
9cdd63c
to
caeb818
Compare
Signed-off-by: Jess Frazelle <[email protected]>
caeb818
to
9e312ba
Compare
There was a warning: ``` warning: panic message contains a brace --> dropshot/src/router.rs:121:67 | 121 | "HTTP URI path segment variable missing leading \"{\"" | ^ | = note: `#[warn(panic_fmt)]` on by default = note: this message is not used as a format string, but will be in a future Rust edition help: add a "{}" format string to use the message literally | 121 | "{}", "HTTP URI path segment variable missing leading \"{\"" | ^^^^^ ``` This fixes that. Signed-off-by: Jess Frazelle <[email protected]>
Signed-off-by: Jess Frazelle <[email protected]>
Signed-off-by: Jess Frazelle <[email protected]>
Signed-off-by: Jess Frazelle <[email protected]>
bbdaf68
to
fb31766
Compare
Also I had to run the tests with |
also I am sure it's there for a reason but what do you think about removing the "version" line from the rustfmt file? that's how I was able to fmt locally, but I didn't commit that change |
That was how we ensured that we didn't wrestle over formatting. At least at the time we found that recent changes in rustfmt impacted our code. I think this is what we used previously:
If you're using vscode, it should "do the right thing" I think it would be very reasonable to update the version number in the rustfml.toml to reflect a more recent version; you'll want to update |
.. and to be clear: this all is pretty jank and we wish that there was some more reasonable way to ensure a consistent formatting of code. For example, it would be cool if the Cargo.toml could depend on a specific rustfmt version and use it. The version in rustfmt.toml which acts only to induce failures ... sucks. |
Bleh I’ll just skip it I’m on nightly as well
…On Mon, Dec 14, 2020 at 3:47 PM Adam Leventhal ***@***.***> wrote:
also I am sure it's there for a reason but what do you think about
removing the "version" line from the rustfmt file? that's how I was able to
fmt locally, but I didn't commit that change
That was how we ensured that we didn't wrestle over formatting. At least
at the time we found that recent changes in rustfmt impacted our code. I
think this is what we used previously:
rustup install nightly-2020-06-02
rustup run nightly-2020-06-02 rustfmt <file>
If you're using vscode, it should "do the right thing"
I think it would be very reasonable to update the version number in the
rustfml.toml to reflect a more recent version; you'll want to update
.vscode/settings.json and .github/workflows/rust.yml as well.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#64 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALA23D7FLJVTWD5HLRTZUTSU2PXTANCNFSM4ULPBRDQ>
.
|
Thanks for doing this and sticking with it! I like the |
No worries woohoo
…On Tue, Dec 22, 2020 at 8:33 AM David Pacheco ***@***.***> wrote:
Thanks for doing this and sticking with it! I like the Default impl and
the expected test output changes look like the usual compiler churn
(unfortunately), so that's expected too. Sorry it took so long for me to
circle back on this.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#64 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALA23EJXKACI4ZAFV3GSETSWDC53ANCNFSM4ULPBRDQ>
.
|
Did one for #23, would you like all those fields to be the same way?