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

Revert soft keyword escaping #1597

Closed
wants to merge 2 commits into from
Closed

Conversation

Egorand
Copy link
Collaborator

@Egorand Egorand commented Jun 12, 2023

A manual revert of #994.

@Egorand Egorand marked this pull request as draft June 12, 2023 10:52
Copy link
Collaborator

@swankjesse swankjesse left a comment

Choose a reason for hiding this comment

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

Instead of this, could we do something different in NameAllocator ? Like detect soft keywords and backtick them?

Copy link
Collaborator

@swankjesse swankjesse left a comment

Choose a reason for hiding this comment

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

Actually I think what KotlinPoet does here is perfect. Maybe Wire isn’t doing the right thing? I think it should get backticks instead of value_

@JakeWharton
Copy link
Collaborator

The two behaviors are intrinsically linked. The list of keywords determines both which are backticked when emitted and which get underscore prefixes from NameAllocator. It's actually somewhat of a surprising behavior.

@Egorand Egorand changed the base branch from master to main July 5, 2023 09:20
@Egorand
Copy link
Collaborator Author

Egorand commented Jan 15, 2024

We won't do this. Instead, we exposed API to control NameAllocator's behaviour w.r.t. keywords: #1803.

@Egorand Egorand closed this Jan 15, 2024
@Egorand Egorand deleted the egor.230612.revert-keyword-escaping branch January 15, 2024 16:00
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.

4 participants