Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Deprecate memlib APIs. #2199

Merged
merged 1 commit into from
Apr 27, 2021
Merged

Deprecate memlib APIs. #2199

merged 1 commit into from
Apr 27, 2021

Conversation

sequencer
Copy link
Member

Contributor Checklist

  • Did you add Scaladoc to every public function/method?
  • Did you update the FIRRTL spec to include every new feature/behavior?
  • 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 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

  • code refactoring

API Impact

deprecate APIs:
CreateMemoryAnnotations
ConfWriter
ReplSeqMem
ReplaceMemMacros and its functions:
.memToBundle
.memToFlattenBundle
.createMemModule
.defaultConnects
.maskBits
.adaptReader
.adaptWriter
.adaptReadWriter
.constructNameMap
.updateMemStmts
.updateMemMods

Backend Code Generation Impact

None

Desired Merge Strategy

  • Rebase: You will rebase the PR onto master and it will be merged with a merge commit.

Release Notes

Reviewer Checklist (only modified by reviewer)

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

@sequencer sequencer added API Deprecation Changing the API but with proper deprecation Backport Automated backport, please consider for minor release labels Apr 24, 2021
@sequencer sequencer mentioned this pull request Apr 24, 2021
14 tasks
@sequencer sequencer force-pushed the memlib_deprecation branch 2 times, most recently from da4d062 to 0f336cf Compare April 27, 2021 01:41
@sequencer sequencer added the Merge Commit Please This branch has useful history, please merge with a merge commit label Apr 27, 2021
@sequencer sequencer added this to the 1.4.x milestone Apr 27, 2021
@sequencer sequencer added Merge Commit Please This branch has useful history, please merge with a merge commit Please Merge Accepted PRs that are ready to be merged. Useful when waiting on CI. and removed Merge Commit Please This branch has useful history, please merge with a merge commit Backport Automated backport, please consider for minor release labels Apr 27, 2021
@mergify mergify bot merged commit 33c0b43 into master Apr 27, 2021
mergify bot pushed a commit that referenced this pull request Apr 27, 2021
@mergify mergify bot added the Backported This PR has been backported to marked stable branch label Apr 27, 2021
mergify bot added a commit that referenced this pull request Apr 27, 2021
(cherry picked from commit 33c0b43)

Co-authored-by: Jiuyang Liu <[email protected]>
@sequencer sequencer deleted the memlib_deprecation branch April 29, 2021 04:11
Comment on lines +9 to 11
@deprecated("CreateMemoryAnnotations will not take reader: Option[YamlFileReader] as argument since 1.5.", "FIRRTL 1.4")
class CreateMemoryAnnotations(reader: Option[YamlFileReader]) extends Transform with DependencyAPIMigration {

Copy link
Contributor

Choose a reason for hiding this comment

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

We should deprecate constructors instead of classes so that people can still have dependencies on them.

  class CreateMemoryAnnotations private (reader: Option[YamlFileReader], dummy: Int) extends Transform with DependencyAPIMigration {
  @deprecated("CreateMemoryAnnotations will not take reader: Option[YamlFileReader] as argument since 1.5.", "FIRRTL 1.4")
  def this(reader: Option[YamlFileReader]) = new CreateMemoryAnnotations(reader, 0)

Copy link
Member Author

Choose a reason for hiding this comment

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

I’ll add another PR to 3.4.x:
Not to deprecate entire class, but only deprecate only this constructor.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
API Deprecation Changing the API but with proper deprecation Backported This PR has been backported to marked stable branch 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.

3 participants