openfl / lime-vscode-extension

Visual Studio Code extension for OpenFL and Lime projects written in Haxe
https://marketplace.visualstudio.com/items?itemName=openfl.lime-vscode-extension
MIT License
27 stars 4 forks source link

Haxe dependencies list displays non real list of dependencies #101

Closed AltronMaxX closed 9 months ago

AltronMaxX commented 9 months ago

It dispays this list of dependencies: image While the real list of dependencies is that: image In project I ise this dependencies: image I faced with this issue on different devices and on different Haxe language versions. I tried to reinstall Haxe and all dependencies, reinstall all VSCode extensions, connected with Haxe, but everything keeps don't work. Also it ruins Haxe language server, because it tries to find libraries, that not installed and not used at the moment.

joshtynjala commented 9 months ago

because it tries to find libraries, that not installed and not used at the moment.

Exactly which libraries is it trying to find that are not currently installed? Everything from your first screenshot appears your second screenshot, so it seems that there is no issue.

AltronMaxX commented 9 months ago

It tries to find and use SScript library. Also it can't find AE-Script library, that used in project.xml

joshtynjala commented 9 months ago

In your project directory, if you run lime display windows (or mac or linux) in a terminal, it should display the arguments that lime-vscode-extension returns to vshaxe to configure the language server. Can you share the output of that command with me?

AltronMaxX commented 9 months ago
-main ApplicationMain
-cp C:/HaxeToolkit/haxe/lib/flixel/5,4,1
-D flixel=5.4.1
--macro openfl.utils._internal.ExtraParamsMacro.include()
-cp C:/HaxeToolkit/haxe/lib/openfl/9,2,2/src
-D openfl=9.2.2
--macro lime._internal.macros.DefineMacro.run()
-cp C:/HaxeToolkit/haxe/lib/lime/8,0,2/src
-D lime=8.0.2
-cp C:/HaxeToolkit/haxe/lib/hscript/git
-D hscript=2.5.0
-cp C:/HaxeToolkit/haxe/lib/flixel-addons/3,2,1
-D flixel-addons=3.2.1
-cp C:/HaxeToolkit/haxe/lib/flixel-ui/2,5,0
-D flixel-ui=2.5.0
-cp C:/HaxeToolkit/haxe/lib/flxanimate/git
-D flxanimate=3.0.4
--macro keep('IntIterator')
--macro haxescript.UsingHandler.init()
-cp C:/HaxeToolkit/haxe/lib/AE-Script/0,0,2/src
-D AE-Script=0.0.2
-cp C:/HaxeToolkit/haxe/lib/polymod/1,7,0
-D polymod=1.7.0
-D thx_semver
-cp C:/HaxeToolkit/haxe/lib/thx,semver/0,2,2/src
-D thx.semver=0.2.2
-cp C:/HaxeToolkit/haxe/lib/discord_rpc/git
-D linc_discord-rpc=1.0.0
-D discord_rpc=1.0.0
-cp C:/HaxeToolkit/haxe/lib/hxcpp/4,3,2
-D hxcpp=4.3.2
-cp C:/HaxeToolkit/haxe/lib/hxCodec/3,0,2/src
-D hxCodec=3.0.2
--macro hx.strings.internal.Macros.addDefines()
--macro hx.strings.internal.Macros.configureNullSafety()
-cp C:/HaxeToolkit/haxe/lib/haxe-strings/7,0,3/src
-D haxe-strings=7.0.3
-cp C:/HaxeToolkit/haxe/lib/firetongue/git
-D firetongue=2.2.0
-cp source
-cp C:/HaxeToolkit/haxe/lib/hxCodec/3,0,2/src
-D VIDEOS_ALLOWED
-D PRELOAD_ALL
-D POLYMOD_SCRIPT_EXT=.hxs
-D lime-harfbuzz
-D hscriptPos
-D tools=8.0.2
-D FLX_NO_DEBUG
-D POLYMOD_USE_NAMESPACE=false
-D no-compilation
-D NAPE_RELEASE_BUILD
-D POLYMOD_SCRIPT_CLASS_EXT=.hxc
-D FEATURE_MODCORE
-D CHECK_FOR_DEFAULT_CHARACTERS
-D lime-native
-D lime-vorbis
-D lime-cffi
-D lime-openal
-D POLYMOD_MOD_PACK_FILE=modPack.txt
-D POLYMOD_MOD_METADATA_FILE=modMeta.json
-D native
-D lime-curl
-D openfl-native
-D openflPos
-D HXCPP_GC_BIG_BLOCKS
-D POLYMOD_MOD_ICON_FILE=modIcon.png
-D FEATURE_DISCORD
-D FLX_NO_FOCUS_LOST_SCREEN
-D lime-cairo
-D no-deprecation-warnings
-D POLYMOD_SCRIPT_LIBRARY=scripts
-D lime-opengl
-D POLYMOD_ROOT_PATH=assets/gameplay/scripts/
-D FEATURE_FILESYSTEM
-D windows
-D desktop
-dce std
--remap flash:openfl
--macro flixel.system.macros.FlxDefines.run()
--macro macros.CheckHaxeVersion.checkHaxeVersion()
-cp export/release/windows/haxe
-cpp export/release/windows/obj
--macro keep("Main")
joshtynjala commented 9 months ago

Based on your output, Lime is properly detecting AE-Script:

--macro keep('IntIterator')
--macro haxescript.UsingHandler.init()
-cp C:/HaxeToolkit/haxe/lib/AE-Script/0,0,2/src
-D AE-Script=0.0.2

And there is no mention of SScript in the output, so it doesn't seem to be trying to use that library at all.

AltronMaxX commented 9 months ago

But when it tries to build cache, it tries to use macro code from SScript.

Haxe language server started
Haxe Path: haxe.exe
Using --server-connect
Haxe connected!
Listening on port 127.0.0.1:6000
Failed - try fixing the error(s) and restarting the language server:

(unknown) : Type not found : macro.Macro
AltronMaxX commented 9 months ago

This is very strange thing, that occured, while I started using Haxe 4.3 and higher

joshtynjala commented 9 months ago

Sometimes building the cache fails after you switch to a different Haxe version. To fix it, you need to delete the directory where the project gets built, and then restart VSCode. Usually that directory is called Export or bin.

AltronMaxX commented 9 months ago

Oh, it really helped, thanks.