coderofsalvation / powscript

transpiler written in bash: painless shellscript, indentbased, coffee for the shell with hipster-sparkles v1 BETA LANDED 🎉🎉🎉🎉 thanks fcard!
http://powscript.isvery.ninja/
Other
157 stars 13 forks source link

Dependencies seem broken #71

Open XedinUnknown opened 1 year ago

XedinUnknown commented 1 year ago

Hi!

Great idea, I'd really like to program in powscript rather than Bash. 🙏

Now, when I actually try to run it, the following is produced:

$ docker-compose run pow -c groupception.pow
Compiling libraries...
* compiling: unicode
unimplemented variable substitution (`:` directly followed by `string` instead of : or [)
* compiling: json
unimplemented variable substitution (`:` directly followed by `value` instead of : or [)
* compiling: std

require_cmd 'stdbuf'
require_cmd 'echo'
require_cmd 'getopts'

unimplemented: 'list'

Those require_cmd lines come from my script. The stuff above seems to be related to dependencies of powscript, possibly written in powerscript and which need to be compiled by it first. But it seems that they themselves are not quite valid.

What gives?

XedinUnknown commented 1 year ago

Not sure if it's related, but I'm running this in a Docker image that is set up like this:

# Ubuntu 22
FROM phusion/baseimage:jammy-1.0.1

# Init process
CMD ["/sbin/my_init"]

RUN curl -L -o /usr/local/bin/powscript "https://raw.githubusercontent.com/coderofsalvation/powscript/master/powscript" \
    && chmod 755 /usr/local/bin/powscript

# Clean up APT
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

WORKDIR /project
ENTRYPOINT ["/usr/local/bin/powscript"]

I'm running this on WSL2, which shoud not matter because Docker, but who knows:

$ docker-compose run --entrypoint '' pow uname -r
5.4.72-microsoft-standard-WSL2
fcard commented 1 year ago

Hi! Sorry for taking a long time to answer, but, the library errors seem to be an issue we're having with Bash 5. We haven't updated powscript to work with Bash 5 yet, so you need to use Bash 4. (specifically, we recommend Bash 4.4) I am currently working on something to fix this and overall greatly improve the project, I just have been really busy with a thousand things, hehe. But thank you for your patience and I hope you can get this working.

XedinUnknown commented 1 year ago

Hi! And thanks for the response! Hope you find some time soon! I like Powscript and prefer it to many other alternatives, because it doesn't aim to do things the C++ way, to which shell scripting is fundamentally different, and just makes the same thing better, while keeping all the niceties - such as stuff related to piping and file descriptors.