Skip to content
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

Can't get generated xcode project to compile #220

Open
WilliamIzzo83 opened this issue Feb 7, 2020 · 3 comments
Open

Can't get generated xcode project to compile #220

WilliamIzzo83 opened this issue Feb 7, 2020 · 3 comments

Comments

@WilliamIzzo83
Copy link

To test xchammer I tried the workflow on the Tailor sample code. I did the following:

cd sample/Tailor
xchammer generate XCHammer.yaml

And the output was the following

ERROR: /Users/William/Documents/work/clients/perceptolab/research/xchammer/sample/Tailor/BUILD:8:1: in ios_application rule //:ios-app:
Traceback (most recent call last):
	File "/Users/William/Documents/work/clients/perceptolab/research/xchammer/sample/Tailor/BUILD", line 8
		ios_application(name = 'ios-app')
	File "/private/var/tmp/_bazel_William/bc9f6e1936ebc1d1d725c6dd8e3ade19/external/build_bazel_rules_apple/apple/internal/ios_rules.bzl", line 160, in _ios_application_impl
		run_support.register_simulator_executable(<2 more arguments>)
	File "/private/var/tmp/_bazel_William/bc9f6e1936ebc1d1d725c6dd8e3ade19/external/build_bazel_rules_apple/apple/internal/run_support.bzl", line 28, in run_support.register_simulator_executable
		ctx.actions.expand_template(<4 more arguments>)
	File "/private/var/tmp/_bazel_William/bc9f6e1936ebc1d1d725c6dd8e3ade19/external/build_bazel_rules_apple/apple/internal/run_support.bzl", line 36, in ctx.actions.expand_template
		shell.quote(<1 more arguments>)
	File "/private/var/tmp/_bazel_William/bc9f6e1936ebc1d1d725c6dd8e3ade19/external/bazel_skylib/lib/shell.bzl", line 49, in shell.quote
		s.replace("'", "'\\''")
type 'NoneType' has no method replace()```

To mitigate this I changed the rules_apple.git repository tag to 0.19.0. At this point the project is generated but it won't compile. 
XCode output is the following:

:0: error: module map file 'tulsi-workspace/bazel-tulsi-includes/x/x/tailor.modulemaps/module.modulemap' not found
:0: error: module map file 'tulsi-workspace/bazel-tulsi-includes/x/x/tailor.modulemaps/module.modulemap' not found
:0: error: missing required module 'SwiftShims'


I'm using bazel 2.0.0

Thank you!
@bigbangvn
Copy link

bigbangvn commented Jun 2, 2020

Doesn't work as well with the same error (master branch):

'NoneType' value has no field or method 'replace'
ERROR: Analysis of aspect '@tulsi//:tulsi/tulsi_aspects.bzl%tulsi_sources_aspect of //:ios-app' failed; build aborted: Analysis of target '//:ios-app' failed
INFO: Elapsed time: 3.994s
INFO: 0 processes.
INFO: Build Event Protocol files produced successfully.
Tulsi: BazelInfoExtractionFailed

XCHammer: ** Completed read_aspects in 13.8220s
XCHammer: ** Completed generate in 13.8240s
swiftException(XCHammerSources.Generator.GenerateError.some(TulsiGenerator.BazelWorkspaceInfoExtractorError.aspectExtractorFailed("Bazel aspects could not be built.")))
The operation couldn’t be completed. (Commandant.CommandantError<XCHammerSources.CommandError> error 1.)

@WilliamIzzo83 did you fix it?

@WilliamIzzo83
Copy link
Author

Hi @bigbangvn

unfortunately I was not able to make it work. From what I gather the problem show itself with newer bazel versions. For me this was kinda of a showstopper because I had hard contraints about it. I tried to update the rules involved, but in the end I had to give up.

@rafe-g
Copy link

rafe-g commented Feb 3, 2022

In case this helps out anyone in the future, I ran into the same issue, for me, it was an issue with how xcode_project was being generated.

Specifically, i set:

        generate_xcode_schemes = False,

Doing this got things working for me.

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

No branches or pull requests

3 participants