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
Allow for sigil declaration for publicizing of constant #35
Conversation
989c457
to
f993b14
Compare
f993b14
to
6c1a5ff
Compare
README.md
Outdated
```ruby | ||
module Foo | ||
class Update | ||
# packwerk#publicize! |
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 have two preferences for this annotation:
- That it lives at the top of the file, or at least within the first 5 lines of the file
- That it looks a bit more like sorbet (which has
typed: true
, for example). Maybepublic_api: true
?
That being said, this is one of the more meaningful, harder to change design decisions, so I wanted to get input from other folks.
cc @shageman , @technicalpickles, @ngan
I know you folks (especially Ngan) are interested in allowing things to be public via magic comments so this user is graciously helping implement it. I wanted your input on the format of that magic comment.
There are a couple of other places that will require changes related to this sigil. Namely, everything that is coupled to the public folder implementation of privacy.
In the rubyatscale
org:
pack_stats
, example https://github.com/rubyatscale/pack_stats/blob/main/lib/pack_stats/private/metrics/public_usage.rb. (IMO though we can just remove this metric – it has never been useful)- Other places that mention
public_path
orapp/public
.
In gusto:
- The published yard docs of public APIs (could be deprecated if a quick poll suggested it's not used)
- ?? maybe other places, but its pretty greppable
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 @alexevanczuk . The format of the annotation makes sense. I'll make that update and push it back up.
@alexevanczuk Please see the latest changes and let me know your thoughts. Thanks! |
@bschrag620 thanks for doing this. I'm very interested in seeing this merged. Let me talk it over with the team next week and get back to you. We'll need to audit our things (some of which are mentioned by Alex in the inline comment). |
Hi @bschrag620! After some more internal discussion, I would love to approve this with one last change: Let's replace I would be happy to merge your change and then update this detail or for you to update the existing PR. Let me know either way! |
* fixes rubocop and sorbet checks
Thanks @shageman. I've made the requested changes as well as addressed the sorbet and rubocop issues. When doing so, I did notice that the current configuration of rubocop is requiring an empty line after the magic comments, however, it doesn't recognize |
packwerk#publicize!
Packwerk::Privacy::Checker
to avoid duplicative file scans.package.yml
and explicitly declared as public by usage of the sigil.