-
Notifications
You must be signed in to change notification settings - Fork 213
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
Fix user facing encoding of stake pool ids (from base16 to bech32). #2055
Merged
iohk-bors
merged 2 commits into
cardano-foundation:master
from
hasufell:hasufell/2023/fix-user-facing-encoding
Aug 27, 2020
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Request: use 4-space indents.
See #2055 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please provide a formatter or an editor config that works. Otherwise these issues will pop up over and over again. I'm not counting spaces while I code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hasufell wrote:
Regarding automated formatting: Unfortunately our team doesn't use an automated formatter besides stylish-haskell (for imports), but if you feel strongly that we should do, then you could start a discussion in our team channel, and try to convince the team of the benefits. 👍
Regarding an editor config: We do provide one here.
@hasufell wrote:
Our team coding standard is actually rather simple in this respect: we just indent each level by 4 spaces. (We make an exception for
where
clauses, which are indented by 2 spaces.)Are you facing an issue that makes it hard to indent in this way? If so, we can discuss ways to fix the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a strong opinion, except that I avoid formatting discussions as much as possible. I'm just saying these things will pop up again if the tooling (formatter or config) doesn't work consistently. I don't think about indentation while coding and I am not counting spaces while doing so.
I also believe developers time is too valuable to count spaces in pull requests (your time and my time). I'll do whatever formatting you want, as long as I'm provided with the tools to do so.
I'm using that one and it seems it doesn't work consistently. Help appreciated. Here is my editor config https://gogs.hasufell.de/hasufell/vim-config/src/branch/workman
See above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hasufell wrote:
I'm sorry, I don't have an automated tool to provide you with, otherwise I would. As I mentioned before, if there is a tool that you think we could use, then feel free to discuss it in the team channel. I would happy to help with the discussion!
The reason for having a team standard is so that we don't have to waste time during PR reviews debating code style. If we have to discuss this in every PR, it would certainly waste time.
As far as I know, most people in our team just configure their tab key to emit 4 spaces. Then no counting is required. Would that work for you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hasufell Just in case there's any doubt, we generally indent code with:
where
clause.Example:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As was in my link to the haskell-vim readme.
So my configuration for haskell-vim now is
This doesn't play nicely with
do
I believe. See below.So please either confirm this configuration or suggest an alternative.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any problem with
do
above ? Also, guards should be 4-space indented like the restThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem with do is if you write something on the same line as do:
This will cause a compile error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is arguably a horrible choice of formatting and It's perhaps much better that the compiler fails to parse this :)