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

sourcekitten_sourcefiles in yaml causes a crash #1137

Closed
adam-fowler opened this issue Dec 7, 2019 · 2 comments · Fixed by #1138
Closed

sourcekitten_sourcefiles in yaml causes a crash #1137

adam-fowler opened this issue Dec 7, 2019 · 2 comments · Fixed by #1138
Labels

Comments

@adam-fowler
Copy link

If you have

sourcekitten_sourcefile: my.json

At the top of your .jazzy.yaml jazzy will crash with the following

Using config file /Users/adamfowler/Documents/dev/macOS/lib/swift-aws/aws-sdk-swift/.jazzy.yaml
Traceback (most recent call last):
	10: from /usr/local/bin/jazzy:23:in `<main>'
	 9: from /usr/local/bin/jazzy:23:in `load'
	 8: from /Library/Ruby/Gems/2.6.0/gems/jazzy-0.12.0/bin/jazzy:15:in `<top (required)>'
	 7: from /Library/Ruby/Gems/2.6.0/gems/jazzy-0.12.0/lib/jazzy/config.rb:426:in `parse!'
	 6: from /Library/Ruby/Gems/2.6.0/gems/jazzy-0.12.0/lib/jazzy/config.rb:484:in `parse_config_file'
	 5: from /Library/Ruby/Gems/2.6.0/gems/jazzy-0.12.0/lib/jazzy/config.rb:484:in `each'
	 4: from /Library/Ruby/Gems/2.6.0/gems/jazzy-0.12.0/lib/jazzy/config.rb:496:in `block in parse_config_file'
	 3: from /Library/Ruby/Gems/2.6.0/gems/jazzy-0.12.0/lib/jazzy/config.rb:44:in `set_if_unconfigured'
	 2: from /Library/Ruby/Gems/2.6.0/gems/jazzy-0.12.0/lib/jazzy/config.rb:35:in `set'
	 1: from /Library/Ruby/Gems/2.6.0/gems/jazzy-0.12.0/lib/jazzy/config.rb:35:in `instance_exec'
/Library/Ruby/Gems/2.6.0/gems/jazzy-0.12.0/lib/jazzy/config.rb:179:in `block in <class:Config>': undefined method `map' for "ACM.json":String (NoMethodError)

I'm assuming this is related to 30957db#diff-598546a0c342527401dade0e669b6772

This used to work

@johnfairh
Copy link
Collaborator

Thanks, you're right that's unintended breakage. Temp workaround is to do:

sourcekitten_sourcefile:
    - my.json

Will fix it to accept either format.

@johnfairh johnfairh added the bug label Dec 7, 2019
@adam-fowler
Copy link
Author

cool thanks

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

Successfully merging a pull request may close this issue.

2 participants