-
-
Notifications
You must be signed in to change notification settings - Fork 230
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
dub assertion failure #149
Comments
The problem is the empty path in "sourcePaths" - DUB now outputs a proper error message in this case. This is how it probably should look like instead:
However, if "ae" is the same as this, the directory structure needs to be adjusted before it can be used like this. Ideally, all top-level folders ("net", "sys" etc.) should be moved to "source/ae/" and then the package.json looks just like this:
Due to the way import paths work in D, it doesn't really make sense to use sub-packages here. To really separate those parts, it would be necessary to put them into different directory hierarchies, e.g.:
and then:
|
Oh, thanks for the hints ) Initially I've contacted the author of ae, and he said that there are multiple projects depending on the current directory structure, thus he will only accept a package.json if it doesn't require that change. What I'm doing is trying to workaround that issue. Do you think it's worthwhile, btw? |
Hm, the only workaround that I see is to use The other alternative would be to make it a normal source library (instead of header only) and not define any "importPaths", but rely on the module declarations in the source files:
I didn't test it, but I think it should be possible to make it work like this, but only if all source files are compiled at once - it will break e.g. in VisualD's single file compilation mode. Finally, a fork with an adjusted directory structure that is synchronized regularly could of course be used as a last resort. At least git should be able to handle the moved files nicely when rebasing on the latest upstream changes. |
My intent is to make an import-only library, thus the source paths are kept empty. I try the following package.json:
And it asserts on 'dub describe'. Removing 'ae:net' line allows dub to produce a description, but then the subpackage source files are not found in projects that depend on 'ae', and dub asserts again if they depend on 'ae:net' instead.
The text was updated successfully, but these errors were encountered: