question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[RFC] IntraModule Namespaces

See original GitHub issue

Provide an API for scoping temporary and non-temporary names within modules.

Related to #535

Proposed API:

// Prefix only temporaries
withTempPrefix("_COV") { ... }
// Prefix all identifiers
withPrefix("jacklib") { ... }

I’m not sure if the user should be expected to give the _ prefix, or if we should mandate that for “temporaries”. It’s currently used by Firrtl as the heuristic for determining which name to delete when constant propagating.

  • Type of issue

    • Bug report
    • Feature request
    • Other enhancement
  • What is the use case for changing the behavior?

Improve internal naming stability. This is particularly relevant for libraries where we would like library code generation to have minimal impact on the names of everything else.

Potential use cases: Assertion coverage library, ECO support (it is absolutely critical to minimize impact on surrounding code for ECOs, I think Firrtl support is also necessary here).

  • Impact
    • no functional change
    • API addition (no impact on existing code)
    • API modification
    • unknown

IMO changes to name generation are API modifications, but increasing stability should be strictly a good thing.

  • Development Phase
    • request
    • proposal

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
jackkoenigcommented, Dec 14, 2017

@edwardcwang I think that seems pretty reasonable

1reaction
edwardcwangcommented, Dec 14, 2017

Why not something like

withPrefix("jackslib") {
  withPrefix("COV") {
    // all names get prefixed with jackslib_COV
  }
  withPrefix("foobar", absolute = true) {
    // all names prefixed with foobar_
  }
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

[RFC] IntraModule Namespaces · Issue #740 · chipsalliance/chisel3 ...
Provide an API for scoping temporary and non-temporary names within modules. Related to #535 Proposed API: // Prefix only temporaries withTempPrefix("_COV") ...
Read more >
RFC 2611 URN Namespace Definition Mechanisms - IETF
A URN is assigned according to the rules of a particular namespace (in terms of syntax, semantics, and process). Daigle, et al. Best...
Read more >
UML-YANG Mapping Tool User Guide Overview
Oct. 10, Support user defined prefix, namespace, etc. Add container or list around concrete ... Fix namespace according to RFC 6087. ... Intra-module:....
Read more >
RFC 2342: IMAP4 Namespace
Abstract IMAP4 [RFC-2060] does not define a default server namespace. ... This document defines a NAMESPACE command that allows a client to discover...
Read more >
Gambit, a portable implementation of Scheme
The Gambit programming system is a full implementation of the Scheme language which conforms to the R4RS, R5RS and IEEE Scheme standards. It...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found