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

Fix CLI -L option that was unusable #1511

Merged
merged 1 commit into from
Jul 6, 2016
Merged

Conversation

elia
Copy link
Member

@elia elia commented Jul 6, 2016

fixes #1510

@iliabylich
Copy link
Contributor

👍

@elia elia merged commit 3588c33 into 0-10-stable Jul 6, 2016
@elia elia deleted the elia/lib-only-option-fix branch July 6, 2016 19:41
@bryanjhv
Copy link
Contributor

bryanjhv commented Jul 7, 2016

It's still not fixed, I guess. Suppose the -L switch needs to generate the Opal library code and print it, but for now what I'm getting is empty output:

C:\Users\Bryan>opal -L


Maybe the problem is the :skip_opal_require (the implicit -O switch)? Or it's meant to work like that?

As a question: what does the :no_exit option means?

@elia
Copy link
Member Author

elia commented Jul 7, 2016

@bryanjhv I agree that's debatable but I guess most of the time you'll want to use this to compile a lib for distribution and so made sense to me to ask for an explicit Opal require when they wanted that.

Although it's also true that an error should be displayed if there's nothing to compile… (great first pull-request! HINT HINT 😄)

C:\Users\Bryan>opal -L -r opal should do the job

elia added a commit that referenced this pull request Jul 7, 2016
@elia
Copy link
Member Author

elia commented Jul 8, 2016

As a question: what does the :no_exit option means?

@bryanjhv by default the CLI will add a call to Kernel#exit at the end of the program that in turn will fire all Kernel#at_exit callbacks. Those callbacks are often used by some libraries to automatically run stuff just before exiting (e.g. both minitest and rspec use that in their autorun feature).

@bryanjhv
Copy link
Contributor

bryanjhv commented Jul 9, 2016

Oh, didn't know what Kernel#exit thing.

And yes, you're right with the approach you took, that way we can build opal, opal-parser and others just with one command.

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

3 participants