-
-
Notifications
You must be signed in to change notification settings - Fork 816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Packages are not taken into account until you wipe out the cache #1420
Comments
I have fixed it on dev, you can try it again. |
I managed to reproduce it on the first try right after updating lynix@SirLynixVanDesktop:/mnt/c/Projets/Tests/xmake-build/test_packagecache$ xmake.exe
checking for platform ... windows
checking for architecture ... x64
checking for Microsoft Visual Studio (x64) version ... 2019
[ 25%]: compiling.release src\main.cpp
[ 50%]: linking.release test_packagecache.exe
[100%]: build ok!
** Add fmt to xmake.lua and update main.cpp **
lynix@SirLynixVanDesktop:/mnt/c/Projets/Tests/xmake-build/test_packagecache$ xmake.exe
[ 25%]: compiling.release src\main.cpp
error: main.cpp
src\main.cpp(1): fatal error C1083: Impossible d'ouvrir le fichier include : 'fmt/core.h' : No such file or directory
lynix@SirLynixVanDesktop:/mnt/c/Projets/Tests/xmake-build/test_packagecache$ xmake.exe -vD
[ 25%]: compiling.release src\main.cpp
"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.28.29910\\bin\\HostX64\\x64\\cl.
exe" -c /EHsc -nologo -Fobuild\.objs\test_packagecache\windows\x64\release\src\main.cpp.obj src\main.cpp
error: @programdir\modules\private\async\runjobs.lua:225: @programdir\modules\private\action\build\object.lua:78: @progr
amdir\modules\core\tools\cl.lua:447: main.cpp
src\main.cpp(1): fatal error C1083: Impossible d'ouvrir le fichier include : 'fmt/core.h' : No such file or directory
stack traceback:
[C]: in function 'error'
[@programdir\core\base\os.lua:800]: in function 'raise'
[@programdir\modules\core\tools\cl.lua:447]: in function 'catch'
[@programdir\core\sandbox\modules\try.lua:127]: in function 'try'
[@programdir\modules\core\tools\cl.lua:401]:
[C]: in function 'compile'
[@programdir\modules\private\action\build\object.lua:78]: in function 'script'
[@programdir\modules\private\action\build\object.lua:91]: in function '_build_object'
[@programdir\modules\private\action\build\object.lua:116]: in function 'jobfunc'
[@programdir\modules\private\async\runjobs.lua:201]:
[C]: in function 'trycall'
[@programdir\core\sandbox\modules\try.lua:121]: in function 'try'
[@programdir\modules\private\async\runjobs.lua:194]: in function 'cotask'
[@programdir\core\base\scheduler.lua:365]:
stack traceback:
[C]: in function 'error'
@programdir\core\base\os.lua:800: in function 'raise'
@programdir\modules\private\async\runjobs.lua:225: in function 'catch'
@programdir\core\sandbox\modules\try.lua:127: in function 'try'
@programdir\modules\private\async\runjobs.lua:194: in function 'cotask'
@programdir\core\base\scheduler.lua:365: in function <@programdir\core\base\scheduler.lua:362> |
Could this be related to WSL? I tried to reproduce it with powershell without success. |
you need run |
I deleted the .xmake folder after updating, I guess that does the trick too. |
I managed to reproduce it with Powershell as well, same output as earlier. To be clear, what I'm doing is having the project without fmt (with a simple C++ hello world), compile it using xmake, then I add fmt to xmake.lua and change main.cpp to use fmt, xmake again and get an error. |
I have improved it. you can try it again. |
It looks right, I couldn't reproduce it, thanks! |
Describe the bug
When you make a project, build it with xmake and then adds some package, xmake won't ask you to install it until you wipe out the cache.
How to reproduce:
Have this xmake.lua:
src/main.cpp:
Build it and run it:
So far so good.
Now edit the xmake.lua:
(Not required) edit main.cpp:
Build again:
xmake didn't ask me to install fmt lib.
If I delete the .xmake folder and try again:
Also
I think this is related, if you input "n" and try again, xmake won't ask you to install package again:
I couldn't reproduce it everytime, sometimes it works well and sometimes it has this bug, but it happens fairly often
Expected behavior
That xmake always ask to install mandatory packages if not installed and take them into account.
Related Environment
Please provide compiling and running environment information:
The text was updated successfully, but these errors were encountered: