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

Intellij marks ZMongo usages as errors #34

Open
brndt opened this issue Aug 22, 2023 · 4 comments
Open

Intellij marks ZMongo usages as errors #34

brndt opened this issue Aug 22, 2023 · 4 comments

Comments

@brndt
Copy link

brndt commented Aug 22, 2023

I know Intellij is buggy sometimes when working with Scala 3 but can we somehow bypass the display of these errors? I suppose it ocurres because Intellij finds object and trait in the package simultaneously and cannot decide which one it is referring to :)

Screenshot 2023-08-22 at 21 15 34 Screenshot 2023-08-22 at 21 12 43
@Kirill5k
Copy link
Owner

The error that you have on the first screenshot is correct: ZMongoClient does not take any type arguments. it should just be:

database <- ZIO.serviceWithZIO[ZMongoClient](_.getDatabase(config.database))

The second error is quite weird though, Intellij shouldn't be complaining about it.

Out of curiosity, if you run code from this example, will your IDE show errors there as well?

@brndt
Copy link
Author

brndt commented Aug 26, 2023

The error that you have on the first screenshot is correct: ZMongoClient does not take any type arguments. it should just be

Yes I know, I just added two parameters in order to show that Intellij is behaving weird saying opposite things in the hint.
If you don't pass any parameters, it says you should add one; if you pass one, it says you shouldn't pass any; if you pass two, it says both things.

Out of curiosity, if you run code from this example, will your IDE show errors there as well?

Yes:
Screenshot 2023-08-26 at 17 39 52

@CodeCombiner
Copy link

CodeCombiner commented Jan 26, 2024

Having the same issue on the latest Idea
*it compiles and runs well

@Kirill5k Kirill5k reopened this Jan 26, 2024
@brndt
Copy link
Author

brndt commented Jan 31, 2024

https://youtrack.jetbrains.com/issue/SCL-21547

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

No branches or pull requests

3 participants