dlang / dub

Package and build management system for D
MIT License
674 stars 230 forks source link

Trying to append absolute path #929

Open Domain opened 8 years ago

Domain commented 8 years ago

C:\projects\zero>dub build

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

0x0053D9F1 in _d_assertmsg 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 D3dub8package7Package4loadFS3dub8internal10vibecompat4inet4path4PathS3dub8internal10vibecompat4inet4path4PathC 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_runmain(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

dhasenan commented 7 years ago

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

JackStouffer commented 6 years ago

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.
Geod24 commented 9 months ago

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.