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

Implement configurable access modifiers for top-level types #273

Closed
wants to merge 1 commit into from
Closed

Implement configurable access modifiers for top-level types #273

wants to merge 1 commit into from

Conversation

FriendlyChicken
Copy link
Contributor

@FriendlyChicken FriendlyChicken commented Oct 2, 2021

Top level types can have their access modifiers specified with --access or -ac, supports the following:

*=access
Name=access
Namespace.Name=access
Namespace.MethodsName.Name=access

Should be sufficient to close #186.

@ghost
Copy link

ghost commented Oct 2, 2021

CLA assistant check
All CLA requirements met.

@FriendlyChicken FriendlyChicken changed the title Implement configurable access modifiers for top-level types (closes #186) Implement configurable access modifiers for top-level types Oct 2, 2021
@tannergooding
Copy link
Member

tannergooding commented Oct 11, 2021

I missed that this had been opened and have also put up a PR to handle things: #279

The base approach between the two PRs are fairly similar, but #279 is addressing various perf considerations and has additional remapping functionality on top of what this one provides; as well as providing tests.

The notable differences are:

  • using --with-access-specifier rather than --access (to match the other --with-* options that already exist)
  • pre-parsing the specified remapping strings to AccessSpecifiers in the config constructor
  • fixing a bug where protected and private access specifiers are invalid at certain scopes
  • supporting qualified and remapped names
  • using a cache to avoid additional name lookups showing up in the profiler
  • test coverage

@FriendlyChicken
Copy link
Contributor Author

Sounds good.

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.

Allow configurable access modifier for top-level types from PInvokeGenerator
2 participants