Skip to content

NFC: Assert that we don't add llbuild commands with the same name twice #7698

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

Conversation

kateinoigakukun
Copy link
Member

@kateinoigakukun kateinoigakukun commented Jun 22, 2024

Add debug assertion to avoid llbuild command name conflicts.

Depends on #7695

Motivation:

One of the reasons we couldn't reveal #7695 issue for long time (at least past 2 releases) is that we overlooked name conflicts on addWriteLinkFileListCommand.

Looking into the manifest builder, some of the commands also forgot to assert name conflicts, so it was error-prone.

Modifications:

Add a convenience method to perform assertions consistently

Result:

NFC for release build. Just add debug assertions

@kateinoigakukun
Copy link
Member Author

@swift-ci test

@kateinoigakukun kateinoigakukun force-pushed the katei/assert-llbuild-cmd-name-conflict branch from 8c19aeb to 32bc365 Compare June 24, 2024 03:15
@kateinoigakukun
Copy link
Member Author

@swift-ci test

@rauhul
Copy link
Member

rauhul commented Jun 24, 2024

Out of curiosity does this catch any current bugs?

@kateinoigakukun
Copy link
Member Author

Fortunately, the current SwiftPM test suites didn't detect any bugs 😺

@kateinoigakukun
Copy link
Member Author

@swift-ci test Windows

@kateinoigakukun kateinoigakukun marked this pull request as ready for review June 24, 2024 07:37
@kateinoigakukun kateinoigakukun merged commit 2e270a1 into swiftlang:main Jun 24, 2024
5 checks passed
@kateinoigakukun kateinoigakukun deleted the katei/assert-llbuild-cmd-name-conflict branch June 24, 2024 08:07
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