-
Notifications
You must be signed in to change notification settings - Fork 738
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
Schema/Target/Module name with spaces in it breaks generated code #2653
Comments
Hi @Narayane 👋🏻 - thanks for reporting the issue. This should be an easy fix, we'll get it into the next release. The workaround for now though is to use the Xcode-style of project name, i.e.: |
I dug into this issue a bit today and the fix is a bit more involved than I initially thought; I've updated the issue title to better reflect the scope of the problem. Configuration -
Configuration -
Note: This is an interesting configuration where the generated module Just Works™ because of the auto-generated Xcode project when editing the package with Xcode. The package name we generate into Package.swift can have a space in it but the module name we then reference in swift code needs to be underscored. It's anyone's guess whether it continues to work this way. Configuration -
|
Can we just solve this by sanitizing the I'm really not sure why we would need to keep the |
@Narayane - this is fixed, available on |
Bug report
When a Xcode project name contains a space character, relative module name contains an
_
character instead.In Test mocks files (Xxx+Mock.graphql.swift), for a project named
First Project
, imports are like:but it should be
Versions
Please fill in the versions you're currently using:
apollo-ios
SDK version: 1.0.3Steps to reproduce
Run
apollo-ios-cli generate
onto a Xcode project whose name contains a space.The text was updated successfully, but these errors were encountered: