Closed MangelMaxime closed 3 years ago
Thanks @MangelMaxime! Oh my, this is weird. I did try after the update and it worked when clearing the cache but I realize now I have to do it every time I open the repl in a new tab. Maybe the service worker is not working properly and we should disable it?
I tried to make the ServiceWorker work (pun unintended) but it was giving the same problem so I disabled it for now. Can you please try again?
Hum at first, it wasn't working for me but after openin it in a Private navigation it works. 🤷♂️
However, it you compile an "empty" file you get this error in the console:
Uncaught SyntaxError: class statement requires a name
Nothing too problematic but well, we don't like errors don't we 😂.
I also, see that Thoth.Json or more general the libraries have been removed. Any plan on re-adding them or it was just too hacky?
Ah, this is funny, it seems it outputs and empty class for an empty file.
About the libraries, yes it was hacks all over the place to make them work. I had an idea to serialize inline expressions so any library could be precompiled and loaded onto the repl. I did the first thing, remove the hacks, but unfortunately didn't have have time to implement the second, that is, the new feature. Now I'm in doubt if I should bring back the hacks or try to make the serialized inline expressions work 🤔
Personnaly, I think that if we can have "clean" solution it is better because in the end upgrading the libraries was not an easy job. I kind of gave up doing it in the end because of the difficulty.
It would be interesting to see if we can load libraries from the REPL wihtout bundling them in it. Kind of like some REPL does it for ELM or NPM. They take them from their package manager directly (npm.org or elm package manager). The idea being that, we don't have to release a new version of the REPL for each library and don't increase the chance of breaking the REPL because of that.
But perhaps it is too complex to make such a system...
Ah yes, I didn't look at the generated JavaScript ^^
If what I have in mind can be implemented, it should be possible, but we would still need to put the library sources somewhere because there's no way to download Nuget packages from the browser (that I'm aware of)
@alfonsogarciacaro Well, if it's just about sending the code somewhere I think it is still better than the previous REPL which had a strong link between the library and the REPL.
I'll close this as the repl should be working now, please reopen if you still have issues.
Well, there is still the cache problem on first load. But forcing to clean the cache seems to works.
Perhaps, we could show a message on the loading page saying if loading take more that X... please reload clearing your cache... Not great UX neither...
Seems the ServiceWorker was still lingering around 😡 I've made another attempt to remove it, can you please try again? (unfortunately you still may need to hard refresh once)
On this computer it seems ok for me :) Thank you :)
@alfonsogarciacaro First congrats on the release of Fable 3.
I think the new release of the REPL broke it.
I encounter 2 problems:
Full url: https://fable.io/repl/app.2e87a0d750e00dfae456.js