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

Deprecate --protocol-params-file option of the transaction build command more thoroughly #28

Conversation

newhoggy
Copy link
Contributor

@newhoggy newhoggy commented Jun 16, 2023

Description

Changelog

- description: |
    The `--protocol-params-file` option of the `transaction build` command is
    now marked as deprecated in Usage help.  The option was already deprecated
    and ignored.
  compatibility: compatible
  type: bugfix

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • The change log section in the PR description has been filled in
  • New tests are added if needed and existing tests are updated. These may include:
    • golden tests
    • property tests
    • roundtrip tests
    • integration tests
      See Runnings tests for more details
  • Any changes are noted in the CHANGELOG.md for affected package
  • The version bounds in .cabal files are updated
  • CI passes. See note on CI. The following CI checks are required:
    • Code is linted with hlint. See .github/workflows/check-hlint.yml to get the hlint version
    • Code is formatted with stylish-haskell. See .github/workflows/stylish-haskell.yml to get the stylish-haskell version
    • Code builds on Linux, MacOS and Windows for ghc-8.10.7 and ghc-9.2.7
  • Self-reviewed the diff

Note on CI

If your PR is from a fork, the necessary CI jobs won't trigger automatically for security reasons.
You will need to get someone with write privileges. Please contact IOG node developers to do this
for you.

@newhoggy newhoggy changed the title Deprecate --protocol-params-file option of the transaction build comm… Deprecate --protocol-params-file option of the transaction build command more thoroughly Jun 16, 2023
@newhoggy newhoggy changed the title Deprecate --protocol-params-file option of the transaction build command more thoroughly Deprecate --protocol-params-file option of the transaction build command more thoroughly Jun 16, 2023
@newhoggy newhoggy force-pushed the newhoggy/deprecate-tx-build-protocol-params-file-more-thoroughly branch from c1b9737 to f9ebbe5 Compare June 16, 2023 08:50
@@ -232,7 +234,7 @@ data TransactionCmd
[ScriptFile]
-- ^ Auxiliary scripts
[MetadataFile]
(Maybe ProtocolParamsFile)
(Maybe (Deprecated ProtocolParamsFile))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This makes it more obvious a field is deprecated.

, "retrieved from the node."
]
, Opt.completer (Opt.bashCompleter "file")
]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Deprecated options should have help that reflects that.

mUpperBound certs wdrls metadataSchema scriptFiles metadataFiles mDeprecatedProtocolParamsFile
mUpProp outputOptions = do
forM_ mDeprecatedProtocolParamsFile $ \_ ->
liftIO $ printWarning "'--protocol-params-file' for 'transaction build' is deprecated"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Warn early rather than print warnings deep within the call hierarchy and after doing work.

mUpdatePropF mOverrideWits outputOptions = do

liftIO $ forM_ mpparams $ \_ ->
printWarning "'--protocol-params-file' for 'transaction build' is deprecated"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

mpparams is never used except for this warning, so don't pass it in the first place.

Filepath of the JSON-encoded protocol parameters file
Filepath of the JSON-encoded protocol parameters
file. DEPRECATED The option is ignored and protocol
parameters are retrieved from the node.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Help changes.

Copy link
Contributor

@Jimbo4350 Jimbo4350 left a comment

Choose a reason for hiding this comment

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

LGTM. What we should start doing is also specifying in the warning which release we intend to move from deprecation to removal. I think in the past we agreed on 2 releases?

@carbolymer
Copy link
Contributor

@Jimbo4350 should we leave "better deprecation" message or remove the argument altogether? #34

@newhoggy newhoggy added this pull request to the merge queue Jun 20, 2023
Merged via the queue into main with commit 16649a7 Jun 20, 2023
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants