-
Notifications
You must be signed in to change notification settings - Fork 330
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
Fix goto definition leading to case class for overloaded apply in another file #4795
Conversation
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.
Hey @MaciejG604, I will just leave a couple of suggestions which may improve your work loop (they surely were a gamechanger to me!) I think that https://scalameta.org/metals/docs/contributors/getting-started should be a bit easier for newcomers to start, but in this comment I want to focus on that section. What works for me is:
- find places which interest me, that's where I'll put pprint.log(...) calls
- find unit test associated with given feature (you already found it)
- place
.only
after one test, should be relatively easy example. This will make sure that munit will run only only this test from the whole suite - start sbt session and then within it run
~unit/testOnly test.DefinitionLspSuite
This will rerun this session after each saved change. Surely debugger is useful when one isn't familiar with codebase, but after some time I really liked pprint way ;)
Bonus:
In my ~/.sbt/1.0/build.sbt
file I have
commands += Command.command("cls") { state =>
print("\033c")
state
}
then cls
in sbt clear my console. I really like to use this like ~; cls; unit/testOnly test.DefinitionLspSuite
cc: @jkciesluk maybe you'll find this useful too!
MetalsLogger.setupLspLogger(workspace, redirectSystemStreams = true) | ||
|
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.
This shouldn't be necessary to make logging working, is it?
scribe.info( | ||
s"DefinitionProvider.definition looking for definition in snapshot" | ||
) |
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.
You may find pprint.log more appealing rather than scribe
Fixes #4769