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

Main fn wrapping completely breaks formatting #29

Closed
Noratrieb opened this issue May 11, 2024 · 3 comments · Fixed by #30
Closed

Main fn wrapping completely breaks formatting #29

Noratrieb opened this issue May 11, 2024 · 3 comments · Fixed by #30

Comments

@Noratrieb
Copy link

Noratrieb commented May 11, 2024

Screenshot_20240511-093518

this is a regression from #27 (cc @bend-n if you want to fix it, don't have to of course)

i think the wrapping should continue being string based to fully preserve formatting, but using syn to detect whether wrapping should be done sounds reasonable.

@bend-n
Copy link

bend-n commented May 11, 2024

so we have two options
find the span of where #! starts and match it to the code, OR
rustfmt

@Noratrieb
Copy link
Author

I do not think ferris should touch the formatting of the supplied source code. it should just wrap it in the strings with format!() as it did before

@bend-n
Copy link

bend-n commented May 11, 2024

yeah but format is easier

ivandardi pushed a commit that referenced this issue May 22, 2024
I did not test this locally. I attempted to revert it as cleanly as
possible.
If you prefer I can also revert the *entire* change which has a higher
chance of being correct.

fixes #29

---------

Co-authored-by: bendn <[email protected]>
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 a pull request may close this issue.

2 participants