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

using unix line endings on windows gives baffling errors #221

Closed
dimbleby opened this issue Jan 13, 2019 · 4 comments
Closed

using unix line endings on windows gives baffling errors #221

dimbleby opened this issue Jan 13, 2019 · 4 comments
Labels
bug error, glitch, fault, flaw, ... Toolbox The TLA Toolbox/IDE

Comments

@dimbleby
Copy link

I'm using version 1.57 of the toolbox.

Although I'm working on Windows, I generally set up my git repositories to use unix line endings.

Trying to translate the following from pluscal to tlaplus:

--------------------------- MODULE foo ---------------------------
(*--algorithm upgrade
begin
    skip;
end algorithm;*)
=============================================================================

gives "Unrecoverable error: Text on same line following *) that ends the comment containing the algorithm". Which is puzzling, partly because it's rather awkwardly phrased so that I'm not completely sure what it's trying to tell me - but mostly because I think that whatever it is trying to tell me is not true.

As I say, I set up my git to commit with LF endings. So I've also had fun where I write a spec that's valid, commit it, and then find that it doesn't work any more. The error that I see then is usually "Unrecoverable error: No line containing `END TRANSLATION". But I can see quite clearly that there is such a line.

This has all been very confusing to debug.

It would be great if the toolbox was agnostic about line endings; if that's not possible, it would be helpful if it could give more useful errors in such cases.

@lemmy lemmy added bug error, glitch, fault, flaw, ... Toolbox The TLA Toolbox/IDE labels Jan 14, 2019
@lemmy
Copy link
Member

lemmy commented Jan 14, 2019

Related to #157

@lemmy
Copy link
Member

lemmy commented Jul 12, 2019

@dimbleby Can you please check if the https://github.com/tlaplus/tlaplus/releases/tag/v1.6.0 release fixes this issue?

@dimbleby
Copy link
Author

It looks as though the toolbox now re-dos-es the file before performing translation - is that what you're expecting?

While that's not completely ideal - I'd prefer that the toolbox was truly agnostic about the line endings and would leave my file using whichever format it found - it's certainly a huge improvement on the cryptic errors that I was seeing when I reported this.

Cheers.

@lemmy
Copy link
Member

lemmy commented Apr 20, 2020

Please reopen if this remains an issue (with latest and greatest).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug error, glitch, fault, flaw, ... Toolbox The TLA Toolbox/IDE
Projects
None yet
Development

No branches or pull requests

2 participants