digitalmars.D.learn - deprecated using rdmd and dub build -dw
- Brother Bill (32/32) Aug 11 From page 375 of Programming in D.
- 0xEAB (4/11) Aug 11 As far as I can tell from the limited information provided, this
- 0xEAB (2/12) Aug 11
- Brother Bill (5/17) Aug 11 What should be the exact commands for
From page 375 of Programming in D. ``` import std.stdio; void main() { do_something; } deprecated("Please use doSomething() instead.") // No trailing semicolon, please alias do_something = doSomething; // void do_something() { // writeln("Using Eiffel snake_case, which doesn't pass D language style guide"); // } void doSomething() { writeln("Using clean, mother approved camelCase styling which passes the D language style guide"); } ``` When running ``` dub build -dw or dub build -de ``` I get this error message, which makes no sense. ``` Error Error processing arguments: Can't parse string: bool should be case-insensitive 'true' or 'false' Run 'dub help' for usage information. ``` Kindly provide some sample code that properly handles deprecated. I'm running on Windows DMD 2.111.0
Aug 11
On Monday, 11 August 2025 at 20:45:28 UTC, Brother Bill wrote:Error Error processing arguments: Can't parse string: bool should be case-insensitive 'true' or 'false' Run 'dub help' for usage information. ``` Kindly provide some sample code that properly handles deprecated. I'm running on Windows DMD 2.111.0As far as I can tell from the limited information provided, this error message stems from DUB. Please double-check or post your project’s DUB package recipe.
Aug 11
On Monday, 11 August 2025 at 20:45:28 UTC, Brother Bill wrote:``` dub build -dw or dub build -de ```Also, these commands probably don’t do what you think they do.``` -d --debug=VALUE Define the specified `debug` version identifier when building - can be used multiple times ```
Aug 11
On Monday, 11 August 2025 at 22:26:01 UTC, 0xEAB wrote:On Monday, 11 August 2025 at 20:45:28 UTC, Brother Bill wrote:What should be the exact commands for 1. ignore deprecation 2. warn deprecation 3. error deprecation ?``` dub build -dw or dub build -de ```Also, these commands probably don’t do what you think they do.``` -d --debug=VALUE Define the specified `debug` version identifier when building - can be used multiple times ```
Aug 11
On Tuesday, 12 August 2025 at 04:11:39 UTC, Brother Bill wrote:What should be the exact commands for 1. ignore deprecation 2. warn deprecation 3. error deprecation ?The clean approach would be to add build requirements to your package recipe: <https://dub.pm/dub-reference/build_settings/#buildrequirements> "allowWarnings" → Warnings do not abort compilation "silenceWarnings" → Don't show warnings "disallowDeprecations" → Using deprecated features aborts compilation "silenceDeprecations" → Don't show deprecation warnings
Aug 13
On Wednesday, 13 August 2025 at 20:56:56 UTC, 0xEAB wrote:The clean approach […]Alternatively, you can provide a DFLAGS environment variable to DUB which contains paremeters to be passed through to the compiler, i.e. `DFLAGS="-de" dub build`.
Aug 13