Preference Pack <depend> tag

A forum for research and development of the user interface of FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
drmacro
Veteran
Posts: 8865
Joined: Sun Mar 02, 2014 4:35 pm

Preference Pack <depend> tag

Post by drmacro »

@chennes

I have created a PP on github with only a cfg from 'Save new'. The github has (I believe) the basic files needed and one workbench dependency declared in the package.xml file. (Setting this as a Custom repo: https://github.com/macdroid53/BaseTest.git)

The declaration has worked before in other PP repositories, so I think the name is correct.

But the dependency is not processed. (Nor is it in the other PP repositories where it did in the past.)

I first noticed this yesterday with a fresh git build. I just tested with build shown below:

Code: Select all

OS: Debian GNU/Linux 11 (bullseye) (XFCE/lightdm-xsession)
Word size of FreeCAD: 64-bit
Version: 0.21.30518 (Git)
Build type: Release
Branch: master
Hash: 8db7ee105109af720794ed12e6d91b43c3cf7390
Python 3.9.2, Qt 5.15.2, Coin 4.0.0, Vtk 7.1.1, OCC 7.7.0.dev
Locale: English/United States (en_US)
Installed mods: 
  * parts_library
  * kicadStepUpMod 10.15.4
  * Manipulator 1.4.9
  * PrefExtras
  * MyDefaults 2022.9.15
  * ZolkoBase 0.0.1
  * DynamicData 2.46.0
  * fasteners 0.4.13
  * MacMechX 2022.9.15
  * ExtremeProDark 2.2.0
  * ProDarkThemePreferencePack 1.0.0
  * fcgear 1.0.0
  * plugins
  * Pyramids-and-Polyhedrons
  * Defeaturing 1.2.0
  * Assembly4 0.12.4
  * BaseTest 0.0.1
  * OpticsWorkbench 1.0.9
  * workfeature-macro
  * sheetmetal 0.2.57
  * A2plus 0.4.59d
  * CurvedShapes 1.0.4
  * BasicMech 0.0.1
  * Dracula 0.0.2
  * Curves 0.5.8
  * workfeature
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
chennes
Veteran
Posts: 3878
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Preference Pack <depend> tag

Post by chennes »

I can reproduce the problem -- the package.xml file is fine, there's no problem there. My recent changes to support the Python version must have broken something in the Addon Manager's dependency handling code, it's not reading the cache properly.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
chennes
Veteran
Posts: 3878
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Preference Pack <depend> tag

Post by chennes »

Can you try adding type="addon" to your dependency and see if that branch of the code is working?

Code: Select all

<depend type="addon">Lattice Workbench</depend>
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
drmacro
Veteran
Posts: 8865
Joined: Sun Mar 02, 2014 4:35 pm

Re: Preference Pack <depend> tag

Post by drmacro »

chennes wrote: Tue Oct 04, 2022 3:56 pm Can you try adding type="addon" to your dependency and see if that branch of the code is working?

Code: Select all

<depend type="addon">Lattice Workbench</depend>
Hmm...I pushed that change to my github. But, I can't get it from AM because FC crashes when I add the Custom repo.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
chennes
Veteran
Posts: 3878
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Preference Pack <depend> tag

Post by chennes »

drmacro wrote: Tue Oct 04, 2022 4:32 pm Hmm...I pushed that change to my github. But, I can't get it from AM because FC crashes when I add the Custom repo.
As a workaround while you test you can manually edit the user.cfg file if you want: I didn't change the format of the custom workbenches preference entry, just the UI.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
chennes
Veteran
Posts: 3878
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Preference Pack <depend> tag

Post by chennes »

Also, I can confirm that the current package.xml does correctly require Lattice2, and install it when requested.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
drmacro
Veteran
Posts: 8865
Joined: Sun Mar 02, 2014 4:35 pm

Re: Preference Pack <depend> tag

Post by drmacro »

chennes wrote: Tue Oct 04, 2022 4:52 pm Also, I can confirm that the current package.xml does correctly require Lattice2, and install it when requested.
I edited user.cfg., Addon manager got the package.xml with mod, installed, no dependencies noted or installed.

Then went to apply said PP and FC crashed.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
chennes
Veteran
Posts: 3878
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Preference Pack <depend> tag

Post by chennes »

The dependency will require a small change to work correctly, it should work once I've merged issue #7556 in a few minutes (assuming CI passes). The crash on application is a totally different issue, of course.
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
drmacro
Veteran
Posts: 8865
Joined: Sun Mar 02, 2014 4:35 pm

Re: Preference Pack <depend> tag

Post by drmacro »

chennes wrote: Tue Oct 04, 2022 6:03 pm ...
The crash on application is a totally different issue, of course.
Understood.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
chennes
Veteran
Posts: 3878
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: Preference Pack <depend> tag

Post by chennes »

It's not crashing for me on Windows... I'll give it a shot on Linux.

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.21.30534 +1 (Git)
Build type: Release
Branch: addonManagerFixMetadataParseOnDL
Hash: 39ead40738b36abf70122b64ac84db435e7f3a46
Python 3.8.6+, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.5.3
Locale: English/United States (en_US)
Installed mods: 
  * 3DfindIT 1.2.0
  * A2plus 0.4.59
  * AirPlaneDesign 0.4.0
  * Assembly3 0.11.3
  * Assembly4 0.12.4
  * Assembly4.backup1663011356.498861
  * BaseTest 0.0.1
  * BasicMech 0.0.1
  * Beltrami 1.0.7-alpha
  * CurvedShapes 1.0.4
  * Curves 0.5.6
  * DynamicData 2.46.0
  * ExtremeProDark 1.0.4
  * fcgear 1.0.0
  * FreeCAD-Behave-Dark-Preference-Pack 0.0.1
  * GDML 2.0.0
  * lattice2 1.0.0
  * LCInterlocking 2022.9.26
  * LCInterlocking.backup1662649831.1541467
  * MeshRemodel 1.8919.0
  * Old Mods
  * SearchBar 1.0.1
  * SteelColumn
  * TabBar
  * ThreadProfile 1.82.0
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
Post Reply