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

fix autofmt: don't panic when writing blocks out without a srcfile #2854

Merged
merged 5 commits into from
Aug 17, 2024

Conversation

jkelleyrtp
Copy link
Member

@jkelleyrtp jkelleyrtp commented Aug 16, 2024

Code generators don't always have a srcfile, and in many places, we were indexing the srcfile looking for whitespace.

This fixes that by properly guarding against empty src files in a number of places.

@jkelleyrtp jkelleyrtp changed the title fix: don't panic when writing blocks out fix autofmt: don't panic when writing blocks out without a srcfile Aug 16, 2024
@jkelleyrtp jkelleyrtp requested a review from ealmloff August 16, 2024 23:56
@jkelleyrtp jkelleyrtp merged commit 4963aa3 into main Aug 17, 2024
15 checks passed
@jkelleyrtp jkelleyrtp deleted the jk/write-block-out branch August 17, 2024 04:55
@jkelleyrtp jkelleyrtp added this to the 0.6.0 milestone Aug 20, 2024
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