Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot build profdump: Enforcement failed #2017

Closed
mw66 opened this issue Sep 29, 2020 · 3 comments
Closed

cannot build profdump: Enforcement failed #2017

mw66 opened this issue Sep 29, 2020 · 3 comments
Labels

Comments

@mw66
Copy link

mw66 commented Sep 29, 2020

I remember I used to able to build this package:

https://github.com/AntonMeep/profdump

but now, I cannot.

AntonMeep/profdump#6

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

System information

$ uname -a
Linux  4.15.0-117-generic #118-Ubuntu SMP Fri Sep 4 20:02:41 UTC 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

@drug007
Copy link
Contributor

drug007 commented Sep 29, 2020

As I can see the configuration file is incorrect or dub has changed its behavior. If you add targetType "executable" to sub-configuration "executable" and remove sub-configuration "unittest" then the project builds as expected. I guess that dub fails due to the missing version of "fluent-assert"

			"dependencies": {
				"silly": {"path": "../silly"},
				"fluent-asserts": ""
			}

and absent local repository of "silly"

At least if you remove "unittest" sub-configuration and add targetType "executable" to sub-configuration "executable" (or delete of sub-configurations at all) the project builds

@mw66
Copy link
Author

mw66 commented Sep 29, 2020

ok, thanks for the work-around.

https://forum.dlang.org/post/[email protected]

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.

@Geod24 Geod24 added the invalid label Nov 10, 2020
@Geod24
Copy link
Member

Geod24 commented Nov 10, 2020

Thanks for the investigation @drug007 , closing as invalid.

@Geod24 Geod24 closed this as completed Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants