| Summary: | xdc.useModule, xdc.module and xdc.loadPackage introduce unnecessary package cycles | ||
|---|---|---|---|
| Product: | [Technology] RTSC | Reporter: | Dave Russo <d-russo> |
| Component: | Tools | Assignee: | Dave Russo <d-russo> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | critical | ||
| Priority: | P3 | CC: | ademars, cring, sascha |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Dave Russo
fixed for xdctools 3.22:
xdc.module(), xdc.useModule(), and xdc.loadPackage() each support a optional second Boolean parameter that allows the caller to specify whether the call should (or should not) add a dependency between the caller's package and the referenced package. If the caller does not specify this parameter the default behavior is:
xdc.module() do not create a dependency
xdc.useModule() create a dependency
xdc.loadPackage() create a dependency
If the second parameter is specified and true then _no_ dependency is created (it is a "weak reference" that could otherwise result in a cyclic dependency).
In addition, "implicit" xdc.useModule calls for proxies (automatically performed during package close) no longer create a dependency between the package package containing the module with the proxy and the delegate module's package.
fixed in r1329. Note this fix includes changes to xdc.runtime.Diags and Text to remove a circular dependency that arises from these modules needing to reference the package that contains a build of their sources (via xdc.loadPackage()). This reference is used to determine which version of the xdc.runtime was used when they were built (which may be different from the current xdc.runtime); if the version does not contain the newly added xdc.runtime.Registry module, Registry is silently not used. This allows existing "rts" packages to be used with new releases of xdctools. Eventually we should removed this check (it's slow and it will result in unreported failures for users of the Registry module). |