-
Notifications
You must be signed in to change notification settings - Fork 75
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
Feature Request: Xcode project lock file #2572
Comments
Interestingly we had various forms of this over time, but it was just when it was absolutely needed (such as target ids changing, so builds wouldn't do what you expected). It's now down to a single check: https://github.com/MobileNativeFoundation/rules_xcodeproj/blob/f3a9cf3587d9968ef3a7d833d072b2ecac0c6404/xcodeproj/internal/templates/bazel_build.sh#L131-L161 Some of the previous checks were expensive to calculate, so I'm glad they are gone. A benefit of BwB mode is that you don't need to regenerate for a lot of reasons, the build will still work. Technically some changes will lead to indexing being off until a regen though. I feel that any check that would satisfy this request would be pretty sensitive: if the project would change at all, it would throw a warning. I guess if it's opt in, that's fine, but I'm not sure that anyone would actually want to use it? (though if it could be a warning versus a failure, maybe?) |
Ah well then thats even better, our users tend to think they need to regenerate a lot because they're used to old CocoaPods style changes to spec causing invalid projects if not re-generated. We'll just need to work on education here. If we already handle the cases where the build will be fine, then I don't think I'd need anything else personally so thank you for clarifying! |
Please do let me know, by a comment here, if you run into any situations where a project regen did fix a build. I only know of one, where the rules_xcodeproj dependency itself was updated, causing a mismatch on the generated |
I found one. If you delete the
We should add something to |
@cgrindel the error above is similar to the one you saw in your rules_swift_package_manager integration tests. What was causing it for you? |
Interesting. I have not chased it down. The PR merged because I updated it with the latest from This is the test script for the example that was failing. Could there be some weird interaction with cached files? I am struggling to understand why the problem went away with the Bazel upgrade. |
Consider some lockfile-like mechanism which can ensure to some degree when the project needs to be regenerated.
There are times when the project needs to be re-generated, to get BUILD file changes, target changes, etc. It would be good to have the build fail with some warning when this is detected to be required.
This will better surface errors that would be fixed by a regeneration.
The text was updated successfully, but these errors were encountered: