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

bug: deduplicate for cancelled compilations #2170

Open
kasiaMarek opened this issue Oct 3, 2023 · 0 comments
Open

bug: deduplicate for cancelled compilations #2170

kasiaMarek opened this issue Oct 3, 2023 · 0 comments
Labels
bug A defect or misbehaviour. difficulty / hard Any change that is hard to implement.

Comments

@kasiaMarek
Copy link
Contributor

kasiaMarek commented Oct 3, 2023

Bloop deduplication mechanism seems not take into account a possibility of cancellation.
In a scenario:

  • compile request (1)
  • compile request (2)
  • cancel compile request (1)

compilation requests get deduplicated and the sources aren't fully compiled as result.

Extra context:

In basic test in CancelCompileLspSuite in metals the are three build targets "a", "b", and "c". Two compilation requests are send but the first one is cancelled. Only "a" build target is compiled. Ci trace:

2023.10.02 12:07:45 INFO  time: generated quick build in 85ms
[2693](https://github.com/scalameta/metals/actions/runs/6379271620/job/17311437263?pr=5683#step:4:2694)
2023.10.02 12:07:45 INFO  logging to files /home/runner/work/metals/metals/tests/unit/target/e2e/compile-cancel/basic/.metals/metals.log
[2694](https://github.com/scalameta/metals/actions/runs/6379271620/job/17311437263?pr=5683#step:4:2695)
2023.10.02 12:07:45 INFO  Started: Metals version 0.0.0+1-12b1b47a+20231002-1201-SNAPSHOT in folders '/home/runner/work/metals/metals/tests/unit/target/e2e/compile-cancel/basic' .
[2695](https://github.com/scalameta/metals/actions/runs/6379271620/job/17311437263?pr=5683#step:4:2696)
2023.10.02 12:07:45 INFO  Attempting to connect to the build server...
[2696](https://github.com/scalameta/metals/actions/runs/6379271620/job/17311437263?pr=5683#step:4:2697)
2023.10.02 12:07:45 INFO  tracing is disabled for protocol BSP, to enable tracing of incoming and outgoing JSON messages create an empty file at /home/runner/work/metals/metals/tests/unit/target/e2e/compile-cancel/basic/.metals/bsp.trace.json or /home/runner/.cache/metals/bsp.trace.json
[2697](https://github.com/scalameta/metals/actions/runs/6379271620/job/17311437263?pr=5683#step:4:2698)
2023.10.02 12:07:45 INFO  time: Connected to build server in 82ms
[2698](https://github.com/scalameta/metals/actions/runs/6379271620/job/17311437263?pr=5683#step:4:2699)
2023.10.02 12:07:45 INFO  Connected to Build server: Bloop v1.5.11
[2699](https://github.com/scalameta/metals/actions/runs/6379271620/job/17311437263?pr=5683#step:4:2700)
2023.10.02 12:07:45 INFO  time: indexed workspace in 0.47s
[2700](https://github.com/scalameta/metals/actions/runs/6379271620/job/17311437263?pr=5683#step:4:2701)
2023.10.02 12:07:45 INFO  compiling a (1 scala source)
[2701](https://github.com/scalameta/metals/actions/runs/6379271620/job/17311437263?pr=5683#step:4:2702)
2023.10.02 12:07:46 INFO  tests.TestingServer#executeCommand 
[2702](https://github.com/scalameta/metals/actions/runs/6379271620/job/17311437263?pr=5683#step:4:2703)
2023.10.02 12:07:46 INFO  Executing command [compile-cancel]
[2703](https://github.com/scalameta/metals/actions/runs/6379271620/job/17311437263?pr=5683#step:4:2704)
2023.10.02 12:07:46 INFO  compilation cancelled
[2704](https://github.com/scalameta/metals/actions/runs/6379271620/job/17311437263?pr=5683#step:4:2705)
2023.10.02 12:07:46 INFO  Cancelling compilation on Bloop server
[2705](https://github.com/scalameta/metals/actions/runs/6379271620/job/17311437263?pr=5683#step:4:2706)
2023.10.02 12:07:46 INFO  Deduplicating compilation of a from bsp client 'Metals 0.0.0+1-12b1b47a+20231002-1201-SNAPSHOT' (since 1.54s)
[2706](https://github.com/scalameta/metals/actions/runs/6379271620/job/17311437263?pr=5683#step:4:2707)
2023.10.02 12:07:46 INFO  compiling a (1 scala source)
[2707](https://github.com/scalameta/metals/actions/runs/6379271620/job/17311437263?pr=5683#step:4:2708)
2023.10.02 12:07:46 INFO  time: compiled a in 0.59s
@tgodzik tgodzik added bug A defect or misbehaviour. difficulty / hard Any change that is hard to implement. labels Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A defect or misbehaviour. difficulty / hard Any change that is hard to implement.
Projects
None yet
Development

No branches or pull requests

2 participants