Skip to content

mxdev and cookieplone with filesystem packages needs a manual symlink #76

Description

@1letter

what i have done:

i create two backend addons with uvx cookieplone

in the first addon i add to mx.ini

[my.secondaddon]
url = /home/dev/Projects/projects/my.secondaddon
vcs = fs

and run make install and get an error

traceback:

# Read infiles
Read [r]: requirements.txt
Read [c]: https://dist.plone.org/release/6.1.3/constraints.txt
###############################################################################
# Fetch sources from VCS
Queued 'my.secondaddon' for checkout.
Can not execute action!
Traceback (most recent call last):
  File "/home/dev/Projects/projects/my.firstaddon/.cache/uv/archive-v0/BVRUJvoCIdKYwlz-vNaZg/lib/python3.12/site-packages/mxdev/vcs/common.py", line 428, in worker
    output = action(**kwargs)
             ^^^^^^^^^^^^^^^^
  File "/home/dev/Projects/projects/my.firstaddon/.cache/uv/archive-v0/BVRUJvoCIdKYwlz-vNaZg/lib/python3.12/site-packages/mxdev/vcs/filesystem.py", line 32, in checkout
    raise FilesystemError(
mxdev.vcs.filesystem.FilesystemError: Directory 'sources/my.secondaddon' for package 'my.secondaddon' doesn't exist. Check in the documentation if you need to add/change a 'sources-dir' option in your [buildout] section or a 'path' option in [sources].

my workaround, i set a symlink to the second addon manually

mkdir -p ./sources
cd ./sources
ln -s /home/dev/Projects/projects/my.secondaddon my.secondaddon
cd ..
make install

My question: Shouldn't mxdev be responsible for creating a symlink?

Activity

  1. jensens commented on May 31, 2026

    @jensens
    Member

    Thanks for the detailed report! This is a misunderstanding of what the fs VCS type does — and the fault is ours for not documenting it.

    vcs = fs does not fetch, copy, or symlink anything. It is only a marker for a package that is already present inside your sources directory: mxdev just verifies that sources/<name>/ exists and otherwise leaves it alone. Consequently url is meant to be the directory name (equal to the section/package name), not a path:

    [my.secondaddon]
    vcs = fs
    url = my.secondaddon

    …and sources/my.secondaddon/ has to exist already. Setting url = /home/dev/Projects/projects/my.secondaddon does not turn that external path into a checkout, which is why you hit FilesystemError and why your manual ln -s "fixes" it — you are creating exactly what fs expects to find.

    So, to answer your question: with the current fs semantics, mxdev is intentionally not responsible for creating the symlink. If you want mxdev to manage a local package for you, you have two better options:

    • Point a normal git source at the local repository:
      [my.secondaddon]
      vcs = git
      url = /home/dev/Projects/projects/my.secondaddon
    • For uv-managed projects, mxdev can write the path straight into [tool.uv.sources] — no symlink needed at all.

    I've opened #93 to document the fs type (including this pitfall) in the README.

    Separately: whether fs should grow an "auto-symlink an external path" mode is a reasonable feature idea, but it's a change of semantics (and symlinks are awkward on Windows), so I'd track that as its own enhancement rather than a bug. Does the git/uv approach above unblock you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions