cocoapods / nanaimo Goto Github PK
View Code? Open in Web Editor NEWA native ruby implementation of ASCII plist parsing & serializing
License: MIT License
A native ruby implementation of ASCII plist parsing & serializing
License: MIT License
Hi, first time filling an issue, it seems having a plugin name starting with @ is now a problem. Is it something I'm doing wrong or a change needed in Nanaimo? thanks.
post_install do |installer|
post_install1 installer
post_install2 installer
end
Nanaimo::Reader::ParseError - [!] Invalid character "@" in unquoted string
# -------------------------------------------
# C8741B0EC1CF4B688BFAA476 /* app */,
# );
193> name = @nstudio/nativescript-camera-plus;
^
# sourceTree = "<group>";
# };
# -------------------------------------------
/Library/Ruby/Gems/2.3.0/gems/nanaimo-0.2.6/lib/nanaimo/reader.rb:284:in `raise_parser_error'
/Library/Ruby/Gems/2.3.0/gems/nanaimo-0.2.6/lib/nanaimo/reader.rb:150:in `parse_string'
/Library/Ruby/Gems/2.3.0/gems/nanaimo-0.2.6/lib/nanaimo/reader.rb:140:in `parse_object'
/Library/Ruby/Gems/2.3.0/gems/nanaimo-0.2.6/lib/nanaimo/reader.rb:193:in `parse_dictionary'
/Library/Ruby/Gems/2.3.0/gems/nanaimo-0.2.6/lib/nanaimo/reader.rb:132:in `parse_object'
/Library/Ruby/Gems/2.3.0/gems/nanaimo-0.2.6/lib/nanaimo/reader.rb:193:in `parse_dictionary'
/Library/Ruby/Gems/2.3.0/gems/nanaimo-0.2.6/lib/nanaimo/reader.rb:132:in `parse_object'
/Library/Ruby/Gems/2.3.0/gems/nanaimo-0.2.6/lib/nanaimo/reader.rb:193:in `parse_dictionary'
/Library/Ruby/Gems/2.3.0/gems/nanaimo-0.2.6/lib/nanaimo/reader.rb:132:in `parse_object'
/Library/Ruby/Gems/2.3.0/gems/nanaimo-0.2.6/lib/nanaimo/reader.rb:107:in `parse!'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.8.2/lib/xcodeproj/plist.rb:27:in `read_from_path'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.8.2/lib/xcodeproj/project.rb:210:in `initialize_from_file'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.8.2/lib/xcodeproj/project.rb:112:in `open'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer/analyzer.rb:1025:in `block (2 levels) in inspect_targets_to_integrate'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer/analyzer.rb:1024:in `each'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer/analyzer.rb:1024:in `block in inspect_targets_to_integrate'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer/analyzer.rb:1019:in `inspect_targets_to_integrate'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer/analyzer.rb:96:in `analyze'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:266:in `analyze'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:174:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:173:in `resolve_dependencies'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:136:in `install!'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/command/install.rb:48:in `run'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:22:in `load'
/usr/local/bin/pod:22:in `<main>'
Hi,
This parser fails when it hits a hyphen character in an unqouted string. I am using it with Apache Cordova which is generating these unquoted strings in the .pbxproj file. If "-" in a string is not valid for this format, please let me know and I will report the bug over there.
/usr/local/lib/ruby/gems/2.3.0/gems/nanaimo-0.2.0/lib/nanaimo/reader.rb:277:in `raise_parser_error': [!] Dictionary missing ';' after key-value pair for "path", found "-" (Nanaimo::Reader::ParseError)
# -------------------------------------------
# 302D95EF14D2391D003F00A1 /* MainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainViewController.m; sourceTree = "<group>"; };
# 302D95F014D2391D003F00A1 /* MainViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainViewController.xib; sourceTree = "<group>"; };
56> 3047A50F1AB8059700498E2A /* build-debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "build-debug.xcconfig"; path = cordova/build-debug.xcconfig; sourceTree = SOURCE_ROOT; };
^
# 3047A5101AB8059700498E2A /* build-release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = "build-release.xcconfig"; path = cordova/build-release.xcconfig; sourceTree = SOURCE_ROOT; };
# 3047A5111AB8059700498E2A /* build.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = build.xcconfig; path = cordova/build.xcconfig; sourceTree = SOURCE_ROOT; };
# -------------------------------------------
from /usr/local/lib/ruby/gems/2.3.0/gems/nanaimo-0.2.0/lib/nanaimo/reader.rb:191:in `parse_dictionary'
from /usr/local/lib/ruby/gems/2.3.0/gems/nanaimo-0.2.0/lib/nanaimo/reader.rb:124:in `parse_object'
from /usr/local/lib/ruby/gems/2.3.0/gems/nanaimo-0.2.0/lib/nanaimo/reader.rb:185:in `parse_dictionary'
from /usr/local/lib/ruby/gems/2.3.0/gems/nanaimo-0.2.0/lib/nanaimo/reader.rb:124:in `parse_object'
from /usr/local/lib/ruby/gems/2.3.0/gems/nanaimo-0.2.0/lib/nanaimo/reader.rb:185:in `parse_dictionary'
from /usr/local/lib/ruby/gems/2.3.0/gems/nanaimo-0.2.0/lib/nanaimo/reader.rb:124:in `parse_object'
from /usr/local/lib/ruby/gems/2.3.0/gems/nanaimo-0.2.0/lib/nanaimo/reader.rb:99:in `parse!'
from /usr/local/lib/ruby/gems/2.3.0/gems/xcodeproj-1.4.1/lib/xcodeproj/plist.rb:27:in `read_from_path'
from /usr/local/lib/ruby/gems/2.3.0/gems/xcodeproj-1.4.1/lib/xcodeproj/project.rb:200:in `initialize_from_file'
from /usr/local/lib/ruby/gems/2.3.0/gems/xcodeproj-1.4.1/lib/xcodeproj/project.rb:102:in `open'
Hi,
I'm the maintainer of Kintsugi, a tool for solving Git conflicts in pbxproj files. It uses XcodeProj to read and write the project files which internally uses Nanaimo. Some users encountered issues where some strings were quoted and according to Xcode they shouldn't be quoted (It was fixed in #58).
Is it possible to cut a release soon so Kintsugi will write projects in a way that's consistent with how Xcode writes them?
Thanks!
Some bad manual project file editing ended up with wrong spaces and newline characters within an array build setting, this caused Nanaimo to report an error somewhere else in the file.
I don't know if this project even wants to validate files that Xcode refuses to open, but here it is anyway.
Nanaimo::Reader::ParseError - [!] Array missing ',' in between objects
# -------------------------------------------
# CLANG_ENABLE_CODE_COVERAGE = YES;
# CLANG_ENABLE_MODULES = YES;
11518> CODE_SIGN_ENTITLEMENTS = "REDACTED/REDACTED$(ENTITLEMENTS_SUFFIX).entitlements";
^
# CODE_SIGN_IDENTITY = "iPhone Developer";
# "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
# -------------------------------------------
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/nanaimo-0.2.3/lib/nanaimo/reader.rb:284:in `raise_parser_error'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/nanaimo-0.2.3/lib/nanaimo/reader.rb:173:in `parse_array'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/nanaimo-0.2.3/lib/nanaimo/reader.rb:133:in `parse_object'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/nanaimo-0.2.3/lib/nanaimo/reader.rb:192:in `parse_dictionary'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/nanaimo-0.2.3/lib/nanaimo/reader.rb:131:in `parse_object'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/nanaimo-0.2.3/lib/nanaimo/reader.rb:192:in `parse_dictionary'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/nanaimo-0.2.3/lib/nanaimo/reader.rb:131:in `parse_object'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/nanaimo-0.2.3/lib/nanaimo/reader.rb:192:in `parse_dictionary'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/nanaimo-0.2.3/lib/nanaimo/reader.rb:131:in `parse_object'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/nanaimo-0.2.3/lib/nanaimo/reader.rb:192:in `parse_dictionary'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/nanaimo-0.2.3/lib/nanaimo/reader.rb:131:in `parse_object'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/nanaimo-0.2.3/lib/nanaimo/reader.rb:106:in `parse!'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/xcodeproj-1.4.2/lib/xcodeproj/plist.rb:27:in `read_from_path'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/xcodeproj-1.4.2/lib/xcodeproj/project.rb:200:in `initialize_from_file'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/xcodeproj-1.4.2/lib/xcodeproj/project.rb:102:in `open'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cocoapods-1.1.1/lib/cocoapods/installer/analyzer.rb:855:in `block (2 levels) in inspect_targets_to_integrate'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cocoapods-1.1.1/lib/cocoapods/installer/analyzer.rb:854:in `each'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cocoapods-1.1.1/lib/cocoapods/installer/analyzer.rb:854:in `block in inspect_targets_to_integrate'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cocoapods-1.1.1/lib/cocoapods/user_interface.rb:64:in `section'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cocoapods-1.1.1/lib/cocoapods/installer/analyzer.rb:849:in `inspect_targets_to_integrate'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cocoapods-1.1.1/lib/cocoapods/installer/analyzer.rb:66:in `analyze'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:236:in `analyze'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:150:in `block in resolve_dependencies'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cocoapods-1.1.1/lib/cocoapods/user_interface.rb:64:in `section'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:149:in `resolve_dependencies'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cocoapods-1.1.1/lib/cocoapods/installer.rb:110:in `install!'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cocoapods-1.1.1/lib/cocoapods/command/install.rb:37:in `run'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/claide-1.0.1/lib/claide/command.rb:334:in `run'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cocoapods-1.1.1/lib/cocoapods/command.rb:50:in `run'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/cocoapods-1.1.1/bin/pod:55:in `<top (required)>'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/bin/pod:22:in `load'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/bin/pod:22:in `<top (required)>'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/bundler-1.12.5/lib/bundler/cli/exec.rb:63:in `load'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/bundler-1.12.5/lib/bundler/cli/exec.rb:63:in `kernel_load'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/bundler-1.12.5/lib/bundler/cli/exec.rb:24:in `run'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/bundler-1.12.5/lib/bundler/cli.rb:304:in `exec'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/bundler-1.12.5/lib/bundler/cli.rb:11:in `start'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/bundler-1.12.5/exe/bundle:27:in `block in <top (required)>'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/bundler-1.12.5/lib/bundler/friendly_errors.rb:98:in `with_friendly_errors'
/Users/ashton/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/bundler-1.12.5/exe/bundle:19:in `<top (required)>'
/Users/ashton/.rbenv/versions/2.1.3/bin/bundle:22:in `load'
/Users/ashton/.rbenv/versions/2.1.3/bin/bundle:22:in `<main>'
I use xcodeproj 1.4.0 (which uses Nanaimo since this version) in a fastlane setup to build a Cordova project. Parsing works after I manually fix the project.pbxproj (there some paths are missing " in the Cordova template - lines 50 ff.)
However, writing the .pbxproj fails as follows. It's a bit hard to say if this is a bug in the .pbxproj or not, seems like an empty object appears there and Nanaimo breaks:
/Users/Rocco/.rvm/gems/ruby-2.1.5/gems/nanaimo-0.1.2/lib/nanaimo/writer.rb:63:in `write_object': [!] Cannot write to an ascii plist (RuntimeError)
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/nanaimo-0.1.2/lib/nanaimo/writer.rb:140:in `write_dictionary_key_value_pair'
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/nanaimo-0.1.2/lib/nanaimo/xcode_project_writer.rb:41:in `write_dictionary_key_value_pair'
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/nanaimo-0.1.2/lib/nanaimo/writer.rb:119:in `block in write_dictionary'
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/nanaimo-0.1.2/lib/nanaimo/writer.rb:118:in `each'
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/nanaimo-0.1.2/lib/nanaimo/writer.rb:118:in `write_dictionary'
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/nanaimo-0.1.2/lib/nanaimo/xcode_project_writer.rb:19:in `write_dictionary'
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/nanaimo-0.1.2/lib/nanaimo/writer.rb:55:in `write_object'
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/nanaimo-0.1.2/lib/nanaimo/writer.rb:140:in `write_dictionary_key_value_pair'
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/nanaimo-0.1.2/lib/nanaimo/xcode_project_writer.rb:41:in `write_dictionary_key_value_pair'
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/nanaimo-0.1.2/lib/nanaimo/writer.rb:119:in `block in write_dictionary'
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/nanaimo-0.1.2/lib/nanaimo/writer.rb:118:in `each'
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/nanaimo-0.1.2/lib/nanaimo/writer.rb:118:in `write_dictionary'
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/nanaimo-0.1.2/lib/nanaimo/xcode_project_writer.rb:19:in `write_dictionary'
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/nanaimo-0.1.2/lib/nanaimo/writer.rb:55:in `write_object'
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/nanaimo-0.1.2/lib/nanaimo/writer.rb:140:in `write_dictionary_key_value_pair'
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/nanaimo-0.1.2/lib/nanaimo/xcode_project_writer.rb:41:in `write_dictionary_key_value_pair'
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/nanaimo-0.1.2/lib/nanaimo/xcode_project_writer.rb:29:in `block (2 levels) in write_dictionary'
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/nanaimo-0.1.2/lib/nanaimo/xcode_project_writer.rb:28:in `each'
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/nanaimo-0.1.2/lib/nanaimo/xcode_project_writer.rb:28:in `block in write_dictionary'
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/nanaimo-0.1.2/lib/nanaimo/xcode_project_writer.rb:24:in `each'
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/nanaimo-0.1.2/lib/nanaimo/xcode_project_writer.rb:24:in `write_dictionary'
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/nanaimo-0.1.2/lib/nanaimo/writer.rb:55:in `write_object'
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/nanaimo-0.1.2/lib/nanaimo/writer.rb:140:in `write_dictionary_key_value_pair'
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/nanaimo-0.1.2/lib/nanaimo/xcode_project_writer.rb:41:in `write_dictionary_key_value_pair'
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/nanaimo-0.1.2/lib/nanaimo/writer.rb:119:in `block in write_dictionary'
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/nanaimo-0.1.2/lib/nanaimo/writer.rb:118:in `each'
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/nanaimo-0.1.2/lib/nanaimo/writer.rb:118:in `write_dictionary'
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/nanaimo-0.1.2/lib/nanaimo/xcode_project_writer.rb:19:in `write_dictionary'
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/nanaimo-0.1.2/lib/nanaimo/writer.rb:55:in `write_object'
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/nanaimo-0.1.2/lib/nanaimo/writer.rb:29:in `write'
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/xcodeproj-1.4.0/lib/xcodeproj/project.rb:353:in `block in save'
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/xcodeproj-1.4.0/lib/xcodeproj/project.rb:353:in `open'
from /Users/Rocco/.rvm/gems/ruby-2.1.5/gems/xcodeproj-1.4.0/lib/xcodeproj/project.rb:353:in `save'
from Fastfile:93:in `block (2 levels) in parsing_binding'
Any idea if this is a Nanaimo issue or an error in the Cordova-generated .pbxproj file?
My fix for now is to use the xcodeproj gem in Version 1.3.2 which does not use Nanaimo - saves just fine.
TODO: Delete this and the text above, and describe your gem
Nanaimo reads the whole plist and checks the header to determine the file type. However, this is problematic because, due to the nature of binary plist, some files may throw an invalid byte sequence in UTF-8 (ArgumentError)
I attached an example plist to experience this issue. The only solution I have found is instead of reading the whole plist, we can just read 6 bytes from the plist. Which will cover both bplist
,xml
, and ascii
comparisons.
Ruby 2.7 begins a transition with positional and keyword arguments for Ruby 3; this library now generates some warnings at runtime:
/Users/jeff/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/nanaimo-0.2.6/lib/nanaimo/writer/pbxproj.rb:13: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/jeff/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/nanaimo-0.2.6/lib/nanaimo/writer.rb:35: warning: The called method `initialize' is defined here
Just followed the instructions from the README to the letter and getting error
/vendor/bundle --global/gems/nanaimo-0.2.6/lib/nanaimo/writer.rb:48:in `write': undefined method `root_object' for #<Hash:0x00007ff08b0d0308> (NoMethodError)
I'm trying to setup a CD environment using JRuby, but I'm getting this error while trying to validate a pod:
uninitialized constant Nanaimo::Writer::XMLWriter::Date
Did you mean? Nanaimo::Writer::XMLWriter::Date
The same PodSpec validates fine if I run the command com MacOS native Ruby. Any clues why this Date
constant may not be loading?
Validating spec
-> MyPod (0.2.1)
- ERROR | [iOS] unknown: Encountered an unknown error (uninitialized constant Nanaimo::Writer::XMLWriter::Date
Did you mean? Nanaimo::Writer::XMLWriter::Date
Date
Nanaimo::Data
Data) during validation.
CocoaPods : 1.9.1
Ruby : jruby 9.2.11.0 (2.5.7) 2020-03-02 612d7a05a6 Java HotSpot(TM) 64-Bit Server VM 25.212-b10 on 1.8.0_212-b10 +jit [darwin-x86_64]
RubyGems : 3.0.6
Host : Mac OS X 10.15.3 (19D76)
Xcode : 11.3.1 (11C504)
Git : git version 2.21.1 (Apple Git-122.3)
Ruby lib dir : uri:classloader:/META-INF/jruby.home/lib
Repositories :
cocoapods-deintegrate : 1.0.4
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.1.0
cocoapods-trunk : 1.4.1
cocoapods-try : 1.1.0
*** LOCAL GEMS ***
activesupport (4.2.11.1)
algoliasearch (1.27.1)
atomos (0.1.3)
CFPropertyList (3.0.2)
claide (1.0.3)
cmath (default: 1.0.0)
cocoapods (1.9.1)
cocoapods-core (1.9.1)
cocoapods-deintegrate (1.0.4)
cocoapods-downloader (1.3.0)
cocoapods-plugins (1.0.0)
cocoapods-search (1.0.0)
cocoapods-stats (1.1.0)
cocoapods-trunk (1.4.1)
cocoapods-try (1.1.0)
colored2 (3.1.2)
concurrent-ruby (1.1.6)
csv (default: 1.0.0)
did_you_mean (1.2.0)
escape (0.0.4)
ethon (0.12.0)
ffi (1.12.2 java)
fileutils (default: 1.1.0)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
httpclient (2.8.3)
i18n (0.9.5)
ipaddr (default: 1.2.0)
jar-dependencies (default: 0.4.0)
jruby-openssl (default: 0.10.4 java)
jruby-readline (default: 1.3.7 java)
json (default: 2.2.0 java)
minitest (5.10.3)
molinillo (0.6.6)
nanaimo (0.2.6)
nap (1.1.0)
net-telnet (0.1.1)
netrc (0.11.0)
power_assert (1.1.3)
psych (default: 3.1.0 java)
rake (12.3.2)
rake-ant (default: 1.0.4)
rdoc (default: 6.1.2)
ruby-macho (1.4.0)
scanf (default: 1.0.0)
test-unit (3.2.8)
thread_safe (0.3.6 java)
typhoeus (1.3.1)
tzinfo (1.2.6)
webrick (default: 1.4.2)
xcodeproj (1.15.0)
xmlrpc (0.3.0)
Ideally if something like this comes up CocoaPods/CocoaPods#6101 (comment)
Nanaimo::Reader::ParseError - not a valid string at index 114798 (char is "$")
/Library/Ruby/Gems/2.0.0/gems/nanaimo-0.1.1/lib/nanaimo/reader.rb:251:in `raise_parser_error'
/Library/Ruby/Gems/2.0.0/gems/nanaimo-0.1.1/lib/nanaimo/reader.rb:116:in `parse_string'
It'd be good to say
Nanaimo::Reader::ParseError - not a valid string on line 432 row 233 (char is "$")
/Library/Ruby/Gems/2.0.0/gems/nanaimo-0.1.1/lib/nanaimo/reader.rb:251:in `raise_parser_error'
/Library/Ruby/Gems/2.0.0/gems/nanaimo-0.1.1/lib/nanaimo/reader.rb:116:in `parse_string'
Extra credit for:
Nanaimo::Reader::ParseError - not a valid string on line 432 row 233 (char is "$")
> [the actual line of code]
/Library/Ruby/Gems/2.0.0/gems/nanaimo-0.1.1/lib/nanaimo/reader.rb:251:in `raise_parser_error'
/Library/Ruby/Gems/2.0.0/gems/nanaimo-0.1.1/lib/nanaimo/reader.rb:116:in `parse_string'
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.
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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.