sassanh / qnvim

Neovim backend for Qt Creator
MIT License
136 stars 8 forks source link

chore: unify QtCreator fetching code with CI #36

Closed gikari closed 1 year ago

gikari commented 2 years ago

Before this change, QtCreator fetching code from external directory was different from the one from CI scripts. You'd have to specify QtCreator version in two places, and the external fetch was more complex, requiring you to change file names and checksums for every platform once the version of QtCreator changes.

This change unifies the way to download QtCreator, while simplifying it. Only one place to set Qt

Some drawbacks:

Test Plan

This was tested here: https://github.com/gikari/qnvim/actions/runs/3550716748

Local testing might be necessary:

sassanh commented 1 year ago

Thanks! Sorry for the late response, the diff is all good, the problem is I ran it once on macOS and it failed and I haven't find the time to check it again or investigate the issue, that's why it is taking long. I will check it again as soon as possible.

gikari commented 1 year ago

I've made some changes, so that you don't have to delete the dist* directory every time you want to change the downloaded Qt Creator version. This is useful, when upgrading the plugin to the next version.

Tag Pipeline: https://github.com/gikari/qnvim/actions/runs/3608183214

sassanh commented 1 year ago

OK, it is building on my machine, but it is downloading untracked files in root directory of the project:

On branch feature/unify-qtc-with-ci
Your branch is up to date with 'origin/feature/unify-qtc-with-ci'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        qtc_ver=4.15.2
        qtcreator.7z
        qtcreator_dev.7z

nothing added to commit but untracked files present (use "git add" to track)

Can we avoid this? Or add them to .gitignore maybe?

gikari commented 1 year ago

OK, it is building on my machine, but it is downloading untracked files in root directory of the project:

On branch feature/unify-qtc-with-ci
Your branch is up to date with 'origin/feature/unify-qtc-with-ci'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        qtc_ver=4.15.2
        qtcreator.7z
        qtcreator_dev.7z

nothing added to commit but untracked files present (use "git add" to track)

Can we avoid this? Or add them to .gitignore maybe?

Hm, this should not happen. They supposed to be downloaded into build directory. I will look into it.

gikari commented 1 year ago

This might fix the problem. Just in case: DownloadQtCreator.cmake should not be imvoked manually on local machine. It is invoked by CMake automatically.

sassanh commented 1 year ago

Thanks! It's all good now.