toradex / vscode-torizon-templates

VS Code Torizon Integrated Development Environment Templates
MIT License
14 stars 20 forks source link

`try-update-template` and `try-update-template-accepting-all` do not work #168

Closed griloHBG closed 4 days ago

griloHBG commented 6 months ago

Hi all!

As requested, creating a new issue from the discussion on https://github.com/toradex/vscode-torizon-templates/issues/163.

Here is my tasks.json.

You can see that is indeed using docker-compose instead of docker compose. I tried to overcome it by triggering both try-update-template and try-update-template-accepting-all, but tasks.json was not modified/updated. In fact, I could not find out what changed... 🤔

After try-update-template-accepting-all, I see on the DEBUG CONSOLE:

You are about to accept all incoming changes from the updated template
If the project is not versioned there is no way back
Accept all changes? [y/n]: y
⚠️  project updater updated, running it again                                 
You are about to accept all incoming changes from the updated template
If the project is not versioned there is no way back
Accept all changes? [y/n]: y
✅ always accept new                                                         
Applying common tasks ...
Renaming file contents ...                                                   
/path/to/project/testqt/.conf/tmp/__change__.pro
/path/to/project/testqt/.conf/tmp/.gitignore
/path/to/project/testqt/.conf/tmp/.gitlab-ci.yml
/path/to/project/testqt/.conf/tmp/build-application.yaml
/path/to/project/testqt/.conf/tmp/c_cpp_properties.json
/path/to/project/testqt/.conf/tmp/docker-compose.yml
/path/to/project/testqt/.conf/tmp/Dockerfile
/path/to/project/testqt/.conf/tmp/Dockerfile.debug
/path/to/project/testqt/.conf/tmp/launch.json
/path/to/project/testqt/.conf/tmp/README.md
/path/to/project/testqt/.conf/tmp/tasks-next.json
/path/to/project/testqt/.conf/tmp/c_cpp_properties.json
/path/to/project/testqt/.conf/tmp/launch.json
/path/to/project/testqt/.conf/tmp/tasks-next.json
✅ common                                                                    
✅ specific
✅ Update done

But tasks.json remains the same (it still uses docker-compose) and the tmp folder inside .conf directory of my project doesn't exist.

If I trigger try-update-template-accepting-all while running watch -n.1 "ls -la ./testqt/.conf/tmp && ls -la ./testqt/.conf/tmp > xablau" on a terminal, at the end, I can see the contents of xablau:

 $ cat xablau
total 152
drwxrwxr-x 2 grilo grilo  4096 jan 27 00:03 .
drwxrwxr-x 4 grilo grilo  4096 jan 27 00:03 ..
-rw-rw-r-- 1 grilo grilo  2261 jan 27 00:03 build-application.yaml
-rw-rw-r-- 1 grilo grilo   411 jan 27 00:03 c_cpp_properties.json
-rw-rw-r-- 1 grilo grilo  1306 jan 27 00:03 __change__.pro
-rw-rw-r-- 1 grilo grilo  1959 jan 27 00:03 docker-compose.yml
-rw-rw-r-- 1 grilo grilo  4632 jan 27 00:03 Dockerfile
-rw-rw-r-- 1 grilo grilo  3632 jan 27 00:03 Dockerfile.debug
-rw-rw-r-- 1 grilo grilo   324 jan 27 00:03 .gitignore
-rw-rw-r-- 1 grilo grilo  2390 jan 27 00:03 .gitlab-ci.yml
-rw-rw-r-- 1 grilo grilo  6825 jan 27 00:03 launch.json
-rw-rw-r-- 1 grilo grilo  4557 jan 27 00:03 README.md
-rw-rw-r-- 1 grilo grilo 91546 jan 27 00:03 tasks-next.json

So seems like something is failing to actually perform the update of the template files.

I am currently using Torizon IDE version 2.4.0 and VSCode 1.8.5 on Ubuntu 22.04.3 LTS.

microhobby commented 6 months ago

hey @griloHBG could you please check on your environment:

git -C /home/<your user>/.apollox remote -v 
git -C /home/<your user>/.apollox branch -a
git -C /home/<your user>/.apollox tag -l

Please send to me the result, thanks.

griloHBG commented 6 months ago

Ahoy, @microhobby!

Seems like I did something that solved the issue on this project and now the try-update-template-* tasks are working and docker-compose was replaced by docker compose on tasks.json.

So I think you can disregard this issue.

Thanks for your attention :slightly_smiling_face:

Here are the results of the git commands anyway.

$ git --no-pager -C ~/.apollox remote -v
origin  https://github.com/toradex/vscode-torizon-templates.git (fetch)
origin  https://github.com/toradex/vscode-torizon-templates.git (push)
$ git --no-pager -C ~/.apollox branch -a
* (HEAD detached at v2.4.0)
  dev
  remotes/origin/HEAD -> origin/bookworm
  remotes/origin/bookworm
  remotes/origin/bullseye
  remotes/origin/castello/dev
  remotes/origin/castello/emulator
  remotes/origin/castello/fixes
  remotes/origin/castello/labs
  remotes/origin/castello/qt
  remotes/origin/castello/rc
  remotes/origin/castello/slint
  remotes/origin/castello/torizoncore-dev
  remotes/origin/castello/zig
  remotes/origin/dev
  remotes/origin/nextjs
$ git --no-pager -C ~/.apollox tag -l
v2.0.0
v2.0.0-bullseye
v2.0.1-bullseye
v2.0.12
v2.1.0
v2.1.1
v2.2.0
v2.2.1
v2.2.2
v2.3.0
v2.3.1
v2.3.2
v2.4.0
microhobby commented 4 days ago

This was fixed from the VS Code extension side