Closed MrcSnm closed 1 year ago
✅ PR OK, no changes in deprecations or warnings
Total deprecations: 14
Total warnings: 0
Build statistics:
statistics (-before, +after)
-executable size=5272064 bin/dub
-rough build time=78s
+executable size=5280256 bin/dub
+rough build time=77s
@Geod24
I found a bug: The cache when using the --recipe is the same as not using, I need to make the recipe name enter in the ending file, do you guys have any direction on where I need to modify?
--
In the tests folder I also shows how to test it: I basically done what other people would implement using configurations
. But for me this is quite necessary.
you need to
chmod +x issue2684-recipe-file.sh
if you are on windows you can do this by doing
git update-index --chmod=+x issue2684-recipe-file.sh
the CI test fail seems related:
[INFO] Running /home/runner/work/dub/dub/test/issue2684-recipe-file.sh...
/home/runner/work/dub/dub/test/issue2684-recipe-file.sh: line 3: cd: /home/runner/work/dub/dub/testissue2684-recipe-file: No such file or directory
source/dub/dependency.d(917,18): Deprecation: scope variable `this` assigned to non-scope parameter `oth` calling `opEquals`
source/dub/dependency.d(920,30): Deprecation: scope variable `this` assigned to non-scope parameter `a` calling `doCmp`
source/dub/dependency.d(921,27): Deprecation: scope variable `this` assigned to non-scope parameter `b` calling `doCmp`
source/dub/dependency.d(939,26): Deprecation: scope variable `this` assigned to non-scope parameter `oth` calling `opEquals`
source/dub/internal/configy/Exceptions.d(130,34): Deprecation: reference to local variable `buffer` assigned to non-scope anonymous parameter
source/dub/internal/configy/Exceptions.d(134,34): Deprecation: reference to local variable `buffer` assigned to non-scope anonymous parameter
source/dub/internal/configy/Exceptions.d(248,27): Deprecation: `@safe` function `formatMessage` calling `formattedWrite`
/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/std/format/write.d(537,34): which calls `std.format.spec.FormatSpec!char.FormatSpec.writeUpToNextSpec!(void delegate(in char[]) @safe).writeUpToNextSpec`
/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/std/format/spec.d(258,33): which would be `@system` because of:
/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/std/format/spec.d(258,33): scope variable `this` assigned to non-scope parameter `e` calling `put`
source/dub/internal/configy/Exceptions.d(250,27): Deprecation: `@safe` function `formatMessage` calling `formattedWrite`
/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/std/format/write.d(537,34): which calls `std.format.spec.FormatSpec!char.FormatSpec.writeUpToNextSpec!(void delegate(in char[]) @safe).writeUpToNextSpec`
/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/std/format/spec.d(258,33): which would be `@system` because of:
/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/std/format/spec.d(258,33): scope variable `this` assigned to non-scope parameter `e` calling `put`
source/dub/internal/configy/Exceptions.d(283,27): Deprecation: `@safe` function `formatMessage` calling `formattedWrite`
/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/std/format/write.d(537,34): which calls `std.format.spec.FormatSpec!char.FormatSpec.writeUpToNextSpec!(void delegate(in char[]) @safe).writeUpToNextSpec`
/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/std/format/spec.d(258,33): which would be `@system` because of:
/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/std/format/spec.d(258,33): scope variable `this` assigned to non-scope parameter `e` calling `put`
source/dub/internal/configy/Exceptions.d(286,27): Deprecation: `@safe` function `formatMessage` calling `formattedWrite`
/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/std/format/write.d(537,34): which calls `std.format.spec.FormatSpec!char.FormatSpec.writeUpToNextSpec!(void delegate(in char[]) @safe).writeUpToNextSpec`
/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/std/format/spec.d(258,33): which would be `@system` because of:
/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/std/format/spec.d(258,33): scope variable `this` assigned to non-scope parameter `e` calling `put`
source/dub/internal/configy/Exceptions.d(323,31): Deprecation: `@safe` function `formatMessage` calling `formattedWrite`
/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/std/format/write.d(537,34): which calls `std.format.spec.FormatSpec!char.FormatSpec.writeUpToNextSpec!(void delegate(in char[]) @safe).writeUpToNextSpec`
/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/std/format/spec.d(258,33): which would be `@system` because of:
/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/std/format/spec.d(258,33): scope variable `this` assigned to non-scope parameter `e` calling `put`
source/dub/internal/configy/Exceptions.d(325,31): Deprecation: `@safe` function `formatMessage` calling `formattedWrite`
/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/std/format/write.d(537,34): which calls `std.format.spec.FormatSpec!char.FormatSpec.writeUpToNextSpec!(void delegate(in char[]) @safe).writeUpToNextSpec`
/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/std/format/spec.d(258,33): which would be `@system` because of:
/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/std/format/spec.d(258,33): scope variable `this` assigned to non-scope parameter `e` calling `put`
source/dub/internal/configy/Exceptions.d(332,31): Deprecation: `@safe` function `formatMessage` calling `formattedWrite`
/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/std/format/write.d(537,34): which calls `std.format.spec.FormatSpec!char.FormatSpec.writeUpToNextSpec!(void delegate(in char[]) @safe).writeUpToNextSpec`
/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/std/format/spec.d(258,33): which would be `@system` because of:
/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/std/format/spec.d(258,33): scope variable `this` assigned to non-scope parameter `e` calling `put`
source/dub/internal/configy/Exceptions.d(335,31): Deprecation: `@safe` function `formatMessage` calling `formattedWrite`
/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/std/format/write.d(537,34): which calls `std.format.spec.FormatSpec!char.FormatSpec.writeUpToNextSpec!(void delegate(in char[]) @safe).writeUpToNextSpec`
/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/std/format/spec.d(258,33): which would be `@system` because of:
/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/std/format/spec.d(258,33): scope variable `this` assigned to non-scope parameter `e` calling `put`
Error Failed to invoke the compiler ldc2 to determine the build platform: binary /opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/ldc2
version 1.33.0 (DMD v2.103.1, LLVM 15.0.7)
config /opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/etc/ldc2.conf (x86_64-unknown-linux-gnu)
predefs LDC all D_Version2 assert D_PreConditions D_PostConditions D_Invariants D_ModuleInfo D_Exceptions D_TypeInfo X86_64 D_InlineAsm_X86_64 D_HardFloat LittleEndian D_LP64 D_PIC linux Posix CRuntime_Glibc CppRuntime_Gcc LDC_LLVM_1500
parse dub_platform_probe_8551bef6_f863_4fde_a605_2423101bb054
importall dub_platform_probe
import object (/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/object.d)
import core.attribute (/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/core/attribute.d)
import ldc.attributes (/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/ldc/attributes.d)
import core.internal.hash (/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/core/internal/hash.d)
import core.internal.traits (/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/core/internal/traits.d)
import core.internal.entrypoint (/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/core/internal/entrypoint.d)
import core.internal.array.appending (/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/core/internal/array/appending.d)
import core.internal.array.comparison (/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/core/internal/array/comparison.d)
import core.internal.array.equality (/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/core/internal/array/equality.d)
import core.internal.array.casting (/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/core/internal/array/casting.d)
import core.internal.array.concatenation (/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/core/internal/array/concatenation.d)
import core.internal.array.construction (/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/core/internal/array/construction.d)
import core.internal.array.arrayassign (/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/core/internal/array/arrayassign.d)
import core.internal.array.capacity (/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/core/internal/array/capacity.d)
import core.internal.dassert (/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/core/internal/dassert.d)
import core.atomic (/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/core/atomic.d)
import core.internal.attributes (/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/core/internal/attributes.d)
import core.internal.atomic (/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/core/internal/atomic.d)
import ldc.intrinsics (/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/ldc/intrinsics.di)
import core.internal.destruction (/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/core/internal/destruction.d)
import core.internal.moving (/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/core/internal/moving.d)
import core.internal.postblit (/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/core/internal/postblit.d)
import core.internal.switch_ (/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/core/internal/switch_.d)
import core.lifetime (/opt/hostedtoolcache/dc/ldc2-1.33.0/x64/ldc2-1.33.0-linux-x86_64/bin/../import/core/lifetime.d)
Error Program exited with code 2
Error Program exited with code 2
Error Program exited with code 2
Error Program exited with code 2
Error Program exited with code 2
Error Program exited with code 2
(last line repeated thousands of times)
last thing: can you add a changelog entry for this? It will appear on dlang.org as well
EDIT: will do myself
after toying around, I noticed it silently ignores when the recipe file doesn't exist, will add a check for this
Why was this merged ? I don't see a compelling argument for it. It breaks in all kind of ways and clearly does not fit within Dub's philosophy - this is not to say that it isn't impossible to implement, but it breaks one of the major assumption without reason.
Just search for findPackageFile
for one such example of breakage.
Fix dub then.
findPackageFile
is not supposed to find it.
I have been working on a new dub build system for my project and this PR is quite important to get merged ASAP (before LDC 1.34.0 is released) since it will make my game engine usable for the release process.
Right now my
This fixes a problem where I was using
sourcePaths
instead ofdependencies
for releasing a game, the result being a big problem as the game could not contain any dependency unknown to the engine. By having that, it fixes this problem right now and make it a lot more usable.