GithubHelp home page GithubHelp logo

Comments (7)

itszor avatar itszor commented on July 24, 2024

FWIW, this is the shellcheck output:

In arrlit.sh line 2:
component=foo
^-- SC2034: component appears unused. Verify it or export it.


In arrlit.sh line 3:
foo_tasks=(a b c)
^-- SC2034: foo_tasks appears unused. Verify it or export it.


In arrlit.sh line 4:
eval tasks=(\${${component}_tasks[@]})
           ^-- SC1036: '(' is invalid here. Did you forget to escape it?
           ^-- SC1088: Parsing stopped here. Invalid use of parentheses?
           ^-- SC1098: Quote/escape special characters when using eval, e.g. eval "a=(b)".

It works in osh with the eval quoted as suggested in the last line.

from oil.

andychu avatar andychu commented on July 24, 2024

Thanks for trying this! Yes if you are willing to change it for OSH, I would suggest using the quotes as ShellCheck suggests.

Parsing array literal words is sort of a special case that I've limited to local / declare / etc. With eval, it makes sense to always use quotes, since eval is supposed to take a string.

If adding quotes gets you past this, please let me know what other errors you run into! thanks.

from oil.

itszor avatar itszor commented on July 24, 2024

After tweaking several instances of the problem, I get:

Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/Python-2.7.13/Lib/runpy.py", line 174, in _r
un_module_as_main
  File "/home/andy/git/oilshell/oil/Python-2.7.13/Lib/runpy.py", line 72, in _ru
n_code
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 509, in <module>
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 492, in main
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 475, in OilMain
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 413, in OshMain
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 985, in Execu
te
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 949, in _Exec
ute
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 758, in _Disp
atch
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 978, in _Exec
uteList
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 949, in _Exec
ute
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 845, in _Disp
atch
NotImplementedError: 14
FATAL: couldn't import from app bundle '/home/jbrown/bin/oil.ovm' (1)
Stripping the oil.ovm binary may cause this error.
See https://github.com/oilshell/oil/issues/47

I'm not sure exactly what construct is causing that...

from oil.

itszor avatar itszor commented on July 24, 2024

Also,

osh warning: *** trap not implemented ***

from oil.

andychu avatar andychu commented on July 24, 2024

OK thanks for the report, the error message is bad because it just says construct "14". Issue #38 is related. It looks like I have to provide a better error or just implement that. Let me see if I can reproduce.

from oil.

itszor avatar itszor commented on July 24, 2024

I guess you've figured this out, but this is issue #66.

Thanks!

from oil.

andychu avatar andychu commented on July 24, 2024

Thanks, I'm closing this since you addressed it and issue #66 is fixed (still pending release).

from oil.

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.