Skip to content

Conversation

@hasufell
Copy link
Member

Fixes #597

@hasufell hasufell requested a review from fendor April 28, 2022 22:48
*/
public constructor(readonly name: string, readonly version: string = '', readonly installed: boolean = true) {
public constructor(readonly name: string, readonly version?: string, readonly installed: boolean = true) {
this.nameWithVersion = `${name}-${version}`;
Copy link
Collaborator

Choose a reason for hiding this comment

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

This will render now as "*-undefined" if it is ever shown which isn't much better, imo.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I don't like this class, because we create an instance even if there is no such version. It obscures control flow. I'll have more time this evening.

Copy link
Member Author

Choose a reason for hiding this comment

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

This will render now as "*-undefined" if it is ever shown which isn't much better, imo.

Well, if there's undefined falling through in this codepath, then that's a bug. Because undefined in this context means "default" and should have been resolved before.

Copy link
Member Author

Choose a reason for hiding this comment

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

But I also suck hard at OOP, so.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't like this class

Yeah, it is basically a record, not really a class.
Anyway, I prefer it over the unnamed tuple it was before :)

Because undefined in this context means "default" and should have been resolved before.

True

Copy link
Collaborator

@fendor fendor left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the quick fix!

@fendor fendor merged commit a910132 into haskell:master Apr 29, 2022
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.

Confusing dialog on startup: "Need to download ghc-null"

2 participants