dub icon indicating copy to clipboard operation
dub copied to clipboard

Trying to append absolute path

Open Domain opened this issue 9 years ago • 3 comments

C:\projects\zero>dub build

core.exception.AssertError@source\dub\internal\vibecompat\inet\path.d(216): Trying to append absolute path.

0x0053D9F1 in d_assert_msg 0x0052CFC9 in const(dub.internal.vibecompat.inet.path.Path function(immutable(char)[])) dub.internal.vibecompat.inet.path.Path.opBinary!("~").opBinary at C:\Users\build\AppData\Roaming\dub-ci-workspace\current\dub\source\dub\internal\vibecompat\inet\path.d(30) 0x0042D126 in void dub.package.Package.fillWithDefaults() at C:\Users\build\AppData\Roaming\dub-ci-workspace\current\dub\source\dub\package_.d(624) 0x0042A788 in D3dub8package_7Package6__ctorMFS3dub6recipe13packagerecipe13PackageRecipeS3dub8internal10vibecompat4inet4path4P at C:\Users\build\AppData\Roaming\dub-ci-workspace\current\dub\source\dub\package_.d(116) 0x0042A986 in D3dub8package_7Package4loadFS3dub8internal10vibecompat4inet4path4PathS3dub8internal10vibecompat4inet4path4PathC at C:\Users\build\AppData\Roaming\dub-ci-workspace\current\dub\source\dub\package_.d(162) 0x00428098 in const(void function(ref dub.package_.Package[], dub.package_.Package)) dub.packagemanager.PackageManager.addPackages 0x0042451C in D3dub14packagemanager14PackageManager16getOrLoadPackageMFS3dub8internal10vibecompat4inet4path4Path at C:\Users\build\AppData\Roaming\dub-ci-workspace\current\dub\source\dub\packagemanager.d(183) 0x00404CFB in int dub.commandline.runDubCommandLine(immutable(char)[][]) 0x00402146 in Dmain at C:\Users\build\AppData\Roaming\dub-ci-workspace\current\dub\source\app.d(15) 0x0053A2F7 in D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv 0x0053A2BB in void rt.dmain2.d_run_main(int, char*, extern (C) int function(char[][])).runAll() 0x0053A1BC in _d_run_main 0x00403F90 in main at C:\Users\build\AppData\Roaming\dub-ci-workspace\current\dub\source\app.d(7) 0x005A3D65 in mainCRTStartup 0x74B96444 in BaseThreadInitThunk 0x779F1B99 in RtlSubscribeWnfStateChangeNotification 0x779F1B64 in RtlSubscribeWnfStateChangeNotification

Domain avatar Sep 13 '16 09:09 Domain

Can you provide any details about how to replicate this error?

dhasenan avatar Sep 16 '17 16:09 dhasenan

I have run into this issue

$ dub --version
DUB version 1.7.0, built on Jan  3 2018

$ cat fixed.d
#!/usr/bin/env dub
/+ dub.sdl:
    name "fixed"
    dependency "decimal" version="0.9.0"
+/

import std.stdio;
import std.algorithm;
import std.random;
import std.math;
import std.conv;
import std.datetime;
import decimal;
import std.bigint;

void main()
{
    decimal128 f = "24.9";
}

$ dub --single fixed.d
Trying to append absolute path.

JackStouffer avatar Jan 12 '18 15:01 JackStouffer

I can't reproduce @JackStouffer 's example because decimal has been deleted. From what I see in the stacktrace it is related to the code that scans the local packages:

dub.packagemanager.PackageManager.addPackages 0x0042451C in D3dub14packagemanager14PackageManager16getOrLoadPackageMFS3dub8internal10vibecompat4inet4path4Path at C:\Users\build\AppData\Roaming\dub-ci-workspace\current\dub\source\dub\packagemanager.d(183)

So not your project, however the error is in: 0x0042D126 in void dub.package.Package.fillWithDefaults() at C:\Users\build\AppData\Roaming\dub-ci-workspace\current\dub\source\dub\package_.d(624)

Looks like this function does not do a whole lot of validation on the data, so I can see how this could trigger if the package contains absolute path. Definitely something actionable.

Geod24 avatar Jan 19 '24 12:01 Geod24