-
Notifications
You must be signed in to change notification settings - Fork 0
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
generated file has mixed up namespaces #2
Comments
Just notice that the template uses v4.2.4 instead of the latest v4.3.0.. I guess this could just be a template out of date issue. |
Tried updating the template packages, but paket can't seem to resolve anything higher than what it currently is. (some sort of dependency resolution hell?) |
hey, we recently upgraded everything to fsharp.core 4.6.2 and just forgot to upgrade the template too. The .g.fs files are not added to the project, they're "magically" smuggled in by the MSBuild plugin which works fine for VS2017/19 but always had some problems in vs code. (you can always add it to the project manually) The DomainType-Attribute instructs The plugin to generate the incrementalized version for the type and therefore you need it whenever using it in your model. |
ahh, so the template including model.g.fs by default was just to show how it works/ compatibility with VS code? |
i just updated template but could not yet check your problem unfortunately. |
Thanks for doing that! I just tested it. Looks like its a different flavor of the exact same issue. here is the updated repo. Looks like it's now just adding "Mutable." to the front of every static call to create or update. Removing it would be the correct way to call. |
oh. i will look into this tomorrow
Dallin Beutler <[email protected]> schrieb am Do., 8. Aug. 2019,
21:49:
… Thanks for doing that! I just tested it. Looks like its a different flavor
of the exact same issue. here is the updated repo
<https://github.com/dallinbeutler/UpdatedAardvarkDomainIssue>. Looks like
it's now just adding "Mutable." to the front of every static call to create
or update. Removing it would be the correct way call.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2?email_source=notifications&email_token=AAD5KAOSVGSLWF5IMUGRJODQDR2DPA5CNFSM4IKBU3DKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD34WXFA#issuecomment-519662484>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAD5KAL6ZTUN2UUI6JMK7VTQDR2DPANCNFSM4IKBU3DA>
.
|
yep, there seems to be problems with modules in model files. we typically put models into namespaces. So as you can see in media examples we follow the pattern: Model.fs, App.fs. App provides the module App which also holds the functions. at the moment the compiler works like this in this regard:
should we fix it or stay as is, document and only support namespaces? @krauthaufen |
ahh, an interesting alternative to laying things out than I'm used to. thanks for that example. Yeah, same issue, and the changes you made would fix it. I only ever really work with modules, so it's a mindset change |
Hey, sadly Model-Types need to be in a separate file due to our compiler plugin. So sadly you must put model and app in different files atm. actually I've been annoyed by that a billion times but couldn't figure out a better way... |
oh ok. good to know! I wish I knew how to help, but it's quite deeply embedded in things I'm still learning. |
here is the repo with the issue.
while working through the aardvark.media tutorials starting with the template, I created two different model files. ModVector.fs has a Components namespace with two modules each containing DomainType records.
The files that get generated each have problems ( which I added comments to for clarity)
Another issue is that ModVector.g.fs doesn't get added to the project automatcally like Model.g.fs does. (Worth noting that it would have to be added above Model.g.fs because of dependencies)
The text was updated successfully, but these errors were encountered: