Coder Social home page Coder Social logo

Ambiguous error messages about bashly HOT 11 CLOSED

taqtiqa-mark avatar taqtiqa-mark commented on June 16, 2024
Ambiguous error messages

from bashly.

Comments (11)

taqtiqa-mark avatar taqtiqa-mark commented on June 16, 2024
$ bashly validate
Psych::SyntaxError
(src/conf/build.yml): did not find expected key while parsing a block mapping at line 80 column 5

from bashly.

taqtiqa-mark avatar taqtiqa-mark commented on June 16, 2024
$ bashly validate
/usr/bin/bashly:25:in `<main>'
/usr/bin/bashly:25:in `load'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/bin/bashly:9:in `<top (required)>'
/usr/lib/ruby/gems/3.1.0/gems/mister_bin-0.7.1/lib/mister_bin/runner.rb:36:in `run'
/usr/lib/ruby/gems/3.1.0/gems/mister_bin-0.7.1/lib/mister_bin/runner.rb:47:in `execute'
/usr/lib/ruby/gems/3.1.0/gems/mister_bin-0.7.1/lib/mister_bin/command.rb:19:in `execute'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/commands/validate.rb:12:in `run'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/commands/base.rb:18:in `validate_config'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/commands/base.rb:14:in `config_validator'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/commands/base.rb:10:in `config'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/config.rb:13:in `new'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/refinements/compose_refinements.rb:7:in `compose'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/refinements/compose_refinements.rb:7:in `each'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/refinements/compose_refinements.rb:16:in `block in compose'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/refinements/compose_refinements.rb:36:in `compose'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/refinements/compose_refinements.rb:36:in `map'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/refinements/compose_refinements.rb:38:in `block in compose'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/refinements/compose_refinements.rb:7:in `compose'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/refinements/compose_refinements.rb:7:in `each'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/refinements/compose_refinements.rb:16:in `block in compose'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/refinements/compose_refinements.rb:36:in `compose'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/refinements/compose_refinements.rb:36:in `map'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/refinements/compose_refinements.rb:38:in `block in compose'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/refinements/compose_refinements.rb:7:in `compose'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/refinements/compose_refinements.rb:7:in `each'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/refinements/compose_refinements.rb:9:in `block in compose'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/refinements/compose_refinements.rb:25:in `safe_load_yaml'
/usr/lib/ruby/gems/3.1.0/gems/bashly-0.8.6/lib/bashly/extensions/yaml.rb:4:in `properly_load_file'
/usr/lib/ruby/3.1.0/psych.rb:670:in `load_file'
/usr/lib/ruby/3.1.0/psych.rb:670:in `open'
/usr/lib/ruby/3.1.0/psych.rb:671:in `block in load_file'
/usr/lib/ruby/3.1.0/psych.rb:370:in `load'
/usr/lib/ruby/3.1.0/psych.rb:324:in `safe_load'
/usr/lib/ruby/3.1.0/psych.rb:399:in `parse'
/usr/lib/ruby/3.1.0/psych.rb:455:in `parse_stream'
/usr/lib/ruby/3.1.0/psych.rb:455:in `parse'
Psych::SyntaxError
(src/conf/build.yml): did not find expected key while parsing a block mapping at line 80 column 5

from bashly.

taqtiqa-mark avatar taqtiqa-mark commented on June 16, 2024

If I duplicate line 79 import to line 80 the error still reports line 80 as the same problem.

from bashly.

taqtiqa-mark avatar taqtiqa-mark commented on June 16, 2024

Is it possible that line 80 refers to a different file? Even a temporary file?

from bashly.

DannyBen avatar DannyBen commented on June 16, 2024

This is an invalid YAML error. I cannot help without seeing the YAMLs.
This is probably an indentation error.

from bashly.

taqtiqa-mark avatar taqtiqa-mark commented on June 16, 2024

This is an invalid YAML error.

Agreed. But what is invalid?
The vscode linter from Redhat says everything is good:
https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml

This is probably an indentation error.

Maybe that could be a test case - to land on error logic that isolates the error?

from bashly.

DannyBen avatar DannyBen commented on June 16, 2024

I cannot help without seeing the YAMLs.

from bashly.

taqtiqa-mark avatar taqtiqa-mark commented on June 16, 2024

there are a couple of 1000 lines.... should we start at line 1 :)

Maybe that could be a test case - to land on error logic that isolates the error?

from bashly.

DannyBen avatar DannyBen commented on June 16, 2024

Is you get a Psych::SyntaxError, this is outside of bashly's control. It means the YAML is not a valid YAML syntax, and the Ruby YAML library is incapable of reading it.

If you have a YAML file with over 2000 lines, you should split it using import.

You can also try to figure out what is wrong with your YAML in an online service such as http://www.yamllint.com/

Another debugging trick: delete half the file and try. If you still see an error, it is in the other half. Rinse and repeat.

There is literally nothing I can do from bashly's perspective. If the Psych error does not show you the exact file and line it fails on, neither can I.

from bashly.

taqtiqa-mark avatar taqtiqa-mark commented on June 16, 2024

If you have a YAML file with over 2000 lines, you should split it using import.

Addressed above.

You can also try to figure out what is wrong with your YAML in an online service such as

Addressed above.

There is literally nothing I can do from bashly's perspective.

I'm more optimistic - just busy right now.

from bashly.

DannyBen avatar DannyBen commented on June 16, 2024

I am closing this issue.
It is not something I can fix, and I cannot help you fix your YAML without seeing it.

from bashly.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.