fable-compiler / fable-import

Fable bindings for JavaScript libraries
Apache License 2.0
33 stars 32 forks source link

Incorrect open in Fable.Import.Browser.fs? #95

Open masq6r opened 4 years ago

masq6r commented 4 years ago

The latest commit 274ac05 of Fable.Import.Browser.fs has the following opens:

open System
open Fable.Import.JS
open Fable.Core
open System

I think it's supposed to be open Fable.Core.JS since the announcement for 2.2 says

The new Fable.Core major release doesn't contain many new additions, but the main change is renaming Fable.Import.JS to Fable.Core.JS

Then I have a problem that the compiler complains Fable.Import.JS does not contain Float32Array something.

alfonsogarciacaro commented 4 years ago

Hi @masq6r! This repository is outdated now. Please refer to https://github.com/fable-compiler/fable-browser

You can read the motivation for the change here: https://fable.io/blog/Announcing-2-2.html#fable-browser

masq6r commented 4 years ago

Hi @masq6r! This repository is outdated now. Please refer to https://github.com/fable-compiler/fable-browser

You can read the motivation for the change here: https://fable.io/blog/Announcing-2-2.html#fable-browser

Thank you for your reply now I understand they've been migrated to Fable.Core.Browser. But I failed to find the WebGL bindings so I guess we have some of the migration missing?

MangelMaxime commented 4 years ago

Hello @masq6r ,

it is possible that we missed the port of the WebGL API in the new repo. We kind of do it step by step when people ask for the API because it takes a bit of time and also at first we were not sure 100% of the new API design.

I guess we could use these types to identify most of the WebGL API and port it?

masq6r commented 4 years ago

@MangelMaxime Thank you very much for highlighting these APIs. It would be a good start point.

MangelMaxime commented 4 years ago

Your welcome :)

Do you want to give a try for creating the new package in the new repo, taking example on the existing package? Of course, we can give guidance :)

masq6r commented 4 years ago

Yes I'd like to. I'm now eyeball-parsing the old fable-import repo and will try to establish a repo about WebGL.

alfonsogarciacaro commented 4 years ago

Ah, yes. I remember I removed the WebGL types from the Browser.Dom package because there were a lot of them and most applications didn't need them. In fact, it seems nobody has needed them until now.

Hopefully, WebGL types should be easy to identify from the old Fable.Import.Browser and move them to a new package. We may also need an extension for this method as we do in the Browser.Css package.

Even if they're separate packages, at the end we're putting all of them in the same repo. If you want, I can try creating the project and moving the types, but it'd be great if some active users could check them and make sure the API is up-to-date. If you'd like to that @masq6r I can publish a first alpha version and then give you access to publish new ones with updates.