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

Cookbook generation failure missing responsible file indicator #3253

Closed
arianepaola opened this issue Jun 8, 2016 · 6 comments · Fixed by #3255
Closed

Cookbook generation failure missing responsible file indicator #3253

arianepaola opened this issue Jun 8, 2016 · 6 comments · Fixed by #3255

Comments

@arianepaola
Copy link
Contributor

arianepaola commented Jun 8, 2016

Currently cookbook generation does not provide any debug information. Therefore erroneous translation files are hard to track down.

Example:
-- Configuring done
-- Generating done
-- Build files have been written to: /home/vagrant/shogun/build
[4/5] Generating examples from meta-language
FAILED: cd /home/vagrant/shogun/build/examples/meta && /usr/bin/python /home/vagrant/shogun/examples/meta/generator/generate.py -i /home/vagrant/shogun/examples/meta/src -o /home/vagrant/shogun/build/examples/meta -t /home/vagrant/shogun/examples/meta/generator/targets -g /home/vagrant/shogun/build/src/shogun/tags --store-vars
Traceback (most recent call last):
  File "/home/vagrant/shogun/examples/meta/generator/generate.py", line 120, in <module>
    includedTargets=args.targets, storeVars=storeVars)
  File "/home/vagrant/shogun/examples/meta/generator/generate.py", line 44, in translateExamples
    targets.append(json.load(tFile))
  File "/usr/lib/python2.7/json/__init__.py", line 290, in load
    **kw)
  File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
ninja: build stopped: subcommand failed.
@arianepaola
Copy link
Contributor Author

@vigsterkr @karlnapf @lgoetz

Please review and merge.

@karlnapf
Copy link
Member

karlnapf commented Jun 8, 2016

BTW you can better paste code snippets using three "`" then it is displayed nicer

@arianepaola
Copy link
Contributor Author

@karlnapf Hmm, I am using "`". Don't know why the output looks strange.

@karlnapf
Copy link
Member

karlnapf commented Jun 8, 2016

Its meant for single line code. Try use "[newline] [code] [newline]"

@arianepaola
Copy link
Contributor Author

arianepaola commented Jun 8, 2016

this worked ```

@arianepaola
Copy link
Contributor Author

arianepaola commented Jun 8, 2016

@karlnapf's note on IRC:
what about you put a try around it
and in case of an exception, you print
and then print the usual stack trace
keeping the output cleaner

arianepaola added a commit to arianepaola/shogun that referenced this issue Jun 13, 2016
karlnapf added a commit that referenced this issue Jun 13, 2016
Fixes #3253 Cookbook generation failure missing file indicator
sorig pushed a commit to sorig/shogun that referenced this issue Jun 15, 2016
karasikov pushed a commit to karasikov/shogun that referenced this issue Apr 15, 2017
karasikov pushed a commit to karasikov/shogun that referenced this issue Apr 15, 2017
Fixes shogun-toolbox#3253 Cookbook generation failure missing file indicator
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

Successfully merging a pull request may close this issue.

2 participants