Skip to content

Checkout Swift LLVM Bindings repo #691

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
Aug 17, 2022
Merged

Checkout Swift LLVM Bindings repo #691

merged 1 commit into from
Aug 17, 2022

Conversation

egorzhdan
Copy link
Contributor

This is similar to swiftlang/swift#60193.

@egorzhdan
Copy link
Contributor Author

@swift-ci please test

@justice-adams-apple
Copy link
Collaborator

Hi @egorzhdan , this will likely break things on any branch that isn't main because there won't be a repository defined for that specific branch. Essentially a key error will occur in python.

For example, this is how our CI is run on 5.7:

./run release/5.7 --assertions --build-config=debug

** RUN **
Traceback (most recent call last):
  File "swift-source-compat-suite/./run", line 325, in <module>
    sys.exit(main())
  File "swift-source-compat-suite/./run", line 35, in main
    common.clone_repos()
  File "swift-source-compat-suite/common.py", line 188, in clone_repos
    branches[swift_branch]['swift-llvm-bindings'], workspace
KeyError: 'swift-llvm-bindings'

Is your intention to only clone this repo when building/testing the main branch?

@justice-adams-apple
Copy link
Collaborator

One thing to note is that you are in a particular position where your changes will not be tested by the PR CI jobs because we run with --skip-clone when invoking run.py

We defer the dependency cloning to the build-script itself

@egorzhdan
Copy link
Contributor Author

Thanks @justice-adams-apple!

Is your intention to only clone this repo when building/testing the main branch?

Yeap, this is correct. This repo will only be used with main, and with release branches that will be created in the future.

One thing to note is that you are in a particular position where your changes will not be tested by the PR CI jobs because we run with --skip-clone when invoking run.py

Oh interesting, I didn't realize that. I'll make sure to test this locally.

I was mostly trying to mirror another patch that added the "swift-experimental-string-processing" repo (#635), since our checkout scheme is quite similar, but I'll double check that this doesn't produce errors for existing release branches.

@egorzhdan egorzhdan force-pushed the swift-llvm-bindings branch from 1fbd344 to 68e158f Compare August 8, 2022 17:01
@justice-adams-apple
Copy link
Collaborator

@egorzhdan If you needed this in quickly you could likely just add swift-llvm-bindings': 'stable/20211026', to each of the repo->branch maps like you did with main.

However this will just mean that the release branches which don't need to actually clone that repository will do so anyway. It's a quick way to get this in without breaking things, but adds some small overhead of cloning a project unnecessarily.

The proper way would probably be to update the clone_repos() method of common.py with some logic to figure out which branch needs which set of projects based off the dictionary in question

Happy to help out either way, just let me know

@egorzhdan egorzhdan force-pushed the swift-llvm-bindings branch from 68e158f to e6cc93f Compare August 12, 2022 11:56
@egorzhdan
Copy link
Contributor Author

@justice-adams-apple I tweaked the clone_repos() logic slightly to make sure it doesn't try to checkout swift-llvm-bindings for the existing release branches. I'll run this locally to make sure it doesn't break something else. Could you please take another look at this patch?

@egorzhdan
Copy link
Contributor Author

@swift-ci please test

Copy link
Collaborator

@justice-adams-apple justice-adams-apple left a comment

Choose a reason for hiding this comment

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

LGTM. I think this may become a bit complex if future releases all have a varying degree of repositories, but I'll address that when it happens.

I think the simplicity of this works for now. Thanks for the fix!

@egorzhdan egorzhdan force-pushed the swift-llvm-bindings branch from e6cc93f to adc56c0 Compare August 17, 2022 10:27
@egorzhdan
Copy link
Contributor Author

Thanks @justice-adams-apple!

I updated the branch name after rebranch.

@egorzhdan
Copy link
Contributor Author

@swift-ci please test

@egorzhdan egorzhdan merged commit 142cf91 into main Aug 17, 2022
@egorzhdan egorzhdan deleted the swift-llvm-bindings branch August 17, 2022 12:38
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.

2 participants