Skip to content

Multiple projects that share files #385

@jhartika

Description

@jhartika

I have a situation where there are multiple variants that share lot of structure and use work.file_name_pkg.all statements (which is partly to blame for the problems, although it makes some things about variant management easier from build system PoV).
I am using VSCode with VHDL_LS

Now there are few cases where vhdl_ls does not quite work as I hope it would.

  1. If I have for example a record type record_type_common1 defined in common1.vhd and it is used in both top_variant1.vhd and top_variant2.vhd. For "Go to Definition" to work correctly I have to define in vhdl_ls.toml two separate libraries for variant1 and variant2 and put common1.vhd separately to both.
    This is very cumbersome when there are lot of common files, but at least it works.
    Putting variant1 and variant2 files in same library does not work because variant1 and variant2 architectures have same names and then duplicate architecture error prevents navigation from both working.
    For this case it would be useful to have ability to list the common files just once and then say that both lib1 and lib2 contain these files
  2. If I have two variants of same package, for example measurement_scaling_variant1_pkg.vhd and measurement_scaling_variant2_pkg.vhd that both define package measurement_scaling_pkg. Now if some common.vhd file has use work.measurement_scaling_pkg.all statement, then I can only navigate to the version that was defined first in the vhdl_ls.toml. For this I have not found a workaround.
    Here I would hope to have ability to select which of the multiple packages with same name I want to navigate to.
  3. Using glob patterns to get around the issue is also cumbersome because for each library I would need to exclude all the other variants one by one.
    For my case it would be useful if I could just define one pattern that excludes all the variant files and then reinclude specific variant files afterwards.
  4. Some parts of the project reside in a submodules that define their own vhdl_ls.toml files. Currently the parent project can't make use of the information in these. The recursive search of .toml files has already been suggested elsewhere, and that is also something that would alleviate my issues.
[libraries] lib1.files = [ 'src/top_variant1.vhd', # uses all the same commonX.vhd files as other variants 'src/common1.vhd', 'src/common2.vhd', ... 'src/common175.vhd', 'src/measurements/measurement_scaling_variant1_pkg.vhd', # Is used by some commonX.vhd file ] lib2.files = [ 'src/top_variant2.vhd', 'src/common1.vhd', 'src/common2.vhd', ... 'src/common175.vhd', 'src/measurements/measurement_scaling_variant2_pkg.vhd', # Is used by some commonX.vhd file ] 

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