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(core): provide better error message if we cannot read a file when finding imports #19809

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

Cammisuli
Copy link
Member

Current Behavior

When trying to read files that are not valid utf-8, Nx panics without giving more information on which file is invalid

Expected Behavior

Invalid files are included in the error message

Related Issue(s)

Fixes #19615

@Cammisuli Cammisuli requested review from a team as code owners October 23, 2023 20:16
@vercel
Copy link

vercel bot commented Oct 23, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Oct 24, 2023 2:09pm

@@ -592,7 +597,7 @@ fn find_imports(project_file_map: HashMap<String, Vec<String>>) -> Vec<ImportRes

files_to_process
.into_par_iter()
.filter_map(process_file)
.filter_map(|file| process_file(file).transpose())
.collect()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we return 1 error with a list of all the failed files?

@Cammisuli Cammisuli enabled auto-merge (squash) October 24, 2023 14:16
@Cammisuli Cammisuli merged commit 2c850cf into nrwl:master Oct 24, 2023
2 checks passed
@Cammisuli Cammisuli deleted the fix/19615 branch October 24, 2023 15:00
FrozenPandaz pushed a commit that referenced this pull request Oct 25, 2023
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NX Daemon process terminated and closed the connection
2 participants