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

Add --rbrequire (-q) option to opal cmdline tool #2120

Merged
merged 1 commit into from
Nov 1, 2020
Merged

Conversation

hmdne
Copy link
Member

@hmdne hmdne commented Oct 4, 2020

The short rationale behind it is that for now it's impossible to
require opal libraries like opal-browser (close to impossible - it
needs Gem paths) or opal-erubi (impossible, because it needs to
modify the compiler context to support .erubi files).

The longer rationale is that opal-rspec depends on Opal::CLI. We
can't test opal-webassembly due to that.

The short rationale behind it is that for now it's impossible to
require opal libraries like opal-browser (close to impossible - it
needs Gem paths) or opal-erubi (impossible, because it needs to
modify the compiler context to support .erubi files).

The longer rationale is that opal-rspec depends on Opal::CLI. We
can't test opal-webassembly due to that.
@hmdne
Copy link
Member Author

hmdne commented Oct 4, 2020

A small request: can this be backported into the Opal 1.0 series? This will help me improve the documentation on some gems I manage.

@hmdne
Copy link
Member Author

hmdne commented Oct 4, 2020

I just found out it's not necessarily true about testing. Still I think it would be a good addition, so one could do something like:

opal -qopal-browser -ropal-browser -c my_script.rb

@hmdne
Copy link
Member Author

hmdne commented Oct 12, 2020

There is an opal-build command which actually has an -r switch which does what this proposed -q switch does. I don't know if having two commands doing actually mostly the same thing is really beneficial, but so be it :D.

@elia elia merged commit 505fd5d into opal:master Nov 1, 2020
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 this pull request may close these issues.

None yet

2 participants