www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - dub commands do not run correctly.

reply Alain De Vos <devosalain71 gmail.com> writes:
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 ?
Apr 10 2021
next sibling parent reply rikki cattermole <rikki cattermole.co.nz> writes:
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.
Apr 10 2021
parent reply Alain De Vos <devosalain71 gmail.com> writes:
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.
Apr 10 2021
parent reply rikki cattermole <rikki cattermole.co.nz> writes:
dub run dfmt -- ./app.d

You passed "./app.d" to dub, not dfmt.
Apr 10 2021
parent Alain De Vos <devosalain71 gmail.com> writes:
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.
Apr 10 2021
prev sibling parent reply Andre Pany <andre s-e-a-p.de> writes:
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
Apr 10 2021
parent reply Alain De Vos <devosalain71 gmail.com> writes:
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.
Apr 10 2021
parent reply z <z z.com> writes:
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.
Apr 10 2021
parent reply Alain De Vos <devosalain71 gmail.com> writes:
dub lint returns,
dub lint
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
Apr 10 2021
parent Andre Pany <andre s-e-a-p.de> writes:
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
Apr 10 2021