RejectedSoftware Forums

Sign up

Getting the error: Root package X contains reference to invalid package Y >=A <B

Hi guys, I hope I'm posting this to the right forum!

I'm getting this error when I try to build my dub project from within Xamarin studio (monod):

Root package d2harle:opengl3 contains reference to invalid package derelict:util >=2.0.3 <2.1.0

I'm having some trouble figuring out what the error means and how to fix it.

Xamarin tries to build like this:

dub build "d2harle:opengl3" "--build=plain"
Building package d2harle:opengl3 in C:\D\d2harle\Exit code 2
Build complete -- 1 error, 0 warnings

When I build it manually (without arguments), it works fine:

dub
Performing "debug" build using dmd for x86.
derelict-util 2.0.4: target for configuration "library" is up to date.
derelict-gl3 1.0.17: target for configuration "library" is up to date.
derelict-glfw3 1.1.0: target for configuration "library" is up to date.
derelict-sdl2 1.9.7: target for configuration "library" is up to date.
d2harle ~master: target for configuration "application" is up to date.
To force a rebuild of up-to-date targets, run again with --force.
Running .\d2harle.exe

I've tried both dub clean-cache and upgrade options but it doesn't fix it.

Any suggestions on what to do? :-)

My package.json looks like this

{
        "name": "d2harle",
        "description": "An example project skeleton",
        "homepage": "http://pappons.com",
        "copyright": "Copyright © 2015, Frederik Aagaard",
        "authors": [
                "Frederik Aagaard"
        ],
        "dependencies": {
                "derelict-gl3": "~>1.0.15",
                "derelict-glfw3": "~>1.1.0",
                "derelict-sdl2": "~>1.9.7",
                "derelict-util": "~>2.0.3",

        },

        "subPackages" : [
                {
                        "name": "opengl3",
                        "dependencies": {"derelict:util": "~>2.0.3"},
                        "targetPath": "lib",
                        "sourcePaths": ["import/derelict/opengl3"],
                        "importPaths": ["import"]
                },
                {
                        "name": "glfw3",
                        "dependencies": {"derelict:util": "~>2.0.3"},
                        "targetPath": "lib",
                        "sourcePaths": ["import/derelict/glfw3"],
                        "importPaths": ["import"]
                },
                {
                        "name": "sfml2",
                        "dependencies": {"derelict:util": "~>2.0.3"},
                        "targetPath": "lib",
                        "sourcePaths": ["import/derelict/sfml2"],
                        "importPaths": ["import"]
                },
        ]
}

Thanks in advance!

Re: Getting the error: Root package X contains reference to invalid package Y >=A <B

Am 21.11.2015 um 19:06 schrieb Frederik Aagaard:

Hi guys, I hope I'm posting this to the right forum!

I'm getting this error when I try to build my dub project from within Xamarin studio (monod):

Root package d2harle:opengl3 contains reference to invalid package derelict:util >=2.0.3 <2.1.0

When you manually built the main package "d2harle", the sub package
":opengl3" didn't take part in the build at all, because the main
package has no dependency to it (sub packages are conceptually
completely separate from each other and from the parent package), thus
the missing error message.

The error message itself means that the dependency references either a
non-existent package, or one that is dysfunctional. In this case, the
name is wrong and should be "derelict-util" instead of "derelict:util".
I'll open a ticket to remember adding code to enable a clearer error
message ("Package 'derelict:util' referenced by 'd2harle:opengl3' does
not exist.").

Re: Getting the error: Root package X contains reference to invalid package Y >=A <B

Am 07.12.2015 um 14:39 schrieb Sönke Ludwig:

I'll open a ticket to remember adding code to enable a clearer error
message ("Package 'derelict:util' referenced by 'd2harle:opengl3' does
not exist.").

#730

Re: Getting the error: Root package X contains reference to invalid package Y >=A <B

On Mon, 7 Dec 2015 14:39:37 +0100, Sönke Ludwig wrote:

Am 21.11.2015 um 19:06 schrieb Frederik Aagaard:

Hi guys, I hope I'm posting this to the right forum!

I'm getting this error when I try to build my dub project from within Xamarin studio (monod):

Root package d2harle:opengl3 contains reference to invalid package derelict:util >=2.0.3 <2.1.0

When you manually built the main package "d2harle", the sub package
":opengl3" didn't take part in the build at all, because the main
package has no dependency to it (sub packages are conceptually
completely separate from each other and from the parent package), thus
the missing error message.

The error message itself means that the dependency references either a
non-existent package, or one that is dysfunctional. In this case, the
name is wrong and should be "derelict-util" instead of "derelict:util".
I'll open a ticket to remember adding code to enable a clearer error
message ("Package 'derelict:util' referenced by 'd2harle:opengl3' does
not exist.").

Thanks for the assistance. It presented me with a few new errors, but the error messages were helpful enough for me to fix them on my own and now Xamarin/MonoD builds it fine from within the IDE.

This is my updated package.json, in case it's of use to anyone:

{
	"name": "d2harle",
	"description": "An example project skeleton",
	"homepage": "http://pappons.com",
	"copyright": "Copyright © 2015, Frederik Aagaard",
	"targetType": "autodetect" ,
	"authors": [
		"Frederik Aagaard"
	],
	"dependencies": {
		"derelict-gl3": "~>1.0.15",
		"derelict-glfw3": "~>1.1.0",
		"derelict-sdl2": "~>1.9.7",
		"derelict-util": "~>2.0.3",
	},
	"subPackages" : [
		{
			"name": "opengl3",
			"dependencies": {"derelict-util": "~>2.0.3"},
			"targetPath": "lib",
			"targetType": "none" ,
			"sourcePaths": ["import/derelict/opengl3"],
			"importPaths": ["import"]
		},
		{
			"name": "glfw3",
			"dependencies": {"derelict-util": "~>2.0.3"},
			"targetPath": "lib",
			"targetType": "none" ,
			"sourcePaths": ["import/derelict/glfw3"],
			"importPaths": ["import"]
		},
		{
			"name": "sfml2",
			"dependencies": {"derelict-util": "~>2.0.3"},
			"targetPath": "lib",
			"targetType": "none" ,
			"sourcePaths": ["import/derelict/sfml2"],
			"importPaths": ["import"]
		},
	]
}