-
Notifications
You must be signed in to change notification settings - Fork 13
Adding swift support and hello world example #61
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
| @@ -0,0 +1 @@ | |||
| 6.0.0 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can't it use the repo's main .bazelversion, which is pinned to 7.0.0-pre.20221207.2? It doesn't work with Bazel 7?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we are not using versiob 7 but version 5.2.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, so what is https://github.com/EngFlow/engflow/blob/master/.bazelversion used for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, this PR is for another repository, not engflow. This is example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean, this will be used as an example, so you want it to be self-contained?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how to make it work with different version than the repo itself. So I added a workspace and its own .bazelversion. The repository .bazelversion is this: https://github.com/EngFlow/example/blob/main/.bazelversion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, sorry, I all this time didn't realize that this PR is on the example repo :-)
Now I'm wondering why the example repo is pinned to an old Bazel version...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking on moving to version 6. WDYT?
|
@ola-rozenfeld there is a conditional because the rules test environment handles things different in linux and macos: https://github.com/bazelbuild/rules_swift/blob/master/examples/xplatform/xctest/main.swift |
| @@ -0,0 +1 @@ | |||
| 6.0.0 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean, this will be used as an example, so you want it to be self-contained?
| @@ -0,0 +1 @@ | |||
| 6.0.0 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, sorry, I all this time didn't realize that this PR is on the example repo :-)
Now I'm wondering why the example repo is pinned to an old Bazel version...
About
Adding Swift support and hello world example.
Run with
cd swift bazel run //...Why a new workspace?
The current version of
rules_swift(1.5.0) is working withbazel 6.0.0. Upgrading tobazel 6.0.0in the repository makesrules_kotlinfail (only support up tobazel 5.3.0) and I could not make it work with a previous version ofrules_swift(1.2.0). Untilrules_kotlinsupports6.0.0we use a new workspace for the swift example. In principel, this is a valid setup for building on remote, i.e., different targets using different bazel versions, right?Progress #36