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.

Refactor firrtlTests under firrtl package

See original GitHub issue

Type of issue: other enhancement

The separation of firrtlTests from firrtl results in some annoyances (or lots of monkeying around) to test private behavior. E.g., consider:

package firrtl

class X private [firrtl] 

If I can access this constructor from firrtl, it seems logical that I’d like to test it’s behavior in firrtlTests. However, by placing all the tests inside firrtlTests, this is private to testing. There’s some hackery you can do to get at private methods, but that seems inelegant.

As far as I understand it, there’s no need to place tests in a separate package. Those jars are built separately and not included in any fat jar assembly or publishing (as far as I’m aware).

I’d go one step further with this and suggest that the testing packages should match the source packages exactly in terms of names and directory structure.

What is the use case for changing the behavior?

Make it so that you can test private things in package firrtl or sub-packages.

Impact: no functional change

Development Phase: proposal

Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. Stack Overflow, gitter, etc)

This problem exists for some of the other BIG6 packages (Chisel notably).

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
chickcommented, Dec 17, 2018

There can be large chunks of complicated code that can be completely hidden behind an API. I would not feel comfortable just believing the API is going to ensure that code works, and furthermore, if you believe in TDD at all shouldn’t you be writing all your code with tests to guide you. Rant over. Place me in the test everything camp

0reactions
seldridgecommented, Dec 20, 2018

Closing in favor of fine-grained packaging on a case-by-case basis.

Read more comments on GitHub >

github_iconTop Results From Across the Web

freechipsproject/firrtl - Gitter
Is there any documentation about how to obtain a ReferenceTarget in firrtl? I'm trying to eliminate the RANDOMIZE elements outputted by the verilog...
Read more >
What is the difference between the Firrtl option -X and -E
At this point, the emission was a special step in the compilation. Eventually the Scala FIRRTL Compiler was refactored to make emission a...
Read more >
Flexible Internal Representation for RTL - Chisel/FIRRTL
This repository consists of a collection of transformations (written in Scala) which simplify, verify, transform, or emit their input circuit. A Firrtl ......
Read more >
firrtl | Flexible Intermediate Representation for RTL - kandi
This repository consists of a collection of transformations (written in Scala) which simplify, verify, transform, or emit their input circuit. A Firrtl ......
Read more >
文件· v1.2-091719-SNAPSHOT · mirrors / chipsalliance / firrtl · GitCode
.gitignore · WiringTransform Refactor (#648), 4 years ago .install_verilator.sh · Bump version of Verilator used in Travis to 3.922 (#784), 4 years ago....
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