Skip to content

[NFC] CS: Misc minor debug output tweaks #65246

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

Merged
merged 1 commit into from
Apr 18, 2023

Conversation

AnthonyLatsis
Copy link
Collaborator

  • Use fancy arrows () because they are distinct from and shorter than ->, and fancier.
  • We have two ways of demarcating locators: @ <locator> and [[<locator>]];. Stick to the first, which is shorter and clearer.
  • 'attempting type variable' → 'attempting binding'. Bindings are attempted, not type variables.
  • considering ->considering:. I think a colon is semantically more fit and makes things easier to read if the considered constraint has arrows in its description or types. Also, it’s shorter this way.

@AnthonyLatsis
Copy link
Collaborator Author

We don’t test this anywhere, do we?

Copy link
Contributor

@xedin xedin left a comment

Choose a reason for hiding this comment

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

LGTM! We still have a few tests in the suite that uses -debug-constraints you’d need to fix and you can add unit tests to unittest/Sema directory if you want to.

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test macOS

@AnthonyLatsis
Copy link
Collaborator Author

I could have just searched for the flag to find the tests but instead I had to launch a smoke test 🤦🏼‍♂️

* Use fancy arrows (`→`) because they are distinct from and shorter than `->`,
  and fancier.
* We have two ways of demarcating locators: `@ <locator>` and `[[<locator>]];`.
  Stick to the first, which is shorter and clearer.
* 'attempting type variable' → 'attempting binding'. *Bindings* are attempted,
  not type variables.
* `considering ->` → `considering:`. I think a colon is semantically more fit
  and makes things easier to read if the considered constraint has arrows in its
  description or types. It’s also shorter this way.
@AnthonyLatsis AnthonyLatsis force-pushed the nfc-debug-constraints branch from 5ef4f67 to 82ac932 Compare April 18, 2023 19:43
@AnthonyLatsis
Copy link
Collaborator Author

AnthonyLatsis commented Apr 18, 2023

you can add unit tests to unittest/Sema directory if you want to

I think I will leave this for another time, if that’s fine 🙂

@AnthonyLatsis
Copy link
Collaborator Author

@swift-ci please smoke test

@xedin
Copy link
Contributor

xedin commented Apr 18, 2023

Yeah, that’s totally fine!

@AnthonyLatsis AnthonyLatsis merged commit 0028322 into swiftlang:main Apr 18, 2023
@AnthonyLatsis AnthonyLatsis deleted the nfc-debug-constraints branch April 18, 2023 23:46
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.

2 participants