dub icon indicating copy to clipboard operation
dub copied to clipboard

targetName does not support environment variables

Open szymski opened this issue 4 years ago • 1 comments

System information

  • dub version: 1.24.1
  • OS Platform and distribution: Windows 10
  • compiler version dmd v2.095.1, ldc2 1.25.1

Bug Description

targetName option in dub configuration doesn't support environment variables like other configuration properties.

How to reproduce?

Add targetName to dub.json with an environment variable, for example "$PLATFORM".

Expected Behavior

After compiling, the binary should be saved to a different name depending on used platform. What I get now is $PLATFORM.exe

szymski avatar Mar 30 '21 15:03 szymski

This is also true of the dependencies, package name, path option.

System information

  • dub version: 1.25.0
  • OS Platform and distribution: Ubuntu 20
  • compiler version: v2.093.1

Bug description

path option under a dependency package in dependencies in a dub configuration doesn't support environment variables.

To reproduce

Add a dependency path option in dub configuration with an environment variable, for example "$DEP_PATH".

Expected behavior

When building, the dependency package should be located on the filesystem. Instead I get:

$ pwd
/home/x/tmp_pkg
$ env DEP_PATH=/some/location/dep_pkg dub
No package file found in /home/x/tmp_pgk/$DEP_PATH/, expected one of dub.json/dub.sdl/package.json

cpiker avatar May 05 '21 09:05 cpiker

more ones that people have complained about in the past:

  • subConfiguration (#767)

WebFreak001 avatar Feb 17 '23 01:02 WebFreak001