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

Compiler log unterminated on no-op build. #5545

Closed
cristianoc opened this issue Jul 12, 2022 · 12 comments · Fixed by #5544
Closed

Compiler log unterminated on no-op build. #5545

cristianoc opened this issue Jul 12, 2022 · 12 comments · Fixed by #5544

Comments

@cristianoc
Copy link
Collaborator

1 rescript build -w
2 introduce error
3 fix error
end up with:

% cat lib/bs/.compiler.log
#Start(1657636470928)

This shows up in issues not cleared in the editor extension.

FYI @zth

@cristianoc
Copy link
Collaborator Author

The only recent change to ninja that comes to mind is: #5393
Not clear whether it is related.

CC @cannorin

@cannorin
Copy link
Contributor

I suppose https://github.com/rescript-lang/ninja/pull/2/files is more relevant? (it changed how the #Done line is written)

@cristianoc
Copy link
Collaborator Author

Thanks -- indeed.

@cristianoc
Copy link
Collaborator Author

In fact, it seems unrelated to ninja, but related to the vscode extension.

@cristianoc cristianoc transferred this issue from rescript-lang/rescript-compiler Jul 12, 2022
@cristianoc cristianoc changed the title compiler log unterminated ~compiler log unterminated~ build -w does not clear errors Jul 12, 2022
@cristianoc cristianoc changed the title ~compiler log unterminated~ build -w does not clear errors build -w does not clear errors (was: compiler log unterminated) Jul 12, 2022
@cristianoc
Copy link
Collaborator Author

CC @zth could you take a look -- this looks like an issue with the current extension.

@zth
Copy link
Collaborator

zth commented Jul 12, 2022

CC @zth could you take a look -- this looks like an issue with the current extension.

On it.

@zth
Copy link
Collaborator

zth commented Jul 12, 2022

I draw the same conclusions as the initial post - the compiler log is not terminated for some reason, so the extension does not clear errors. I also tested with ReScript 9.1.4 where I could not reproduce the issue. So I don't think it's in the extension itself.

@cristianoc
Copy link
Collaborator Author

Looks like both the compiler and the extension have changed behaviour in their current versions.

Was wondering whether the extension should be resilient to the compiler not printing the log terminator, just as the previous version of the extension seems to be doing. Though the normal situation where that would happen is when the compiler is in the process of building, and has not finished yet. I guess this is possible as the compiler log would be written incrementally to disk and the watcher could pick up an incomplete change.

So perhaps making the extension more robust w.r.t. unterminated output would also make it wrong.

@cristianoc
Copy link
Collaborator Author

So: isolated a more basic wrong behaviour, without using a watcher: rescript clean then rescript then rescript again gives a terminated log on first build, but unterminated on second build.

@cristianoc
Copy link
Collaborator Author

That's easy to add to a test too, which would be much more complicated if a watcher were involved.

@cristianoc
Copy link
Collaborator Author

Taking a less rushed look at ninja now.

@cristianoc
Copy link
Collaborator Author

Actually all of the above.
Fixing the missing closing log removes printing of cycles done in #5393

@cristianoc cristianoc transferred this issue from rescript-lang/rescript-vscode Jul 13, 2022
@cristianoc cristianoc changed the title build -w does not clear errors (was: compiler log unterminated) Compiler log unterminated on no-op build. Jul 13, 2022
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.

3 participants