tudortimi / gradle-hdvl

Family of Gradle plugins that provide support for hardware design and verification languages
Apache License 2.0
4 stars 2 forks source link

Fix leakage of transitive dependencies to dependent projects #152

Open tudortimi opened 2 weeks ago

tudortimi commented 2 weeks ago

Assuming we have 3 projects:

If top only defines a dependency on mid, it will still compile, because bot leaks into the compilation of top.

For Xcelium, it seems that the -pkgsearch option would help here. This explicitly forces us to specify where to look for packages. When compiling top, without specifying a dependency on bot, we would get the following:

-makelib top_lib
  -pkgsearch mid_lib
  top.sv
-endlib

This would cause a compile error related to bot not being visible.

This mechanism is only activated when there is at least one -pkgsearch directive. To ensure that we specify all required -pkgsearch options, even when forgetting all dependencies, we can add a dummy -pkgsearch option pointing to the current library.

tudortimi commented 2 weeks ago

We still have to check what happens where dependencies have internal dependencies, which we don't want to expose.

tudortimi commented 2 weeks ago

Exported headers also have to be fixed. Those we can fix in a simulator independent way.