-
Notifications
You must be signed in to change notification settings - Fork 627
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
Feature/new Bindings generator #946
Conversation
…ignature & will notify if a function references an unregistered enum group
Is writing the generator in F# really a good idea? Almost the entire project is written in C# and it is expected that only C# developers would be interested in contributing to this project. That means that we cannot expect future contributors to have extensive knowledge in F#. So if we write the entire bindings in F# we are in a situation where future maintainers might not be able to use the generator anymore because there is no-one left who knows anything about F#. I'm sorry to say but this does not feel like it is a good idea in the long-term (maybe even the short term as it will take longer to complete and fewer contributors can contribute). Especially looking a the history of this project (changing maintainers and contributors a lot) it feels like this is not the move we want to make. Sorry to revive the discussion @realvictorprm @varon @jvbsl :) |
@realvictorprm - Looking good so far. Can we avoid committing the |
Yes this is no Problem and planned. I haven’t done it yet.
Gesendet von Mail für Windows 10
Von: varon
Gesendet: 12 August 2019 15:46
An: opentk/opentk
Cc: Victor Peter Rouven Müller; Mention
Betreff: Re: [opentk/opentk] Feature/new generator (#946)
@realvictorprm - Looking good so far.
Can we avoid committing the gl4.xml ? Would be ideal if we could manage it as a dependency using the locked commit ID as part of the build process.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
…---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
|
build.fsx
Outdated
|> Seq.concat | ||
|> Seq.toList | ||
|
||
let testAssemblies = "tests/**/obj/Release/*Tests*.dll" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should not be taken from the obj
folder, but bin/Release
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @deccer. We really appreciate ad-hoc reviews and such!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that makes much more sense lol, thanks a lot
|
||
// Generate assembly info files with the right version & up-to-date information | ||
Target.create "AssemblyInfo" (fun _ -> | ||
//TODO: Create and update the Directory.Build.props file with the version information taken from the releaseNotes value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe could be turned into an issue in a Project Build System
? (Edit: I was referring to the TODO line)
build.fsx
Outdated
// This preserves subdirectories. | ||
Target.create "CopyBinaries" (fun _ -> | ||
releaseProjects | ||
|> Seq.map (fun f -> ((System.IO.Path.GetDirectoryName f) @@ "bin/Release/netstandard2.0", "bin" @@ (System.IO.Path.GetFileNameWithoutExtension f))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense, to put that in a variable, for easier maintenance..... /netstandard2.0
i mean (Im not sure if the review thing here, keeps the thing i marked)
build.fsx
Outdated
|
||
let testAssemblies = "tests/**/obj/Release/*Tests*.dll" | ||
|
||
let nugetCommandRunnerPath = ".fake/build.fsx/packages/NuGet.CommandLine/tools/NuGet.exe" |> Fake.IO.Path.convertWindowsToCurrentPath |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe move the nuget.exe path into a variable on top of the script as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll see later if I can remove it, to my memory I think I can remove it...
build.fsx
Outdated
!! "tests/**/*.??proj" | ||
|
||
let allProjects = | ||
[toolProjects ; releaseProjects; testProjects ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
me being picky here, run a Format Document over the files please :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will run Fantomas later
…right now, sorry!
…ild script accordingly
Just for future reference, we gave the response over discord |
Let's keep the history clean! Whenever there's an in-progress investigation/implementation, it's ok to do as many commits as possible. But when done, squash them into one which sums up the work done to finish solving the problem :) |
Before I've used it but it could be that I've removed all usages of it.
Kevin Avignon <notifications@github.com> schrieb am Mo., 19. Aug. 2019,
22:35:
… ***@***.**** commented on this pull request.
------------------------------
In src/Generator/Util.fs
<#946 (comment)>:
> @@ -0,0 +1,72 @@
+module Util
+
+open Types
+
+let inline (</>) path1 path2 = System.IO.Path.Combine(path1, path2)
+
+type MaybeBuilder() =
Except for when you define the maybe builder, I haven't seen a use for it
which triggered my question. Maybe there's something I'm missing??
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#946?email_source=notifications&email_token=AGB4Z4FQEI2PBLD2MATPKNLQFL7ZLA5CNFSM4IK4LXE2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCB72BEI#discussion_r315399469>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGB4Z4CURHCQ4JSE4O6X5XLQFL7ZLANCNFSM4IK4LXEQ>
.
|
Then potentially we should remove the CE for maybe since it's not being used in your implementation? |
I agree, if it's not used anymore by all means! It should be removed :)
Unfortunately I'm not at my PC anymore, maybe someone else can apply that
few bits, the person just needs to ping me on the OpenTK discord or here in
github. Then I'll give the person push rights.
Kevin Avignon <notifications@github.com> schrieb am Mo., 19. Aug. 2019,
22:44:
… Then potentially we should remove the CE for maybe since it's not being
used in your implementation?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#946?email_source=notifications&email_token=AGB4Z4HCCMSU3Z4O2Y63RMTQFMA27A5CNFSM4IK4LXE2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4UHTTI#issuecomment-522746317>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGB4Z4BUQ5YBU6AVKTWXSFTQFMA27ANCNFSM4IK4LXEQ>
.
|
src/Generator/Program.fs
Outdated
@@ -76,6 +78,8 @@ let autoGenerateAdditionalOverloadForType (func: PrintReadyTypedFunctionDeclarat | |||
let (genericName, newParameterType) = | |||
currParameter.typ.typ | |||
|> transformPointerTy i tyMapper | |||
// Yes this is a bit evil, I'm sorry but this was easiest here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this evil?
Improvements!
Thanks so much for this amazing PR, @realvictorprm . It's a huge, huge contribution and helps set up the project and move it forward in the most amazing way. Special Thanks from everyone at OpenTK! |
Replace binder with a rewritten modern variant
The old binder does not work for the new specification. This PR aims to provide a completely new written version using ADL for xplatform native calls. The generator will be completely written in F# as it's best suited for this task.
Testing status
Tests will just verify the transformations and filtering done during the generation process
Comments
This has been decided after a long conversation with Fred, jvbl and Varon with me.