Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide user source locators in Builder.error errors #1618

Merged
merged 1 commit into from
Oct 14, 2020

Conversation

jackkoenig
Copy link
Contributor

@jackkoenig jackkoenig commented Oct 13, 2020

Package chisel3 was not properly marked as an internal package so source
locators in reported errors would point to files like Bits.scala.

This issue has existed since 3.2.0.

Example showing the issue: https://scastie.scala-lang.org/ujhmuUv4RjWklwY7KtiToA

[info] [0.000] Elaborating design...
[error] Bits.scala:159: Invalid bit range (3,-1) in class chisel3.Bits
[error] There were 1 error(s) during hardware elaboration.

Bits.scala is not a very useful source locator, this PR fixes it.

Contributor Checklist

  • [NA] Did you add Scaladoc to every public function/method?
  • Did you add at least one test demonstrating the PR?
  • Did you delete any extraneous printlns/debugging code?
  • Did you specify the type of improvement?
  • Did you add appropriate documentation in docs/src?
  • Did you state the API impact?
  • Did you specify the code generation impact?
  • Did you request a desired merge strategy?
  • Did you add text to be included in the Release Notes for this change?

Type of Improvement

  • bug fix

API Impact

No impact

Backend Code Generation Impact

No impact

Desired Merge Strategy

  • Squash

Release Notes

Fix bug where some error messages would give source locators inside Chisel's code instead of user code

Reviewer Checklist (only modified by reviewer)

  • Did you add the appropriate labels?
  • Did you mark the proper milestone (3.2.x, 3.3.x, 3.4.0, 3.5.0) ?
  • Did you review?
  • Did you check whether all relevant Contributor checkboxes have been checked?
  • Did you mark as Please Merge?

Package chisel3 was not properly marked as an internal package so source
locators in reported errors would point to files like Bits.scala.
@jackkoenig jackkoenig added the Bugfix Fixes a bug, will be included in release notes label Oct 13, 2020
@jackkoenig jackkoenig added this to the 3.2.x milestone Oct 13, 2020
@jackkoenig jackkoenig requested a review from a team as a code owner October 13, 2020 22:59
@jackkoenig jackkoenig requested review from ducky64 and removed request for a team October 13, 2020 22:59
Copy link
Contributor

@ducky64 ducky64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jackkoenig jackkoenig added the Please Merge Accepted PRs that are ready to be merged. Useful when waiting on CI. label Oct 14, 2020
@mergify mergify bot merged commit baea2da into master Oct 14, 2020
mergify bot pushed a commit that referenced this pull request Oct 14, 2020
Package chisel3 was not properly marked as an internal package so source
locators in reported errors would point to files like Bits.scala.

(cherry picked from commit baea2da)
mergify bot pushed a commit that referenced this pull request Oct 14, 2020
Package chisel3 was not properly marked as an internal package so source
locators in reported errors would point to files like Bits.scala.

(cherry picked from commit baea2da)
mergify bot pushed a commit that referenced this pull request Oct 14, 2020
Package chisel3 was not properly marked as an internal package so source
locators in reported errors would point to files like Bits.scala.

(cherry picked from commit baea2da)
@mergify mergify bot added the Backported This PR has been backported label Oct 14, 2020
mergify bot added a commit that referenced this pull request Oct 14, 2020
Package chisel3 was not properly marked as an internal package so source
locators in reported errors would point to files like Bits.scala.

(cherry picked from commit baea2da)

Co-authored-by: Jack Koenig <koenig@sifive.com>
@jackkoenig jackkoenig deleted the builder-error-source-locator branch October 17, 2020 22:57
mergify bot added a commit that referenced this pull request Nov 11, 2020
* Provide user source locators in Builder.error errors (#1618)

Package chisel3 was not properly marked as an internal package so source
locators in reported errors would point to files like Bits.scala.

(cherry picked from commit baea2da)

* Resolve backport issues

Co-authored-by: Jack Koenig <koenig@sifive.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
mergify bot added a commit that referenced this pull request Nov 11, 2020
* Provide user source locators in Builder.error errors (#1618)

Package chisel3 was not properly marked as an internal package so source
locators in reported errors would point to files like Bits.scala.

(cherry picked from commit baea2da)

* Resolve backport issues

Co-authored-by: Jack Koenig <koenig@sifive.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backported This PR has been backported Bugfix Fixes a bug, will be included in release notes Please Merge Accepted PRs that are ready to be merged. Useful when waiting on CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants