Skip to content

[proposal] Change compiler/linker options, implement docker build, fix error handling and more #236

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Myshkouski
Copy link

@Myshkouski Myshkouski commented Jan 26, 2024

I use this project to build a native app with Ktor server and Sqldelight.
Found some issues should be resolved before it could be done:

1. Compiling and testing this project on Linux targets is challenging.
This project doesn't use a common way of linking binaries with libpq shared library provided by standart package managers (see also this pull).
I've made some changes to libpq.def to overcome the issue to build on Ubuntu host.

Moreover, the majority of dependent projects would target a native (ktor server only, AFAIK) backend deployed inside a linux-based container.
This Dockerfile just gives an idea on how this project could be built for different target platforms in zero-config way.

2. Fatal errors on invalid queries
I have SEGFAULT when trying to execute and invalid SQL query. Seems this fixes an issue, but are there any reasons to call PQfinish on any exception?

TODO:

  • revert groupId
  • revert signing
  • revert nexusPublishing

@Myshkouski Myshkouski changed the title [proposal] Change linker options, implement docker build, fix error handling, fix publishing and more [proposal] Change linker options, implement docker build, fix error handling and more Jan 26, 2024
@Myshkouski Myshkouski changed the title [proposal] Change linker options, implement docker build, fix error handling and more [proposal] Change compiler/linker options, implement docker build, fix error handling and more Jan 26, 2024
@hfhbd
Copy link
Owner

hfhbd commented Mar 3, 2024

Hey, thanks for all the improvements, but can you please revert unnecessary changes? I also provided a devcontainer setup but you should avoid (if possible) running the Kotlin native compiler in a docker environment, it's incredible slow.

@hfhbd
Copy link
Owner

hfhbd commented Mar 3, 2024

Regarding the segfault can you provide a reproducer?

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

Successfully merging this pull request may close these issues.

2 participants