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

git feature-branches and projeny #69

Open
yacuzo opened this issue Oct 12, 2017 · 0 comments
Open

git feature-branches and projeny #69

yacuzo opened this issue Oct 12, 2017 · 0 comments

Comments

@yacuzo
Copy link
Contributor

yacuzo commented Oct 12, 2017

Creating new unity projects in a projeny solution on a separate branch, and then switching to other branches causes projeny --init to fail.

Reproduction:

  • Create a new branch.
  • Create a new unity project on this branch. (prj -cpr -p test)
  • Open the unity project in unity and or VS/Code here
  • Make a commit with the new project.
  • Switch back to master branch
  • Do "prj -cla" and prj -in
  • Observe a weird error message about not finding some field in the YAML file

Unity and VS produces files in the folder which are ignored by git (which is correct). These files and the project folder is then left on disk when switching branches. Projeny treats this as if a project exists, but is missing its YAML file. This also breaks the project generation for other projects, because the auto-generation of the unity editor menu scripts uses ALL the ProjenyProject.yaml files.

The produced error message is also very misleading. You have to read the PrjLog.txt and the paths in it very carefully to spot the real cause of the error. (My own discovery: "Why is it trying to read UnityProjects/secondProject/ProjenyProject.yaml? That project doesn't exist on this branch.")

This happens all the time because we typically create new unity projects on new branches, and then have to switch branch to code review on other dev's branches.

This is all about bad error handling in PackageManager._createSwitchProjectMenuScript.
I am working on a fix.

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

No branches or pull requests

1 participant