mateodelnorte / meta

tool for turning many repos into a meta repo. why choose many repos or a monolithic repo, when you can have both with a meta repo?
MIT License
2.03k stars 95 forks source link

CRITICAL: meta cli doesn't detect .meta file correctly => no meta action possible #224

Closed bjesuiter closed 4 years ago

bjesuiter commented 4 years ago

🐛 Bug Report

I tired to clone / install my repository 'vserv-meta' on a fresh copy of macOS Catalina 10.15.4. The meta git clone command complains about the cloned repo not being a meta repo at all. And the meta git update command only returns a blank line.

Since I use meta in virtually all of my projects, this is pretty critical for me. So if you need any more information, please message me and I'll see how I can help you!

To Reproduce

I don't know, If it will appear for you, but I did the following:

  1. meta git clone my repo => Error Message about not cloning a Meta repo
  2. Trying to fix the not installed repos by running meta git update => This returns an empty line, as seen in the following code block
~/Develop/bjesuiter/vserv-meta master
❯ meta git update

~/Develop/bjesuiter/vserv-meta master

Expected behavior

I expect meta git clone to simply clone my repos (as it is a basic functionality of the meta cli :) ) And I also expect meta git update to detect my .meta file and install all the projects in it, as long as it can find the repos and has access to them. But in case there are issues while cloning, error messages seem to be in place already (I have seen them before)

Some Context Information

Note: For VSCode to detect my meta repos, I created a .gitmodules file and added all meta repos as fake gitmodules. I don't think, that this causes this problem, as it had worked before flawlessly, but I'll post you the content, just in case.

# This project DOES NOT really use .gitmodules.
# But VSCode currently ignores the nested vcs roots of this meta repo,
# because the folders of the nested repos are ignored in the .gitignore in the meta repo.
#
# The .gitmodules file with fake entries forces VSCode into tracking the git repos of the subfolders. 
# The idea comes from p3t3r5 at:  
# <https://github.com/microsoft/vscode/issues/37947>
# 
# **CAUTION:** This is a hack and could break in the future!

[submodule "cryptomator-server"]
path = cryptomator-server
url = dummy_string_to_satisfy_vscode

[submodule "nextcloud"]
path = nextcloud
url = dummy_string_to_satisfy_vscode

[submodule "passbolt"]
path = passbolt
url = dummy_string_to_satisfy_vscode

[submodule "rancher"]
path = rancher
url = dummy_string_to_satisfy_vscode

[submodule "reverse-proxy"]
path = reverse-proxy
url = dummy_string_to_satisfy_vscode

[submodule "setup-manual"]
path = setup-manual
url = dummy_string_to_satisfy_vscode

[submodule "subsonic"]
path = subsonic
url = dummy_string_to_satisfy_vscode

[submodule "traefik"]
path = traefik
url = dummy_string_to_satisfy_vscode

[submodule "url-shortener-polr"]
path = url-shortener-polr
url = dummy_string_to_satisfy_vscode

[submodule "url-shortener-shlink"]
path = url-shortener-shlink
url = dummy_string_to_satisfy_vscode

[submodule "verdaccio-npm-registry"]
path = verdaccio-npm-registry
url = dummy_string_to_satisfy_vscode

An ls -la on my repository folder looks like this: (Note: .meta file is available)

~/Develop/bjesuiter/vserv-meta master
❯ ls -la
total 208
drwxr-xr-x   12 bjesuiter  staff    384  8 Mai 19:18 .
drwxr-xr-x    3 bjesuiter  staff     96  8 Mai 19:10 ..
drwxr-xr-x   15 bjesuiter  staff    480 13 Mai 15:39 .git
-rw-r--r--    1 bjesuiter  staff    245  8 Mai 19:10 .gitignore
-rw-r--r--    1 bjesuiter  staff   1426  8 Mai 19:10 .gitmodules
-rw-r--r--    1 bjesuiter  staff    905  8 Mai 19:10 .meta
drwxr-xr-x    4 bjesuiter  staff    128  8 Mai 19:10 .vscode
-rw-r--r--    1 bjesuiter  staff   1587  8 Mai 19:10 README.md
drwxr-xr-x  187 bjesuiter  staff   5984  8 Mai 19:18 node_modules
-rw-r--r--    1 bjesuiter  staff  78566  8 Mai 19:18 package-lock.json
-rw-r--r--    1 bjesuiter  staff    676  8 Mai 19:18 package.json
-rw-r--r--    1 bjesuiter  staff    431  8 Mai 19:10 vserv-meta.code-workspace

The content of my .meta file is: (Note: the private.bitbucket subdomain is a ssh alias which I tested and it works)

{
  "projects": {
    "setup-manual": "git@private.bitbucket.org:bnware/vserv-setup-manual.git",
    "reverse-proxy": "git@private.bitbucket.org:bnware/vserv-reverse-proxy.git",
    "url-shortener-shlink": "git@private.bitbucket.org:bnware/vserv-url-shortener-shlink.git",
    "nextcloud": "git@private.bitbucket.org:bnware/vserv-nextcloud.git",
    "url-shortener-polr": "git@github.com:bjesuiter/polr-url-shortener-service.git",
    "rancher": "git@private.bitbucket.org:bnware/vserv-rancher.git",
    "traefik": "git@private.bitbucket.org:bnware/vserv-traefik.git",
    "verdaccio-npm-registry": "git@private.bitbucket.org:bnware/vserv-verdaccio-npm-registry.git",
    "cryptomator-server": "git@private.bitbucket.org:bnware/vserv-cryptomator-server.git",
    "passbolt": "git@private.bitbucket.org:bnware/vserv-passbolt.git"
    "subsonic": "git@private.bitbucket.org:bnware/vserv-subsonic.git"
  }
}

Idea

It may have something to do with storage access control in macOS Catalina, but I'm not sure how to fix it. Maybe I need to give nodefull disk access?

mateodelnorte commented 4 years ago

you're missing a comma on the second to last line of your .meta file. this is a bug in error handling, though. it should tell you there's an issue.

mateodelnorte commented 4 years ago

I'm going to close this issue. If you'd like, please feel free to open an issue for parsing not throwing an error when json is invalid.

bjesuiter commented 4 years ago

Thank you very much for the fast response and the successful help!

And thank you for this great tool, love working with it!