dub icon indicating copy to clipboard operation
dub copied to clipboard

Crash when describing postBuildCommands

Open shoo opened this issue 3 years ago • 0 comments

System information

  • dub version: dub 1.29.0
  • OS Platform and distribution: Windows 10, Linux Ubuntu 22.04
  • compiler version ldc 1.30.0

Bug Description

Crash when describing postBuildCommands.

How to reproduce?

dub init .

And, rewrite dub project settings as follow (sdl) :

name "test"
buildType "test" {
    buildOptions "syntaxOnly"
    postBuildCommands "echo xxx"
}

Then, build:

build build -b test

Expected Behavior

postBuildCommands should be executed. In the example above, echo xxx should be executed and xxx should be displayed.

Logs

(ldc-1.30.0)root@5903f53ebed5:~/test# dub build -b test -v --vverbose
Using dub registry url 'https://code.dlang.org/'
Refreshing local packages (refresh existing: true)...
Looking for local package map at /var/lib/dub/packages/local-packages.json
Looking for local package map at /root/.dub/packages/local-packages.json
Looking for local package map at /root/test/.dub/packages/local-packages.json
Note: Failed to determine version of package test at .. Assuming ~master.
Refreshing local packages (refresh existing: false)...
Looking for local package map at /var/lib/dub/packages/local-packages.json
Looking for local package map at /root/.dub/packages/local-packages.json
Looking for local package map at /root/test/.dub/packages/local-packages.json
Collecting dependencies for test
Refreshing local packages (refresh existing: false)...
Looking for local package map at /var/lib/dub/packages/local-packages.json
Looking for local package map at /root/.dub/packages/local-packages.json
Looking for local package map at /root/test/.dub/packages/local-packages.json
Collecting dependencies for test
Add config test application
Add config test library
NON-PRIMARY: test library
Eliminating config library for test
Using configuration 'application' for test
Generating using build
Creating build generator.
Add config test application
Add config test library
NON-PRIMARY: test library
Eliminating config library for test
Using configuration 'application' for test
Configuring target test (executable /root/test test)
deps: test ->
Configure dependencies of test, deps:
Configuring dependent test, deps:
Using custom build type 'test'.
Performing "test" build using /root/dlang/ldc-1.30.0/bin/ldc2 for x86_64.
test ~master: building configuration "application"...
/root/dlang/ldc-1.30.0/bin/ldc2 -o- -w --oq -od=./obj -d-version=Have_test -Isource/ source/app.d -vcolumns
Running post-build commands...
slice [0 .. 18446744073709551615] extends past source array of length 0
Full exception: core.exception.ArraySliceError@source/dub/internal/vibecompat/inet/path.d(208): slice [0 .. 18446744073709551615] extends past source array of length 0

shoo avatar Jul 29 '22 10:07 shoo