Closed oubiwann closed 9 years ago
Ah, yup, hadn't decided how to handle that. Should it warn, error, ignore, other?
@ferd thoughts?
What I would expect is that the usage would be displayed like it is now when options are provided, but without the missing info. For instance, I feel that $ rebar3 help shell
should give the following:
Run shell with project apps and deps in path.
Usage: rebar shell
Whereas, when options are provided (e.g., with the help
provider):
Display a list of tasks or help for a given task or subtask.
Usage: rebar help [<help_task>]
<help_task> Task to print help for.
Ooooh, my bad, I completely misunderstood the issue, haha. I'll have this fixed shortly :)
More, specific thoughts:
Perhaps this:
{opts, [{undefined, undefined, undefined, undefined, ""}]}
and this:
{opts, []}
should provide the same result?
<long desc>
Usage: rebar <provider name>
Doing [{undefined, undefined, undefined, undefined, ""}]
won't work. That gives:
Start a shell with project and deps preloaded similar to
'erl -pa ebin -pa deps/*/ebin'.
Usage: rebar shell
<undefined>
This may be an annoying limitation of getopt
and require just checking if opts
is []
and printing out the info manually instead of calling getopt.
Pushed to providers
. So should work if you delete deps/providers
and rebuild.
Hrm, didn't work :-/ Does rebar3 cache deps anywhere else?
How are you building? If you blow away deps/providers
that should be enough. Currently rebar3
is just built by rebar2
:). So I usually just run rebar get-deps compile escriptize
.
I just did rm -rf deps/providers
and then make
. I just cd'ed into deps/providers
and did a git log
-- the last commit was Nov 17. Which leads me to believe ...
Yup, the rebar.config
for rebar3
is pointing to a specific branch: format_error1
,
Ah, my bad, I've been working on a profile feature branch. I'll cherry-pick this fix to format_error1
.
Done.
Another issue popped up, but first, to put this all in context:
All that's so you have a good idea of where I'm coming from; no gift-horsing here :-) If you do have the time, here's the lastest thing that popped up when I tried to rebuild after removing the providers dep and getting the latest:
==> providers (compile)
Compiling lab/erlang/rebar3/deps/providers/src/providers.erl failed:
lab/erlang/rebar3/deps/providers/src/providers.erl:191: field profile undefined in record provider
lab/erlang/rebar3/deps/providers/src/providers.erl:200: field profile undefined in record provider
lab/erlang/rebar3/deps/providers/src/providers.erl:218: field profile undefined in record provider
lab/erlang/rebar3/deps/providers/src/providers.erl:216: Warning: variable 'Profile' is unused
ERROR: compile failed while processing lab/erlang/rebar3/deps/providers: rebar_abort
I've already started a new project exploring building providers in native LFE land ... ;-)
Oops, I did that too fast and part of the profile
feature stuff got committed with it, haha.
The fun with working on a quickly changing alpha code base :)
I just force pushed over that change in format_error1
to remove the profile stuff and fix the help issue.
You can also consider using the profiles
branch from tsloughter/rebar3
. I've opened a PR for it waiting for review from Fred and others. It is a pretty big change so likely scary bugs, but it'll eventually be master in some form, so may be useful to work from it.
Don't feel like you shouldn't send these, we need them and I'm just sitting around watching college football and working on this :)
Thanks for the kind words! Feel free to also ping me on irc.
Perfect! That last one did the trick -- thanks so much :-)
Also: love the profiles branch. I've needed that many times in various LFE projects. Used its counterpart in Clojure a bunch, much to my satisfaction.
Looking forward to it!
For instance, running this:
Gives this:
I mis-spent a lot of time trying to track this down, thinking it was a bug in my own plugin/providers code.
I'm on my way to a hack-around, but it would be nice if we could save the next contributor an our or so of confusion ;-)