Open frankitox opened 2 years ago
same here #114
@JacobGood1 just in case you are interested I wrote a couple of commits to address this and other problems related to Windows in a fork. I don't know why hot reload doesn't work but at least I can launch the basic flutter example app.
I just dual boot into Linux when using clojure->dart. Thanks for the FYI!
On Mon, Jun 27, 2022 at 3:01 PM Franco Biasin @.***> wrote:
@JacobGood1 https://github.com/JacobGood1 just in case you are interested I wrote a couple of commits to address this and other problems related to Windows in a fork https://github.com/frankitox/ClojureDart/. I don't know why hot reload doesn't work but at least I can launch the basic flutter example app.
— Reply to this email directly, view it on GitHub https://github.com/Tensegritics/ClojureDart/issues/115#issuecomment-1167761841, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA36PDEDYIWMV7RQARJODPTVRH3BTANCNFSM5ZAGQQJQ . You are receiving this because you were mentioned.Message ID: @.***>
@frankitox can you pinpoint what changes are necessary in your fork ? It's difficult for us because neither @cgrand nor me have windows computers...
Oh @dupuchba , I know this is very low priority so don't worry! I'll write a description of what each commit does (It's mostly replacing \
for /
). I didn't make a PR because the code I wrote is terrible, plus I'm not familiar with the project.
Hello again, I was wondering if this was possibly going to be resolved any time soon. The reason is that I am thinking about teaching clojure->dart in one of my classes. It would be best, I think, if the process of getting a running application is as frictionless as possible for those who use Windows.
@JacobGood1 that would be awesome! @frankitox Are you able to reproduce the issue with the last version of cljd? Since your issue we've changed how the analyzer is built and ran. Otherwise depending on @JacobGood1 classes I'll install a windows VM
@dupuchba When running the following command...
clj -M:cljd flutter -d windows
I get this...
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: Custom build for 'C:\clojure-projects\flutter-test\build\windows\CMakeFiles\4797faae78b8661a583e9948628719a3\flutter_windows.dll.rule;C:\clojure-projects\flutter-test\build\windows\CMakeFiles\453ca6d64bd52f1e32a9294dd0b1b57b\flutter_assemble.rule' exited with code 1. [C:\clojure-projects\flutter-test\build\windows\flutter\flutter_assemble.vcxproj]
Building Windows application... 5.1s
Exception: Build process failed.
? Flutter sub-process exited with 1
When running the command: clj -M:cljd flutter -d chrome
I get this...
=== Compiling cljd.core to Dart 3 ===
=== Compiling to Dart... === @09:03
acme.main
I like when a plan comes together! ???
=== Launching flutter run -d chrome ===
Launching lib\main.dart on Chrome in debug mode...
Waiting for connection from debug service on Chrome...
lib/main.dart:1:1: Error: Error when reading 'lib/lib/cljd-out/acme/main.dart': The system cannot find the path specified.
export "lib/cljd-out/acme/main.dart" show main;
^
org-dartlang-app:/web_entrypoint.dart:21:22: Error: Undefined name 'main'.
if (entrypoint.main is _UnaryFunction) {
^^^^
org-dartlang-app:/web_entrypoint.dart:22:28: Error: Undefined name 'main'.
return (entrypoint.main as _UnaryFunction)(<String>[]);
^^^^
org-dartlang-app:/web_entrypoint.dart:24:26: Error: Undefined name 'main'.
return (entrypoint.main as _NullaryFunction)();
^^^^
Waiting for connection from debug service on Chrome... 767ms
Failed to compile application.
? Flutter sub-process exited with 1
That's weird, 2 remarks:
lib/..
In any case do you know what's the simplest way to use windows on a mac?
@dupuchba I do not use any Apple products, I use Linux or Windows depending on the situation... however, I have heard good things about: https://www.parallels.com/
Here getting the same error trying to develop on Windows, but I found a temporary workaround, regarding compiler output.
I can compile and start Flutter app on Windows by editing file lib\main.dart
:
Remove the lib/
at the beginning of path:
from export "lib/cljd-out/acme/main.dart" show main;
to export "cljd-out/acme/main.dart" show main;
Then run clj -M:cljd flutter -d ...
again.
I also checked the lib\main.dart
file on macOS to find cljd-out/acme/main.dart
also (without the lib\
in front).
Perhaps some issue with building the Dart export path for Windows specifically?
Hope this helps!
@JacobGood1 & @JustForFun119 tackling this issue next week. Sorry for the delay we had other issues to solve /cc @cgrand
Just start a new project and faced the issue (win 10), thank you @JustForFun119 for the workarround!
From conversation in slack.
When trying to run
clj -M:cljd flutter
I get the following outputThe problem happens because of this
If I change it like this
https://github.com/frankitox/cd-64/commit/d5f225db7b160579ae4affa0de50463c832b2eeb#
It works (although I hit another new error)