Ticket Created
over 3 years ago

CIQQA-753

VS Code plugin can run the wrong PRG file if multiple PRGs exist in the bin/ directory

- Windows 10

- Visual Studio Code 1.62.3

- Monkey C Extension 1.0.0

- SDK: 4.0.6

If multiple PRGs exist in the bin/ directory, VS Code will run the first one (in alphabetical order), which may not be the actual PRG that belongs to the project. This can cause problems if a new project is created by copying an existing project which has already been built once. Seems like it would also cause a problem if the project folder is renamed.

Recreation procedure:

- Create simple data field app in a folder called TESTA, which just returns "TESTA" in compute()

- Build app and note that TESTA.PRG is created. Run app and verify that it works as expected

- Copy project folder, and change the new folder name to TESTB. Change compute() to return "TESTB"

- Build app and note that TESTB.PRG is created. Run app and note that it's actually TESTA which runs.

- Delete TESTA.PRG from TESTB/bin, and run TESTB again. Note that TESTB runs now.

Parents
  • Thanks for the response !

    "The problem is that you copy the app folder without changing the app id."

    But I've seen this problem when trying to run an app folder that was copied a long time and the UUID was changed in Eclipse. (it's a 4th clone of an app, so I rarely run it either in Eclipse or VS Code).

    When I first tried to run it in VS Code after making some source code changes, I was surprised that the copy running in the sim didn't pick up the changes. When I looked in the bin/ folder, I saw an old PRG from the original project that the clone was copied from. It surely had a different UUID, since all of my clones have different UUIDs in order to successfully upload them to the store.

    Sorry, my recreation procedure in the OP isn't very precise -- it's not the exact steps I did to recreate the problem, but just a reconstruction of what I think was necessary to recreate it.

    "the solution is to ensure your app has a unique UUID."

    This makes sense but I still think that I've seen it for apps with different UUIDs. Unfortunately I can't recreate it anymore :/ but I'll comment again if/when I can.

Comment
  • Thanks for the response !

    "The problem is that you copy the app folder without changing the app id."

    But I've seen this problem when trying to run an app folder that was copied a long time and the UUID was changed in Eclipse. (it's a 4th clone of an app, so I rarely run it either in Eclipse or VS Code).

    When I first tried to run it in VS Code after making some source code changes, I was surprised that the copy running in the sim didn't pick up the changes. When I looked in the bin/ folder, I saw an old PRG from the original project that the clone was copied from. It surely had a different UUID, since all of my clones have different UUIDs in order to successfully upload them to the store.

    Sorry, my recreation procedure in the OP isn't very precise -- it's not the exact steps I did to recreate the problem, but just a reconstruction of what I think was necessary to recreate it.

    "the solution is to ensure your app has a unique UUID."

    This makes sense but I still think that I've seen it for apps with different UUIDs. Unfortunately I can't recreate it anymore :/ but I'll comment again if/when I can.

Children
No Data