GameMakerHub / Catalyst

A tool for Game Maker Studio 2 to manage dependencies and speed up your process
https://gamemakerhub.net/catalyst
MIT License
10 stars 2 forks source link

catalyst install deletes non-vended resources #21

Closed Katipo007 closed 5 years ago

Katipo007 commented 5 years ago

I have a clean project I started to try out Catalyst, I successfully required and installed some packages, but after I added some new (project-specific) scrips and ran catalyst install again it deletes those files (.gml, .yy and view files included).

No errors or warnings were given by Catalyst

Version 0.2.0-alpha

RobQuistNL commented 5 years ago

Hey Katipo, did you by any chance add these files into a vendored folder? Or did you add them in the .gitignore file? Thats the only reason I could think of that should delete the files. If not, I'd love to reproduce this, because this is a horrible bug 😅

Katipo007 commented 5 years ago

Hey! Unfortunately it isn't anything like that. I did not add those resources to the .gitignore and I created a new folder for them (not in the vendored folder).

OS: Windows 10

Steps to reproduce:

  1. Create a new project in GMS2
  2. Execute catalyst init in that directory
  3. Require desired libraries
  4. Run catalyst install
  5. Open the project in GMS2
  6. Add a new resource (i.e. script) and save
  7. Execute catalyst install again (say for a dependency library update)
  8. The new resources have been removed by catalyst

I'll also have a look into the catalyst code myself when I get the chance :)

RobQuistNL commented 5 years ago

That definately doesn't sound right! Thanks for the extensive report, I will be looking into this very soon :)

RobQuistNL commented 5 years ago

@Katipo007 thanks! You uncovered a very big bug that I've never spotted (because I have always been testing with already-existing files). Adding resources after the vendor folder would cause issues in the old version, so this is 100% reproducable and very dangerous. Thanks again!

RobQuistNL commented 5 years ago

Fixed in: https://github.com/GameMakerHub/Catalyst/pull/23