www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Warning The package will no longer be detected starting from v1.42.0

reply Soulsbane <paul acheronsoft.com> writes:
Most of my homegrown libraries are private and are used locally 
for the most part. They are in ~/Projects/D/libs . Until now I've 
always used dub add-path and things worked fine. Updated my 
install am now getting this message:

```
      Warning Package at path 
'/home/soulsbane/Projects/D/libs/textrecords/' should be under 
'/home/soulsbane/Projects/D/libs/textrecords/$VERSION/textrecords'
      Warning The package will no longer be detected starting from 
v1.42.0
```

I'm guessing it's caused by this 
https://github.com/dlang/dub/pull/2610. What's the fix for this 
exactly? Thanks!
Jun 24 2023
next sibling parent "Richard (Rikki) Andrew Cattermole" <richard cattermole.co.nz> writes:
Unfortunately yes, this appears to be an unintended side effect of that PR.

The search paths in dub are all implemented together, one set of logic.

So add-path probably was never doing what was expected of it.

You will need to switch to add-local for each package, unless you want 
to work on dub :)
Jun 25 2023
prev sibling parent reply Mathias LANG <geod24 gmail.com> writes:
On Sunday, 25 June 2023 at 04:50:42 UTC, Soulsbane wrote:
 I'm guessing it's caused by this 
 https://github.com/dlang/dub/pull/2610. What's the fix for this 
 exactly? Thanks!
A fix would be to do the following: ``` for package in $($HOME/Projects/D/libs/*); do mv -v $package $package/master/$(basename $package) done ``` Provided that all you have in your `libs` folder are folders that represent packages. This would also allow you to use different versions of a library (I'm assuming you only have one, hence the `master`), and work with libraries like Cybershadow's `ae`. However, I'm not sure we should expect our users to do this for a simple `add-path`.
Jun 25 2023
parent reply Soulsbane <paul acheronsoft.com> writes:
On Sunday, 25 June 2023 at 12:21:52 UTC, Mathias LANG wrote:
 On Sunday, 25 June 2023 at 04:50:42 UTC, Soulsbane wrote:
 I'm guessing it's caused by this 
 https://github.com/dlang/dub/pull/2610. What's the fix for 
 this exactly? Thanks!
A fix would be to do the following: ``` for package in $($HOME/Projects/D/libs/*); do mv -v $package $package/master/$(basename $package) done ``` Provided that all you have in your `libs` folder are folders that represent packages. This would also allow you to use different versions of a library (I'm assuming you only have one, hence the `master`), and work with libraries like Cybershadow's `ae`. However, I'm not sure we should expect our users to do this for a simple `add-path`.
Yeah, each folder under libs is a package and it's own git repository. I think I'll just use the add-local approach. Kind of a pain but getting spammed with a page of warnings every compile is getting tiring :). Thanks a lot for the help Rikki and Mathias
Jun 25 2023
parent IchorDev <zxinsworld gmail.com> writes:
On Monday, 26 June 2023 at 01:35:07 UTC, Soulsbane wrote:
 Yeah, each folder under libs is a package and it's own git 
 repository. I think I'll just use the add-local approach. Kind 
 of a pain but getting spammed with a page of warnings every 
 compile is getting tiring :). Thanks a lot for the help Rikki 
 and Mathias
If your packages are all in the same folder, you could also use path dependencies in your dub recipe, which saves the hassle of manually doing `dub add-local` on new systems and dealing with incompatible version tags: ```json "dependencies": { "your-package": {"path": "../your-package-repo/"}, }, ```
Jul 09 2023