dfix 0.2.0

"Nordlöw" via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Tue Nov 25 15:45:16 PST 2014


On Monday, 24 November 2014 at 19:22:52 UTC, Brian Schott wrote:
> dfix is a tool for automatically upgrading the syntax of D 
> source code.
>
> Changes since 0.1.1:
> * #1 dfix will now rewrite "const int foo() {}" to int foo() 
> const {}"
> * #6 The C-style array syntax fix is no longer incorrectly 
> applied to
>   certain ASM statements.
> * #9 You can now provide directory names as arguments to dfix 
> in case
>   you're too lazy to run find and xargs. (And really, who 
> isn't?)
> * #11 dfix is now registered on code.dlang.org.
>   http://code.dlang.org/packages/dfix
> * Added tests.

When trying to build dfix with dmd git master as

dub -v

I get

Generate target libdparse (staticLibrary 
/home/per/.dub/packages/libdparse-0.1.1 libdparse)
Target 
'/home/per/.dub/packages/libdparse-0.1.1/.dub/build/library-debug-linux.posix-x86_64-dmd_2067-BB8147F4EBDBE336D187810BFAA258B4/liblibdparse.a' 
doesn't exist, need rebuild.
Building libdparse 0.1.1 configuration "library", build type 
debug.
Running dmd...
dmd -lib 
-of../../.dub/packages/libdparse-0.1.1/.dub/build/library-debug-linux.posix-x86_64-dmd_2067-BB8147F4EBDBE336D187810BFAA258B4/liblibdparse.a 
-debug -g -w -version=Have_libdparse 
-I../../.dub/packages/libdparse-0.1.1/src 
-I../../.dub/packages/libdparse-0.1.1/src/ 
../../.dub/packages/libdparse-0.1.1/src/std/allocator.d 
../../.dub/packages/libdparse-0.1.1/src/std/d/ast.d 
../../.dub/packages/libdparse-0.1.1/src/std/d/entities.d 
../../.dub/packages/libdparse-0.1.1/src/std/d/formatter.d 
../../.dub/packages/libdparse-0.1.1/src/std/d/lexer.d 
../../.dub/packages/libdparse-0.1.1/src/std/d/parser.d 
../../.dub/packages/libdparse-0.1.1/src/std/lexer.d
../../.dub/packages/libdparse-0.1.1/src/std/allocator.d(4229): 
Warning: instead of C-style syntax, use D-style syntax 
'Allocator[(max - (min - 1)) / step] buckets'
FAIL 
../../.dub/packages/libdparse-0.1.1/.dub/build/library-debug-linux.posix-x86_64-dmd_2067-BB8147F4EBDBE336D187810BFAA258B4/ 
libdparse staticLibrary
Error executing command run:

Why?

I guess one solution would be to make warnings non-errors right 
but that seems dumb concerning what dfix can do for us regarding 
auto-converting C-style arrays syntax to D-style :)


More information about the Digitalmars-d-announce mailing list