Package link only links CommandBox modules?

Is there a way to link a package? I have a development fork of TestBox. I’d like to use the development fork as a dev-dependency in my application. That way I can contribute to TestBox in the course of developing my application and benefit from my changes before they’re merged.

TestBox is just a package, not a CommandBox module. It doesn’t have a Module.cfc. When I try to use package link I get the following error.

Package type [testing] is invalid for linking. Needs to be a module type.

Is there a way to link a development package?

I tried just manually creating a symlink, but when I run box install it overwrites the symlink and installs the package from forgebox.

Also, ColdFusion 2018 doesn’t seem to like using a symlink for a mapping. If I try to enter a new mapping to that folder in CFAdmin it won’t let me. If I try to use the symlink folder in the dot path of a mapping, it says it can’t find it.

Found this which is what I was looking for.

Yes, just create the symlink manually :slight_smile: The package link command was made a little opinionated to help people use it correctly.

That’s entirely possible. Symlinks can be tricky. I’ve found better luck when creating a “hard” link.

I don’t know what that means. In what way did it not “let you”. Like, did you get an error? If so, what was the error?

Usually creating a “hard” link helps with things like this.

That’s not a great solution since it requires you to re-install every time you make a change and want to test. I’d really recommend getting the symlink working if you can.

It would be nice not to have to reload each time.

Do you have a way of creating a hard link to a directory? When I tried it it gave me this result.

ln: /Users/sethfeldkamp/testbox: Is a directory

Maybe it’s not possible.

Darn,. perhaps that doesn’t work for folders. I’m a Windows guy, and I’ve always had good luck doing this with mklink but I’m also usually testing on Lucee, which quite possibly handles symlinks better than Adobe CF.

That all seems likely. I’m content with re-installing the module.

Thanks for helping me work through it.

1 Like