-
Notifications
You must be signed in to change notification settings - Fork 25
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
Normalize line endings in .stderr
/.stdout
files if there is no .gitattributes
file
#177
Comments
The order of filters may be important. You can specify the backslash filter again at the end. Are you overriding the default filters by any chance? We do have Line 56 in 5898e04
|
It doesn't pick it up because of the mixed slashes in the path
Rust paths have this incredibly annoying property on windows where they don't correct the slashes, you can hack around that by changing https://docs.rs/marker_uitest/latest/src/marker_uitest/lib.rs.html#41 to something like p.s. this |
🤔 wait no, it should be picking it up https://regex101.com/r/fnT6rV/1 |
I've tried your suggestion and it seems to work, at least i have a green CI now |
AFAIK, I've only added new filters.
Ohhh, yeah, thank you! |
I appreciate the help, everything seems to work now :D @oli-obk Should I close this issue, since it was a misconfiguration, or do you think this path normalization should also be in ui_test? |
Yea I think I also have added workarounds for this issue. We could just normalize the PathBufs that end up getting printed (or used in filters) before doing so. |
I don't actually see why this is failing, https://github.com/rust-marker/marker-example-lints/blob/959fdbc6298e57bc4f16cfeee9983e9e36911ef8/tests/uitest.rs passes the test successfully for me on a windows machine. Also passes if I remove the two filters If I change it to verbose the path is there with the mixed slashes in:
|
That's weird, the windows CI of that branch failed though 🤔 Here is a link to the job: https://github.com/rust-marker/marker-example-lints/actions/runs/6417999196/job/17424884765 The logs weirdly don't show the actual diff, I just guessed that it was a related problem. The relevant part of the log
I've also tried to test if it was a problem with different line endings or something, but couldn't identify the error 🤔 |
That diff looks weird. Maybe this is line ending nonsense in git? https://github.com/oli-obk/ui_test/blob/main/.gitattributes was necessary in this crate due to dogfooding, but it seems to be an issue in general, even with compiletest... time to add it to the readme |
There are default filters to remove the |
It does, because the .stderr file will end up having them without the gitattributes file |
I've added a |
Aha, yeah that's it. |
$DIR
replacement for windows..stderr
/.stdout
files if there is no .gitattributes
file
Yea, when changing git attributes like that you need to refresh the worktree (I just did something like I tried adding stderr filters before, which works, until you bless and get no I can probably work around that, too somehow, but the git attributes seemed easier. I can add something that detects if the only difference is a |
That would be perfect. If users see that and don't use git, they can still manually add a filter, that replaces the line feeds with just a For testing, it could also be cool, to have an option to print invisible characters as well. Not sure, how easy this would be though and the use cases might be very limited as well :) |
Yea I tried this before, but it's a bit annoying for this crate's dogfooding |
Marker uses ui_test in the CI and runs them on Ubuntu, MacOS, and windows. The
$DIR
value replacement for paths works very well for unix-based systems with/
but struggles on windows. The default setup withui_test::Config::rustc(ui_dir)
, doesn't seem to replace windows paths.In the main Marker repo, it was sufficient to add the following filters:
However, the same filters don't seem to work on another lint crate, when ran on windows. This is the error output I get even with the filters:
I assume that this is just a configuration error somewhere on my end. However, it would be nice if the path replacement could be improved to handle windows better.
Replacing all
\\
with something else, is also not ideal, as it was pointed out in #89The text was updated successfully, but these errors were encountered: