-
Notifications
You must be signed in to change notification settings - Fork 803
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
Expand on xtask #2176
Expand on xtask #2176
Conversation
@@ -227,7 +227,7 @@ def test_datetime_typeerror(): | |||
|
|||
|
|||
@given(dt=st.datetimes(MIN_DATETIME, MAX_DATETIME)) | |||
@example(dt=pdt.datetime(1970, 1, 2, 0, 0)) | |||
@example(dt=pdt.datetime(1971, 1, 2, 0, 0)) |
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 had to do this to stop it from raising OSErrors on windows...not sure what's with that.
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.
Possibly related to #1339?
Hhhmmm, I think #2163 (comment) proposed to move all xtasks into a repository-level noxfile instead. Personally, I think using nox is preferable as having the xtasks implemented in Rust is not really beneficial when we require the presence of a Python environment in any case. Especially, the compilation step can be skipped when these are implemented in Python. |
Hmm, I hadn't noticed that. |
Thanks! Yes I have gone back-and-forth on
Probably you need to update your cargo-llvm-cov version. (The error message when the command errors is a bit rubbish, sorry!) |
PyPy 3.7 segfault is very interesting. I wonder if that's reproducible or flaky... |
I think they are solving a different problem though, i.e. bootstrapping without a Rust compiler already available (and no fixed requirement on Python for other reasons).
There is also the option of using just a Python script for the xtasks without nox. (This is my personal favourite for projects which require Python for other reasons.)
It is not a CI runner, but on my machine a fresh build takes 30 seconds. I suspect this is mostly due to using proc-macros, i.e. structopt. |
In case you don't know, you should try pipx: |
Seems to be reproducible, other PRs are hitting it too.
For me it's about 20 seconds, but only 7 seconds if it can use artefacts from earlier |
Yeah, that is quite annoying. But structopt and clap 2 is still pretty good :)
On the other hand most pull requests don't touch on the python tests, so running python tests is unlikely to be helpful. The parts that tend to fail most (formatting, cargo test etc) don't need |
Agreed. I"m happy to proceed with merging this, I don't think there's enough of a difference between |
Additionally I'd prefer to not (initially) require contributors to install anything to get started. I know installing nox and/or black is pretty easy but it's a speed bump nonetheless. |
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.
Looks good to me, thanks! Just a few quick questions, feel free to merge after they're responded to.
Also, to-do list at the top also mentioned Contributing.md
, did that still need updating?
} | ||
|
||
#[derive(StructOpt)] | ||
pub struct DocOpts { |
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.
How do you feel about having this in doc.rs
, and similar for CoverageOpts
? I guess arguments can be made to put here or in the respective subcommand files.
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'd rather have it in cli.rs, it feels like it belongs there imo
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.
Looks great to me! Thanks again for doing this, it's a lovely improvement to our automations and I'll be glad for cargo test
to complete without erroring 🙂
This builds on the work @davidhewitt did earlier 😀
Todo:
Error: expected '=' in each line of output from llvm-cov show-env
🤔 )