Thread overview
dub commands do not run correctly.
Apr 10, 2021
Alain De Vos
Apr 10, 2021
rikki cattermole
Apr 10, 2021
Alain De Vos
Apr 10, 2021
rikki cattermole
Apr 10, 2021
Alain De Vos
Apr 10, 2021
Andre Pany
Apr 10, 2021
Alain De Vos
Apr 10, 2021
z
Apr 10, 2021
Alain De Vos
Apr 10, 2021
Andre Pany
April 10, 2021

In order to run commands correctly I have to put soft links :
I.e.
dfmt -> /home/x/.dub/packages/dfmt-0.13.4/dfmt/bin/dfmt
or,
dscanner -> /home/x/.dub/packages/dscanner-0.11.0/dscanner/bin/dscanner
Then ./dfmt or ./dscanner run fine.
I use freebsd as O.S.
But "dub run dscanner" or "dub run dfmt" do not give the right result.
Did I miss something ?

April 10, 2021
On 10/04/2021 11:44 PM, Alain De Vos wrote:
> In order to run commands correctly I have to put soft links :
> I.e.
> dfmt -> /home/x/.dub/packages/dfmt-0.13.4/dfmt/bin/dfmt
> or,
> dscanner -> /home/x/.dub/packages/dscanner-0.11.0/dscanner/bin/dscanner
> Then ./dfmt or ./dscanner run fine.
> I use freebsd as O.S.

dub does not set this up for you.

> But "dub run dscanner" or "dub run dfmt" do not give the right result.
> Did I miss something ?

No idea, need to see the results of the command.
April 10, 2021
On Saturday, 10 April 2021 at 11:46:27 UTC, rikki cattermole wrote:
>
> On 10/04/2021 11:44 PM, Alain De Vos wrote:
>> In order to run commands correctly I have to put soft links :
>> I.e.
>> dfmt -> /home/x/.dub/packages/dfmt-0.13.4/dfmt/bin/dfmt
>> or,
>> dscanner -> /home/x/.dub/packages/dscanner-0.11.0/dscanner/bin/dscanner
>> Then ./dfmt or ./dscanner run fine.
>> I use freebsd as O.S.
>
> dub does not set this up for you.
>
>> But "dub run dscanner" or "dub run dfmt" do not give the right result.
>> Did I miss something ?
>
> No idea, need to see the results of the command.

For instance for me,
/home/x/.dub/packages/dfmt-0.13.4/dfmt/bin/dfmt ./app.d
runs fine.
But,
dub run dfmt ./app.d
returns,
Expected one or zero arguments.
Run "dub run -h" for more information about the "run" command.



April 10, 2021
dub run dfmt -- ./app.d

You passed "./app.d" to dub, not dfmt.
April 10, 2021
On Saturday, 10 April 2021 at 11:54:03 UTC, rikki cattermole wrote:
>
> dub run dfmt -- ./app.d
>
> You passed "./app.d" to dub, not dfmt.

Right that worked.
April 10, 2021

On Saturday, 10 April 2021 at 11:44:12 UTC, Alain De Vos wrote:

>

In order to run commands correctly I have to put soft links :
I.e.
dfmt -> /home/x/.dub/packages/dfmt-0.13.4/dfmt/bin/dfmt
or,
dscanner -> /home/x/.dub/packages/dscanner-0.11.0/dscanner/bin/dscanner
Then ./dfmt or ./dscanner run fine.
I use freebsd as O.S.
But "dub run dscanner" or "dub run dfmt" do not give the right result.
Did I miss something ?

Side info, dub has also command "lint" which calls DScanner internally.

Kind regards
Andre

April 10, 2021

dub fetch lint
Getting a release version failed: (1): Error: Got JSON of type null_, expected object.
Retry with ~master...
(1): Error: Got JSON of type null_, expected object.

April 10, 2021

On Saturday, 10 April 2021 at 13:15:19 UTC, Alain De Vos wrote:

>

dub fetch lint
Getting a release version failed: (1): Error: Got JSON of type null_, expected object.
Retry with ~master...
(1): Error: Got JSON of type null_, expected object.

He meant dub lint, with the working directory in the package's root folder(where dub.sdl/dub.json is present)
It should then automatically fetch and compile dscanner and execute it on the package.

April 10, 2021

dub lint returns,

>

dub lint
Unknown command: lint

USAGE: dub [--version] [] [<options...>] [-- []]

Manages the DUB project in the current directory. If the command is omitted,
DUB will default to "run". When running an application, "--" can be used to
separate DUB options from options passed to the application.

Run "dub --help" to get help for a specific command.

You can use the "http_proxy" environment variable to configure a proxy server
to be used for fetching packages.

Available commands

Package creation

init [ [...]]
Initializes an empty package skeleton

Build, test and run

run [] Builds and runs a package (default command)
build [] Builds a package (uses the main package in

April 10, 2021
On Saturday, 10 April 2021 at 18:08:55 UTC, Alain De Vos wrote:
> dub lint returns,
>>[...]
> Unknown command: lint
>
> USAGE: dub [--version] [<command>] [<options...>] [-- [<application arguments...>]]
>
> Manages the DUB project in the current directory. If the command is omitted,
> DUB will default to "run". When running an application, "--" can be used to
> separate DUB options from options passed to the application.
>
> Run "dub <command> --help" to get help for a specific command.
>
> You can use the "http_proxy" environment variable to configure a proxy server
> to be used for fetching packages.
>
>
> Available commands
> ==================
>
>   Package creation
>   ----------------
>   init [<directory> [<dependency>...]]
>                         Initializes an empty package skeleton
>
>   Build, test and run
>   -------------------
>   run [<package>]       Builds and runs a package (default command)
>   build [<package>]     Builds a package (uses the main package in

You might have an old version of dub. Dub lint was added I assume several months ago. Here is the documentation https://dub.pm/commandline.html#lint

Kind regards
Andre