-
-
Notifications
You must be signed in to change notification settings - Fork 50
Show correct code snippet for products type of plugin #3349
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
Conversation
Thanks so much for submitting a pull request. We appreciate your contribution! We require all contributors to sign our Contributor License Agreement (CLA) before we can merge any code, and we don't currently have a record of a signed CLA for @supersonicbyte. Please email [email protected] and let us know you need to sign a CLA, and we'll get the template over to 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.
Thanks for the PR, @supersonicbyte!
I've left a comment regarding a small thing about using rawValue
.
Another thing I noticed when running your changes is that I'm getting a blank snippet:


Does this work for you or is this a problem on my end?
.option( | ||
.data(named: "package", value: package), | ||
.data(named: "product", value: product.name), | ||
.data(named: "type", value: product.type.stringValue), |
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.
.data(named: "type", value: product.type.stringValue), | |
.data(named: "type", value: product.type.rawValue), |
var stringValue: String { | ||
switch self { | ||
case .library: | ||
return "library" | ||
case .executable: | ||
return "executable" | ||
case .plugin: | ||
return "plugin" | ||
} | ||
} | ||
|
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.
var stringValue: String { | |
switch self { | |
case .library: | |
return "library" | |
case .executable: | |
return "executable" | |
case .plugin: | |
return "plugin" | |
} | |
} | |
We can remove this in favour of using rawValue
.
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.
Hey, I suppose you added a conformation to String
on the ProductType
?
Thanks so much for submitting a pull request. We appreciate your contribution! We require all contributors to sign our Contributor License Agreement (CLA) before we can merge any code, and we don't currently have a record of a signed CLA for @supersonicbyte. Please email [email protected] and let us know you need to sign a CLA, and we'll get the template over to you. |
@finestructure Ok, updated! Please take a look when you find the time. It should work on your end, I was missing one variable in the front end (I probably forgot to commit it) hence the blank you were getting. |
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.
This is great, thanks so much @supersonicbyte! Thank you for your contribution.
I had some thoughts on how we handle executables, but as discussed yesterday, that would be a separate PR. I'll also make a new issue for it, so this can be considered to fix and close #3297.
@cla-bot recheck please |
@cla-bot check |
The cla-bot has been summoned, and re-checked this pull request! |
Fixes #3297
This PR addresse this issue: #3297
Wrong code snippet shown for non-library products. Additionally, executable products are filtered out and will be addressed in a different PR.