Skip to content
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

Version check has priority over commands #1219

Closed
AntoineJT opened this issue Jan 30, 2021 · 2 comments
Closed

Version check has priority over commands #1219

AntoineJT opened this issue Jan 30, 2021 · 2 comments

Comments

@AntoineJT
Copy link

AntoineJT commented Jan 30, 2021

Describe the bug

The version check has priority over commands passed to xmake.
I wanted to update in a folder where I have a xmake.lua file with

set_xmakever("2.5.1")

image

Then, in order to check if the bug is still there in the latest version, I updated and changed this line to

set_xmakever("2.5.2")

image

The bug is still present.

Expected behavior

The expected behavior would be to avoid any reading of the xmake.lua file while running the command update

Error output

v2.3.9+202011250023

error: @programdir\core\project\project.lua:1064: xmake v2.3.9 < v2.5.1, please run `$xmake update` to upgrade xmake!
stack traceback:
        [C]: in function 'error'
        @programdir\core\base\os.lua:787: in function 'raise'
        @programdir\core\project\project.lua:1064: in function 'tasks'
        @programdir\core\project\project.lua:1054: in function 'task'
        @programdir\core\main.lua:281: in function <@programdir\core\main.lua:219>

v2.5.1+202101210158

error: @programdir\core\project\project.lua:1070: xmake v2.5.1 < v2.5.2, please run `$xmake update` to upgrade xmake!
stack traceback:
        [C]: in function 'error'
        @programdir\core\base\os.lua:787: in function 'raise'
        @programdir\core\project\project.lua:1070: in function 'tasks'
        @programdir\core\project\project.lua:1060: in function 'task'
        @programdir\core\main.lua:281: in function <@programdir\core\main.lua:219>

Related Environment

Please provide compiling and running environment information:

  • xmake version: v2.3.9+202011250023 + v2.5.1+202101210158
  • os: Windows 10
  • target platform: x64

Additional context

This is clearly a tiny bug, which can be avoided by running xmake update in a folder containing no xmake.lua file, but it's better to know existing bugs even if fixing them is not a priority.

@AntoineJT AntoineJT changed the title Version check is prioritary over commands Version check has priority over commands Jan 30, 2021
@SirLynix
Copy link
Member

I second this.
I had this problem with a xmake.lua not supporting one of the new functions of xmake 2.5.1, and couldn't run update in that folder.

@waruqi
Copy link
Member

waruqi commented Jan 30, 2021

I have fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants