Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Multiple directories with same name

Aperta
#1,197 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
python
Ambito
tooling

Direzione di ricerca

Review the linked fork branch and the existing add_package implementation, then inspect tests under tests/unit/ to find where package discovery is covered. First reproduce the duplicate directory name case and check how the proposed path argument selects a vunit_pkg.toml. Done means the behavior and its tests are clear and the unit test suite runs; the issue reports that pytest currently fails on both master and the branch.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I have a problem with directories with the same name, and proposed a solution.

Our directory structure:

project_root
├── generallib
│   ├── rtl
│   ├── sim
│   └── tb
└── specific
    ├── comp1
    │   ├── rtl
    │   ├── sim
    │   └── tb
    └── comp2
        ├── rtl
        ├── sim
        └── tb

The issue is regarding directories containg vunit_pkg.toml.

  • rtl and tb folders contains vunit_pkg.toml.
  • sim folders contains run.py

Normal python import handles __init__.py fine via:

import comp1
import comp1.rtl
import comp1.tb

I have created a branch (on my forked repo):
https://github.com/VUnit/vunit/compare/master...mrlogic-dk:vunit:feature-add_package-via_path

Problem solved by this patch:

  • Multiple packages with the same directory name, e.g. rtl / tb.
    • Original add_package("package_name") will just insert the first found.
    • Enhanced package, with `path` argument,
      add_package(path"../../general-lib/tb")= will insert that
      specific package via vunit_pkg.toml

Whot do you think about the change with respect to functionality and implementation?

I can't run the test `pytest tests/unit/` neither on `master` or with my changes.

I don't know where to add test to test the behaviour.

I can't push to VUnit/vunit.

Lingua principale
VHDL
Stelle
850
Fork
305
Merge medio
2g 10h
PR unite (30g)
7

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di VUnit/vunit

Tutte le issue di VUnit/vunit

Issue simili

Altre issue su DevTools

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.