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

Fix "File name or extension is too long" error when merging profile data on Windows #203

Merged
merged 2 commits into from
Aug 6, 2022
Merged

Fix "File name or extension is too long" error when merging profile data on Windows #203

merged 2 commits into from
Aug 6, 2022

Conversation

messense
Copy link
Contributor

@messense messense commented Aug 6, 2022

See https://github.com/PyO3/pyo3/runs/7682300607?check_suite_focus=true

(never executed): The filename or extension is too long. (os error 206)

Switched to use -f to pass input files by a temp file.

src/main.rs Outdated
.filter_map(Result::ok);
let mut input_files = tempfile::NamedTempFile::new()?;
for path in profraw_files {
writeln!(input_files, "{}", path.display())?;

Choose a reason for hiding this comment

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

Maybe it would be more robust to assume valid UTF-8 here and fail loudly if that does not hold. I fear that Path::display performing a lossy translation of the paths could lead to hard-to-diagnose errors down the road.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Owner

@taiki-e taiki-e left a comment

Choose a reason for hiding this comment

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

Thanks!

@taiki-e
Copy link
Owner

taiki-e commented Aug 6, 2022

bors r+

@bors
Copy link
Contributor

bors bot commented Aug 6, 2022

Build succeeded:

@bors bors bot merged commit f7870c5 into taiki-e:main Aug 6, 2022
@taiki-e
Copy link
Owner

taiki-e commented Aug 6, 2022

Published in 0.4.14.

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.

3 participants