Skip to content

Conversation

@delneg
Copy link
Contributor

@delneg delneg commented Oct 23, 2021

A barebones, hacked-together Django example.

Couldn't get paket working due to cryptic 'Failed to create CoreCLR, HRESULT: 0x80004005' on my machine, so had to remove paket to test everything.
IMHO regular nuget works fine 99% of the times, as well as pip (not poetry)

Anyway, it's clunky due to many issues with imports etc. and for some reason Fable emits argv[1:], but hey it does work!

@delneg
Copy link
Contributor Author

delneg commented Oct 23, 2021

Also, I couldn't get the tests working so you might wanna check that

@dbrattli
Copy link
Collaborator

@delneg Thanks for the PRs. Very nice with django example! But the PRs is currently doing too much, i.e adding example and rewriting all the other projects at the same time and breaking the build.

Fable emits argv[1:] since that is what you would get with EntryPoint in F#. The args with EntryPoint do not include the name of the script as with Python. If you also need the script name you should add type bindings for, and reference the sys module instead.

Not using Poetry. Only using pip. But the poetry.lock file should not have been added to the repo.

Fixing FSharp.Core version to 6 is probably not a good idea since all projects using Fable.Python might not want to use version 6. Why should we force the dependency on them?

You should be able to add your example without changing all the other projects. Please make sure your PR only adds files to examples/django and nothing else. In the example you can use nuget and not paket. Since you are not changing Fable.Python you could also reference the NuGet of Fable.Python instead of the project reference which should keep you out of paket issues.

If you want this project to not use paket, then please open a separate issue instead to discuss things first.

@delneg
Copy link
Contributor Author

delneg commented Oct 23, 2021

IKR, the PR's are opened as-is just as POC, not as an actual thing to be merged atm
I'lll try to do a pinpointed example not touching any other code when i'll have time

@delneg
Copy link
Contributor Author

delneg commented Oct 23, 2021

Superseded by #9

@delneg delneg closed this Oct 23, 2021
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