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

[FR] - Rename SocketPath to NodeSocket and export it #4401

Closed
erikd opened this issue Aug 30, 2022 · 3 comments
Closed

[FR] - Rename SocketPath to NodeSocket and export it #4401

erikd opened this issue Aug 30, 2022 · 3 comments
Assignees
Labels
comp: cardano-api enhancement New feature or request type: feature request Request a new functionality user type: internal Created by an IOG employee

Comments

@erikd
Copy link
Contributor

erikd commented Aug 30, 2022

Internal/External
Internal if an IOHK staff member.

Area
API

Describe the feature you'd like
Currently there is SocketPath newtype defined in cardano-api/src/Cardano/Api/TxSubmit/Types.hs but it has two problems:

  • It is exported from that module but that module is private to cardano-api.
  • The name is a little too general. NodeSocket would be better.
@erikd erikd added the enhancement New feature or request label Aug 30, 2022
@erikd
Copy link
Contributor Author

erikd commented Sep 6, 2022

Since we want to rename and export this, it might be a good idea to remove duplicate defintions (this is from the 1.35.3 tag):

> pwd
/home/erikd/Git/IOHK/NewCodeBase/cardano-node
> grep -r ^newtype --include=\*.{hs,lhs} . | grep -v dist-newstyle | grep SocketPath
./cardano-api/src/Cardano/Api/TxSubmit/Types.hs:newtype SocketPath = SocketPath
./cardano-api/src/Cardano/Api/LedgerState.hs:newtype SocketPath = SocketPath
./cardano-submit-api/src/Cardano/TxSubmit/CLI/Types.hs:newtype SocketPath = SocketPath
./cardano-node/src/Cardano/Node/Configuration/NodeAddress.hs:newtype SocketPath = SocketPath
./cardano-cli/src/Cardano/CLI/Types.hs:newtype SocketPath = SocketPath { unSocketPath :: FilePath }

Maybe this even belongs in something like cardano-base.

@erikd
Copy link
Contributor Author

erikd commented Sep 6, 2022

Also it must have an accessor function as well. Eg:

newtype NodeSocket = NodeSocket { unNodeSocket :: FilePath }

@Jimbo4350
Copy link
Contributor

Jimbo4350 commented Oct 31, 2022

Completed in #4446

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: cardano-api enhancement New feature or request type: feature request Request a new functionality user type: internal Created by an IOG employee
Projects
None yet
Development

No branches or pull requests

4 participants