sqldelight icon indicating copy to clipboard operation
sqldelight copied to clipboard

Hardcoded database implementation package name

Open Omico opened this issue 1 year ago • 4 comments

Fixed #4906

Omico avatar Apr 21 '24 01:04 Omico

Personally I want to get rid of this file at all and move the implementation just below the Database interface with private accessor and also remove the KClass hack.

hfhbd avatar Apr 23 '24 09:04 hfhbd

Personally I want to get rid of this file at all and move the implementation just below the Database interface with private accessor and also remove the KClass hack.

I think splitting the file helps with debugging. When you encounter a problem during use, the entire file is not generated, which may make it more difficult to locate the problem code. For this PR, I am just not satisfied with the generated naming only.

Omico avatar Apr 27 '24 02:04 Omico

I think splitting the file helps with debugging. When you encounter a problem during use, the entire file is not generated, which may make it more difficult to locate the problem code.

I don't understand this specific use-case: You do have problems with code gen, and you need debug the generating of the database file. If so, this is a bug in sqldelight but this should not be "improved" by changing the generated file name.

Do you want to change the PR? Otherwise, I can take it.

hfhbd avatar May 20 '24 13:05 hfhbd

I think splitting the file helps with debugging. When you encounter a problem during use, the entire file is not generated, which may make it more difficult to locate the problem code.

I don't understand this specific use-case: You do have problems with code gen, and you need debug the generating of the database file. If so, this is a bug in sqldelight but this should not be "improved" by changing the generated file name.

Do you want to change the PR? Otherwise, I can take it.

I don't like the generated naming of the package name. It makes me feel this is ugly. This is my only motivation for submitting this PR. You should create a new PR if you have other ideas for this project.

Also, the reason I changed the test file is because it's associative.

Omico avatar May 20 '24 14:05 Omico