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

Regression: duplicate "missing Scalafmt version" error #1442

Closed
olafurpg opened this issue Jun 30, 2019 · 1 comment · Fixed by #1467 or scalameta/metals#863
Closed

Regression: duplicate "missing Scalafmt version" error #1442

olafurpg opened this issue Jun 30, 2019 · 1 comment · Fixed by #1467 or scalameta/metals#863
Labels

Comments

@olafurpg
Copy link
Member

When upgrading to scalafmt-dynamic v2.0.0 in Metals we encountered a regression from 2.0.0-RC4 where a "missing scalafmt version" warning is reported for a config file that has been updated to include a scalafmt version
https://dev.azure.com/olafurpg/Metals/_build/results?buildId=646&view=logs&jobId=0da5d1d9-276d-5173-c4c4-9d4d4ed14fdb&taskId=5494183b-801e-5084-3b4b-5451c6a14ee1&lineStart=3604&lineEnd=3606&colStart=1&colEnd=126

Steps to reproduce:

  • format with .scalafmt.conf that is missing a version settings, a "missing version" warning is reported as expected
  • add version setting and format again, an invalid "missing version" warning is reported when I expected the format to succeed since the config file has been updated.

It looks like ReentrantCache.getOrAddToCache returns stale results (it doesn't pick up changes in .scalafmt.conf files).

@anilkumarmyla
Copy link
Contributor

Is this similar to #1401 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants