-
Notifications
You must be signed in to change notification settings - Fork 11
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
Normalize file endings #102
base: master
Are you sure you want to change the base?
Conversation
knock knock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should write a SQL migration file that does this normalization on all existing files/submissions.
On that note, can we do this within SQLite? I suppose we'd not want native line-endings, but to just normalize everything into \n
, to make the database portable...
What do you mean by "within SQLite"? It looks like SQLite has no option for line endings normalization. I'm currently normalizing BEFORE inserting them into the database. Maybe we can write a conversion script for the entire db and run it at startup? This can make startup slower than it should be, so a better solution would be saving the current OS in the db, then if it doesn't match we will issue some kind of warning or maybe panic. |
When you merge this PR it creates a problem where we have an invariant assuming that all text in the database has already been normalized, which is not true for text that already has been inside the database before the update. That aside, my original vision for the |
There's also the problem of mismatch between the end user's OS (the contestants') and the server. We cannot normalize the contestant's code using |
No description provided.