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

[bug] LFS_MISSING_FILES not printed after #2347 #2709

Closed
junliume opened this issue Jan 30, 2024 · 1 comment
Closed

[bug] LFS_MISSING_FILES not printed after #2347 #2709

junliume opened this issue Jan 30, 2024 · 1 comment

Comments

@junliume
Copy link
Collaborator

junliume commented Jan 30, 2024

@apwojcik there is another issue on LFS_MISSING_FILES from

list(APPEND LFS_MISSING_FILES ${__fname})

This variable gets cleared from scratch every time the function install_kdb is called. I guess we need to make it a global variable somehow?

same issue has been discussed here: https://stackoverflow.com/questions/10031953/how-to-set-the-global-variable-in-a-function-for-cmake

Originally posted by @junliume in #2702 (comment)

[Observations]:
When a repo is freshly pulled without LFS files been updated:

build git: ✗ ls -ltrah ../src/kernels/*.kdb.bz2
-rw-rw-r-- 1 user user 134 Dec 14 16:22 ../src/kernels/gfx1030.kdb.bz2
-rw-rw-r-- 1 user user 134 Dec 14 16:22 ../src/kernels/gfx900.kdb.bz2
-rw-rw-r-- 1 user user 134 Dec 14 16:22 ../src/kernels/gfx906.kdb.bz2
-rw-rw-r-- 1 user user 134 Dec 14 16:37 ../src/kernels/gfx908.kdb.bz2
-rw-rw-r-- 1 user user 134 Dec 14 16:37 ../src/kernels/gfx90a.kdb.bz2
-rw-rw-r-- 1 user user 132 Jan 29 15:22 ../src/kernels/gfx942.kdb.bz2

One will observe that the GIT LFS files not pulled down, skipped is NOT printed where they should have.

[Debugging]::
If we make the following changes:

# Begin KDB package creation
set_property(GLOBAL PROPERTY LFS_MISSING_FILES)
function(install_kdb FILE_NAME COMPONENT_NAME)
    file(READ ${FILE_NAME} __contents LIMIT 7)
    get_filename_component(__fname ${FILE_NAME} NAME_WLE)
    if(__contents MATCHES "version")
        message("****DEBUGMARK1 ${LFS_MISSING_FILES}")
        set(LFS_MISSING_FILES ${LFS_MISSINGFILES} ${__fname} PARENT_SCOPE)
        message("****DEBUGMARK2 ${LFS_MISSING_FILES}")
    else()

We will observe:

****DEBUGMARK1 
****DEBUGMARK2 
****DEBUGMARK1 gfx90a.kdb
****DEBUGMARK2 gfx90a.kdb
****DEBUGMARK1 gfx1030.kdb
****DEBUGMARK2 gfx1030.kdb
****DEBUGMARK1 gfx908.kdb
****DEBUGMARK2 gfx908.kdb
****DEBUGMARK1 gfx906.kdb
****DEBUGMARK2 gfx906.kdb
CMake Warning at CMakeLists.txt:551 (message):
  GIT LFS files not pulled down, skipped: gfx900.kdb
  

@apwojcik you can see in the above function, LFS_MISSING_FILES unfortunately gets updated every time it is called instead of accumulating the list.

@apwojcik
Copy link
Collaborator

Fixed in #2710

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

No branches or pull requests

2 participants