www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - help: cannot build profdump, dub error (bug): Enforcement failed

reply mw <mingwu gmail.com> writes:
I remember I used to able to build this package:

https://github.com/AntonMeep/profdump

but now, I cannot.


Since that package haven't changed for 2 years, maybe it's a dub 
bug?

System information

$ uname -a

2020 x86_64 x86_64 x86_64 GNU/Linux

$ /usr/bin/dub --version
DUB version 1.23.0, built on Sep 27 2020

$ /usr/bin/dmd --version
DMD64 D Compiler v2.094.0
Copyright (C) 1999-2020 by The D Language Foundation, All Rights 
Reserved written by Walter Bright

$  /usr/bin/dub build -v
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
...
...
No valid package found in current working directory: Enforcement 
failed
Enforcement failed

Bug Description

Enforcement failed
How to reproduce?

```
git clone https://github.com/AntonMeep/profdump

cd profdump

dub build

```

https://github.com/dlang/dub/issues/2017
Sep 29 2020
parent reply drug <drug2004 bk.ru> writes:
On 9/29/20 3:41 PM, mw wrote:
 I remember I used to able to build this package:
 
 https://github.com/AntonMeep/profdump
 
 but now, I cannot.
 
 
 Since that package haven't changed for 2 years, maybe it's a dub bug?
 
 System information
 
 $ uname -a

 x86_64 x86_64 x86_64 GNU/Linux
 
 $ /usr/bin/dub --version
 DUB version 1.23.0, built on Sep 27 2020
 
 $ /usr/bin/dmd --version
 DMD64 D Compiler v2.094.0
 Copyright (C) 1999-2020 by The D Language Foundation, All Rights 
 Reserved written by Walter Bright
 
 $  /usr/bin/dub build -v
 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
 ...
 ...
 No valid package found in current working directory: Enforcement failed
 Enforcement failed
 
 Bug Description
 
 Enforcement failed
 How to reproduce?
 
 ```
 git clone https://github.com/AntonMeep/profdump
 
 cd profdump
 
 dub build
 
 ```
 
 https://github.com/dlang/dub/issues/2017
 
It reproduces. As a workaround you can use ``` dub run profdump ``` this command works as expected, I guess it is a bug of dub
Sep 29 2020
parent drug <drug2004 bk.ru> writes:
On 9/29/20 4:38 PM, drug wrote:
 
 It reproduces. As a workaround you can use
 ```
 dub run profdump
 ```
 this command works as expected, I guess it is a bug of dub
Do not execute this command in cloned `profdump` repository - it will fail too. It works if is called from other places, for example in home.
Sep 29 2020