digitalmars.D.learn - How to use version in dub?
- Leonardo A (5/5) Dec 13 2022 Hello. How to use version in dub?
- torhu (6/11) Dec 13 2022 In SDL syntax, either at the top level, in a configuration, or
- torhu (13/26) Dec 13 2022 To be more clear: When using dub you need to put this in the dub
- ryuukk_ (3/31) Dec 13 2022 How can this be the official solution?
- Steven Schveighoffer (7/43) Dec 13 2022 Arbitrary version specification is pretty suspect. For optional version
- Leonardo (33/68) Dec 14 2022 Thanks for the replies. I think definitely we need a better
Hello. How to use version in dub? https://dlang.org/spec/version.html "The version level and version identifier can be set on the command line by the -version" I tried everything but noting.
Dec 13 2022
On Tuesday, 13 December 2022 at 19:28:44 UTC, Leonardo A wrote:Hello. How to use version in dub? https://dlang.org/spec/version.html "The version level and version identifier can be set on the command line by the -version" I tried everything but noting.In SDL syntax, either at the top level, in a configuration, or build type: ``` versions "something" "other" ```
Dec 13 2022
On Tuesday, 13 December 2022 at 19:50:15 UTC, torhu wrote:On Tuesday, 13 December 2022 at 19:28:44 UTC, Leonardo A wrote:To be more clear: When using dub you need to put this in the dub file, dub.sdl or dub.json. If you want to be able to choose from the command line, use a configuration: ``` configuration "something" { versions "something" } ``` Then you can do: ``` dub build -c=something ```Hello. How to use version in dub? https://dlang.org/spec/version.html "The version level and version identifier can be set on the command line by the -version" I tried everything but noting.In SDL syntax, either at the top level, in a configuration, or build type: ``` versions "something" "other" ```
Dec 13 2022
On Tuesday, 13 December 2022 at 20:01:40 UTC, torhu wrote:On Tuesday, 13 December 2022 at 19:50:15 UTC, torhu wrote:How can this be the official solution? It should be as easy as dub build -v "something"On Tuesday, 13 December 2022 at 19:28:44 UTC, Leonardo A wrote:To be more clear: When using dub you need to put this in the dub file, dub.sdl or dub.json. If you want to be able to choose from the command line, use a configuration: ``` configuration "something" { versions "something" } ``` Then you can do: ``` dub build -c=something ```Hello. How to use version in dub? https://dlang.org/spec/version.html "The version level and version identifier can be set on the command line by the -version" I tried everything but noting.In SDL syntax, either at the top level, in a configuration, or build type: ``` versions "something" "other" ```
Dec 13 2022
On 12/13/22 3:35 PM, ryuukk_ wrote:On Tuesday, 13 December 2022 at 20:01:40 UTC, torhu wrote:Arbitrary version specification is pretty suspect. For optional version support, there should be an official configuration that does the right thing, and then you select that configuration. You also can do `DFLAGS="-version=something" dub` if you like to live on the edge. -SteveOn Tuesday, 13 December 2022 at 19:50:15 UTC, torhu wrote:How can this be the official solution? It should be as easy as dub build -v "something"On Tuesday, 13 December 2022 at 19:28:44 UTC, Leonardo A wrote:To be more clear: When using dub you need to put this in the dub file, dub.sdl or dub.json. If you want to be able to choose from the command line, use a configuration: ``` configuration "something" { versions "something" } ``` Then you can do: ``` dub build -c=something ```Hello. How to use version in dub? https://dlang.org/spec/version.html "The version level and version identifier can be set on the command line by the -version" I tried everything but noting.In SDL syntax, either at the top level, in a configuration, or build type: ``` versions "something" "other" ```
Dec 13 2022
On Tuesday, 13 December 2022 at 20:35:28 UTC, ryuukk_ wrote:On Tuesday, 13 December 2022 at 20:01:40 UTC, torhu wrote:Thanks for the replies. I think definitely we need a better documentation of this at least. It seems to have more than one way to do. I tried this at first: ``` dub build -version=USE_SDL Error Error processing arguments: Can't parse string: bool should be case->> insensitive 'true' or 'false' Run 'dub help' for usage information. ``` Dub seems to understand my 'version' argument, but this has not in the help section. And in this documentation we have more than one way to declare versions: https://dub.pm/package-format-json.html#configurations 1. { "versions": ["PrintfDebugging"] } 2. like out friend said in configuration { "name": "somepackage", "configurations": [ { "name": "glut-app", "targetType": "executable", "versions": ["GlutApp"] } ] } The -c argument refers to config build. Maybe I'm confusing with package version. But my thoughts about dub is that we need to have the best documentation as we can to provide a good understanding for newcomers in D language.On Tuesday, 13 December 2022 at 19:50:15 UTC, torhu wrote:How can this be the official solution? It should be as easy as dub build -v "something"On Tuesday, 13 December 2022 at 19:28:44 UTC, Leonardo A wrote:To be more clear: When using dub you need to put this in the dub file, dub.sdl or dub.json. If you want to be able to choose from the command line, use a configuration: ``` configuration "something" { versions "something" } ``` Then you can do: ``` dub build -c=something ```Hello. How to use version in dub? https://dlang.org/spec/version.html "The version level and version identifier can be set on the command line by the -version" I tried everything but noting.In SDL syntax, either at the top level, in a configuration, or build type: ``` versions "something" "other" ```
Dec 14 2022