-
Notifications
You must be signed in to change notification settings - Fork 221
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
chore: dotnet targets #3791
base: main
Are you sure you want to change the base?
chore: dotnet targets #3791
Conversation
for more information, see https://pre-commit.ci
Checked with: dotnet build prql-net.sln -p:version="0.10.1" -c Release /p:ContinuousIntegrationBuild=true --nologo
dotnet test PrqlCompiler.tests\PrqlCompiler.Tests.csproj -c release --runtime win-x64 --nologo
dotnet pack PrqlCompiler -p:version="0.10.1" -c Release --include-symbols --no-build --nologo |
Integration of the package (built with commands above and stored into a local feed) into an external project is successful: https://github.com/Seddryck/DubUrl/tree/feature/prql |
@Seddryck this looks great! Thanks for making so much progress. If we can add a GHA, we can definitely merge... |
Where did you get the Someone could argue that the Not sure there is much benefit to using I intentionally targeted Now that you load the DLL from I don't know why you explicitly set ANSI coding, maybe you can enlighten me? We do have a GitHub Action at: We have some problems which I have not been able to figure out, if you're good at FFI in .NET maybe you could take a look? |
(just to clarify, while I appreciate the comments & questions from @vanillajonathan , the main thing we'd want in order to merge is to integrate with our GHA, so future changes can't break the code. Other discussions are very welcome, but not a gate for merging. Thanks!) |
The .editorconfig is a classical one is there anything that is shocking? The .gitignore is also a classical one but it has been extended with some stuffs that could be weird for this project, I confess. In fact, I added these two files because I add some issues with the light .gitignore that was on the repo. But feel free to suggest other versions. I'm not married with them. Regarding the drop of .netstandard, it's related to nullable types. Not sure that many people have a project targeting .NET Framework and depending on a package still not published on Nuget 🧐 It's a balance between maintainability and Yep, I'll add .NET 8.0 on my next edit. TBH was waiting official release to prevent use of RC SDK. File scoped namespace, indeed better to change it now that when you have 200 files. The main benefit of .props and .targets is to have more files leading to smaller .csproj files with better separation of concerns. Your mileage may vary. |
Regarding DllImport or LibraryImport, I was planning to switch when also targeting Linux and MacOS. About ANSI, you could just try with Unicode to see what's happening, the tests were failing on my side. I didn't investigate further but at least now, it's visible and people who don't like it can take a look by themselves. |
I'm not following you regarding the path from which the prql library is loaded. I think I'm just using the relative path to include the dll in the package. The runtime import is not related to this path. As mentioned above, I used this package in another project without issues. So, except if I'm really lucky and I've the same structure in the other project, I have troubles to consider that I really have a relative path dependency when I load the library at runtime. Could you be more explicit where I made a mistake? |
I'm not familiar with GitHub actions and workflows and took a bit of time to check GitHub docs around that. Should be ok soon if it's not too complex to deploy them. |
Thx for the heads up on the hidden issues with FFI. I'll add test to check this after the work on the GHA. I'm clearly not a specialist around FFI but who is? |
FYI we changed some names to fix a name conflict on the rust side — so to minimize work for you, I merged |
I haven't looked much into it so I don't know if there is anything shocking in there. I was wondering if it was based upon your or someones personal preferences, because I think we should follow upstreams .NET conventions.
I think
Maybe it is not a problem then, I just saw: <None Include="..\..\..\..\target\release\libprqlc_lib.dll"> and was thinking maybe that could somehow be a problem, but now that you say it, yeah I think you're right, it's not where it's loaded from at runtime. I just load it a runtime from the build directory because it was easy but I don't know if that is the way to go, because I don't know what the best practices are for when using FFI libraries. Maybe it is to embed it, I don't know.
Yeah, this FFI is really tricky. |
@max-sixty , I'm checking that today and also the GHA. |
for more information, see https://pre-commit.ci
I dropped a message on Discord (channel #bindings) regarding the upload to NuGet.org |
Awesome, thanks for getting the GHA working! I just set up a NuGet account and set up a Gravatar profile for [email protected]. Shall I add you to the NuGet account so you can test it? |
@max-sixty There was a bit of discussion on Discord. I think we need to consider whether to merge this and continue with mono repo, or split the repository by language. |
I'll check out discord — sorry I've been off for a while. I wrote up a quick schematic for whether when I think we should separate into a new repo, interested in feedback
|
I believe the library binaries are now attached to the GitHub release. What do you want to do with this PR? I think monorepo is too much of a maintenance burden and would prefer move into another repo. |
shields.io have badges for package version and package downloads for NuGet packages. |
I do believe that the easiest is to move forward with a specific repo dedicated to these bindings. |
Yes, sorry if I was unclear — if @Seddryck is up for maintaining it, I'd very much welcome another repo containing the dotnet bindings. It would be a great contribution to the PRQL project. (And FWIW I don't think it would require much maintenance...) What would be next to make progress? |
I won't be able to work on this next 10 days but will take it back after. I agree that I'm not expecting a lot of maintenance. |
Can you add |
Yes surely, I'll work on this during the next days. |
Hey @Seddryck, hows it going? |
1 similar comment
Hey @Seddryck, hows it going? |
.editorconfig
and improve.gitignore
files to ensure more consistency.props
and.targets
to ensure long-term consistencyNet Standard 2.0
tonet6.0
andnet7.0
to be able to use null tracking (huge step forward for maintenance)Readme.md
related to installation instructionslibprqlc.dll
toprqlc.dll
and explicitly set ASCII encodingReadme.md
related to how to use it (was already outdated)