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

[deprecation clean up] remove firrtl.ExecutionOptionsManager #2422

Merged
merged 13 commits into from
Nov 30, 2021

Conversation

sequencer
Copy link
Member

@sequencer sequencer commented Nov 21, 2021

4163048 should depend on #2428

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 cleanup

API Impact

This removes many APIs that have been deprecated for a long time:
ExecutionOptionsManager and related APIs: ComposableOptions, HasParser, CommonOptions, HasCommonOptions, FirrtlExecutionOptions, HasFirrtlOptions, FirrtlExecutionResult, FirrtlExecutionSuccess, and FirrtlExecutionFailure

It also removes other deprecated APIs using ExecutionOptionsManager: logger.Logger.makeScope and firrtl.stage.DriverCompatibility.firrtlResultView.

Lastly, it deletes non-deprecated OutputConfig, SingleFile, and OneFilePerModule, but these were types only used by ExecutionOptionsManager APIs.

Backend Code Generation Impact

No impact

Desired Merge Strategy

  • Squash

Release Notes

Remove ExecutionOptionsManager and related APIs. See #2422 for full list of removed APIs

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 changed the title [deprecation clean up] remove firrtl.ExecutionOptionsManager [deprecation clean up][Blocked by #2419] remove firrtl.ExecutionOptionsManager Nov 21, 2021
@sequencer sequencer marked this pull request as draft November 21, 2021 09:59
@sequencer sequencer force-pushed the remove_deprecated_4 branch 4 times, most recently from 0ea1df3 to cd44077 Compare November 22, 2021 04:02
@sequencer sequencer changed the title [deprecation clean up][Blocked by #2419] remove firrtl.ExecutionOptionsManager [deprecation clean up][blocked by #2419] remove firrtl.ExecutionOptionsManager Nov 23, 2021
@sequencer sequencer changed the title [deprecation clean up][blocked by #2419] remove firrtl.ExecutionOptionsManager [deprecation clean up] remove firrtl.ExecutionOptionsManager Nov 29, 2021
Logger.getGlobalLevel then returns LogLevel.Warn when the current value
is LogLevel.None. This preserves the behavior of the default being
"Warn" but now uses LogLevel.None to indicate "I'm not setting the
value." This resolves issues where it was not possible to tell if
annotations were actually setting the log level or if the default level
of warn was just being filled in.
@jackkoenig
Copy link
Contributor

I added a change that effectively reimplements #1305 in a different way.

Removing the old version of Logger.makeScope (changing the argumentless version to use the one accepting AnnotationSeq) exposed a bug where you can't actually tell if an AnnotationSeq is trying to set the log level or not because it defaults to LogLevel.Warn. I changed everything to default to LogLevel.None, but then have the internals understand that and sub in LogLevel.Warn whenever it's set to LogLevel.None.

One might point out that LogLevel.None implies no logging rather than "unset" and at least one test agrees with that. However, I also noticed that other locations in the code clearly use LogLevel.None as "unset" (see Logger.setOptions), and considering we don't let the user set the log level to None in the CLI, I decided to go with this implementation.

@seldridge I'd appreciate some thoughts from you on this.

Copy link
Member

@seldridge seldridge left a comment

Choose a reason for hiding this comment

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

I think your interpretation of LogLevel.None is fine.

A future improvement would fully remove LogLevel.None and set "none" based on "no log level annotation present". Currently, we may be double-encoding this with "no annotation" and LogLevel.None.

@jackkoenig jackkoenig marked this pull request as ready for review November 30, 2021 00:08
@jackkoenig jackkoenig added this to the 1.5.0 milestone Nov 30, 2021
@jackkoenig jackkoenig merged commit b7dd35e into master Nov 30, 2021
@jackkoenig jackkoenig deleted the remove_deprecated_4 branch November 30, 2021 00:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants