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

Nanaimo parse error #26

Closed
photofroggy opened this issue Mar 28, 2018 · 8 comments
Closed

Nanaimo parse error #26

photofroggy opened this issue Mar 28, 2018 · 8 comments

Comments

@photofroggy
Copy link

Hello!

I'm getting a parse error when building an app using fastlane. Seems to be nanaimo complaining about a parse error. Not seeing anything myself that should really be causing a parse error and the project opens fine in xcode, so not sure where else to look.

  • OS: macOS Sierra (10.12.6)
  • fastlane 2.88.0
  • nanaimo 0.2.4
  • ruby 2.5.0

Here's the error:

[14:41:48]: �[31m[!] Invalid character ")" in unquoted string
   #  -------------------------------------------
   #  				XXXXXXXXXXXXXXXXXXXXXXXX /* ....framework */,
   #  //tag				XXXXXXXXXXXXXXXXXXXXXXXX /* ....framework */,
844>  			);
      			^
   #  			name = Frameworks;
   #  			sourceTree = "<group>";
   #  -------------------------------------------
�[0m

Seems to be referring to this block within the pbxproj file:

		XXXXXXXXXXXXXXXXXXXXXXXX /* Frameworks */ = {
			isa = PBXGroup;
			children = (
				XXXXXXXXXXXXXXXXXXXXXXXX /* ....framework */,
				XXXXXXXXXXXXXXXXXXXXXXXX /* ....framework */,
				XXXXXXXXXXXXXXXXXXXXXXXX /* ....framework */,
				XXXXXXXXXXXXXXXXXXXXXXXX /* ....framework */,
				XXXXXXXXXXXXXXXXXXXXXXXX /* ....framework */,
				XXXXXXXXXXXXXXXXXXXXXXXX /* ....framework */,
				XXXXXXXXXXXXXXXXXXXXXXXX /* ....framework */,
				XXXXXXXXXXXXXXXXXXXXXXXX /* ....framework */,
				XXXXXXXXXXXXXXXXXXXXXXXX /* ....framework */,
//tag				XXXXXXXXXXXXXXXXXXXXXXXX /* ....framework */,
			);
			name = Frameworks;
			sourceTree = "<group>";
		};

Note I have deliberately "censored" things here out of paranoia, but the format is maintained...

I would suspect it has something to do with the //tag comment at the bottom of the children block. Xcode doesn't seem to bat an eyelid about this comment line.

We did not seem to have this problem with nanaimo 0.2.3, but fastlane refuses to start if I downgrade nanaimo. I cannot share the full pbxproj.

I appreciate that maybe this ought to be a question on stackoverflow but to me it does look like maybe there is a bug with nanaimo's parsing. That closing bracket does not look out of place here.

Thanks!

@photofroggy
Copy link
Author

Brief update: I have tried removing the aforementioned comment line in a separate branch and this error stopped coming up. This is not ideal for the current setup, and does further suggest that it is a problem with nanaimo.

@segiddins
Copy link
Member

Yes, the issue is with the trailing , in the array -- @samdmarshall do you know if the format allows for those?

@samdmarshall
Copy link

Yes, I believe so.

@segiddins
Copy link
Member

Damn. I'll look into fixing this.

@segiddins
Copy link
Member

Looks like this is only an issue when the trailing comma is followed directly by a comment, we already support trailing commas in every other scenario

@segiddins
Copy link
Member

#27 should fix the issue, thanks for the excellent bug report!

@photofroggy
Copy link
Author

Oh sweet! No problem, thanks for fixing! Just need it to cascade through to fastlane, woo!

@samdmarshall
Copy link

Curious, was this a generated project file or not? seems like this should have come up before now since that seems like a fairly standard pattern of placing comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants