Skip to content

Fix error handling for dump symbol graph #7141

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

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

neonichu
Copy link
Contributor

We were ignoring exit codes and output here, making the corresponding tests impossible to debug (and probably also making the command hard to use).

@neonichu neonichu self-assigned this Nov 29, 2023
@neonichu
Copy link
Contributor Author

@swift-ci please test

@neonichu
Copy link
Contributor Author

@swift-ci please test

@neonichu neonichu force-pushed the fix-dump-symbol-graph-error-handling branch from 5e3a032 to 77ac9aa Compare November 30, 2023 04:23
@neonichu
Copy link
Contributor Author

@swift-ci please test

@neonichu
Copy link
Contributor Author

Ah, this is kinda interesting! Looks like this is already broken on Linux, but because we didn't actually look at errors, we never noticed?

@neonichu
Copy link
Contributor Author

Actually, seems like it is also broken on macOS.

@neonichu
Copy link
Contributor Author

Ah yes:

let targets = try buildSystem.getPackageGraph().rootPackages.flatMap{ $0.targets }.filter{ $0.type == .library || $0.type == .executable }

This is wrong of course, because we do not provide any modules for executables unless there's a test target depending on them.

@neonichu
Copy link
Contributor Author

We'll need to merge #7143 first, so we don't always fail the existing tests.

We were ignoring exit codes and output here, making the corresponding tests impossible to debug (and probably also making the command hard to use).
@neonichu neonichu force-pushed the fix-dump-symbol-graph-error-handling branch from 77ac9aa to f60cf97 Compare November 30, 2023 17:41
@neonichu
Copy link
Contributor Author

@swift-ci please test

@neonichu
Copy link
Contributor Author

@swift-ci please test windows

@neonichu neonichu merged commit e8328ac into main Nov 30, 2023
@neonichu neonichu deleted the fix-dump-symbol-graph-error-handling branch November 30, 2023 20:37
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