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 package command behaviour #89

Merged
merged 2 commits into from
Sep 17, 2024
Merged

Fix package command behaviour #89

merged 2 commits into from
Sep 17, 2024

Conversation

ziopio
Copy link
Member

@ziopio ziopio commented Sep 16, 2024

Print the help text if no subtask is provided

% rebar3 grisp package     
===> Analyzing applications...
===> Compiling grisp_tools
===> Compiling textual
===> Compiling grid
===> Compiling rebar3_grisp
===> Analyzing applications...
===> Compiling grisp_tools
===> Compiling textual
===> Compiling grid
===> Compiling rebar3_grisp
Pre-built packages tasks

Commands:
  list          List packages

Usage: rebar3 grisp package [-p [<platform>]] [-c <columns>] [-t [<type>]]
                            [-c [<cached>]]

  -p, --platform  Platform to list packages for [default: grisp2]
  -c, --columns   List columns to display
  -t, --type      Package type [default: otp]
  -c, --cached    List only cached packages [default: false]

Fixes #77

Print the help text if no subtask is provided.
Comment on lines 111 to 112
task_run(Task, _Args, RState) ->
task_help(undefined, _Args, RState).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I compile rebar3_grisp I get this warning:

===> Compiling rebar3_grisp
     ┌─ _checkouts/rebar3_grisp/src/rebar3_grisp_package.erl:
     │
 111 │  task_run(Task, _Args, RState) ->
     │           ╰── Warning: variable 'Task' is unused

Maybe we should add: dialyzer({nowarn_function, task_run/3}). or delete the function if we really don't need it

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a compiler warning, what does dialyzer have to do with it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah mb, there is an option for the compiler as well. And the warning was on the variable and not the function I misread the whole error

@ziopio ziopio merged commit 3119934 into master Sep 17, 2024
10 checks passed
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.

rebar3 help informations are not complete for the package task
2 participants