question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Generated code is using full qualifier names

See original GitHub issue

Build Environment SQLDelight version: 1.4.3 OS: MacOS Big Sur beta Gradle version: 6.6-rc-6-all Kotlin version: 1.4.0

Describe the bug Generated code does use full qualifier names and this clashes with my database.* package.

I have my sq files in database/src/commonMain/sqldelight/database/* Gradle configured as following

sqldelight {
    database("Database") {
        packageName = "database"
    }
}

I’ve used this setup on SqlDelight 1.4.0 and 1.4.1 and there was no error as it was generating something like image

But now it’s generating something like: image

that clashes with private val database: DatabaseImpl, while it should be as following, since the correct import is already there image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
AlecStrongcommented, Sep 6, 2020
Screen Shot 2020-09-06 at 4 47 15 PM

rekt

1reaction
JakeWhartoncommented, Sep 6, 2020

Intentional. For use by generated code only.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why do code generators always use fully-qualified identifiers?
Code generators explicitly declare the classes they are using to prevent unexpected behaviour from naming conflicts.
Read more >
Code Syntax Style: Optional Member Qualifiers - JetBrains
In C#, you can qualify instance members with this keyword, and qualify static members with type name or a base type name. These...
Read more >
Disable generic high-level qualifiers - IBM
ISPF allows a generic high-level qualifier when using option 3.4 to print or display a list of data set names. A generic high-level...
Read more >
Generate spring beans based on @qualifier names
You need to create your class with a qualifier name like: @Component("clsA") public class classA. and pass 'clsA' has a qualifier name.
Read more >
Allow setting a qualifier for the generated repository beans ...
Your code is sort of implying you're using the same repository interface name ... Again, if you name them differently you don't need...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found