GIT Commit and imported external git project path

Hi.
I had enabled GIT by enabling experimental features in the previous version (2.1.7).
Now with 2.2.0, I can see the GIT panel available directly.

I added composer to my project, added a library & then tried to commit all changes. But, the commit got stuck at below folder, saying path is invalid.

image
image

I think it might be because its adding a forward-slash at the end.
I checked my remote GIT folder, and I cannot see this folder or its contents, even though all child folders/files have been committed successfully.

Please help.

Hi Sid,

Are you sure there are no files in the folder? Even no hidden ones?

Usually only files get committed and with them their folders.

Btw now that Git is out of the experimental features it is always visible.

I had an issue like this a while back,in that case it was an uploaded file which contained invalid characters. I deleted the file and all was good

There are numerous files and sub folders in the tcpdf folder… and they all were committed and uploaded to remote successfully.

But, this entry for root folder tcpdf did not get committed… and gave the above error.

So, in the remote GIT repository, I don’t see this folder, nor any of its child files or folders.

The commit entry thats stuck here is just a folder. All the files inside this folder have been uploaded/committed.
Did you also see the error on the folder or some particular file?
Also, this is a third party library, which is already on github… so its unlikely that some invalid character would be the issue.

This is the library I have added using composer: PDF Parser (https://www.pdfparser.org/documentation).

Hi Sid

I didnt see any errorm, GIT just hung.

I prepared a debug_log (a much ignored but invaluable tool) and there was an error entry in the debug log referring to the offending file
I deleted it (corrupt upload i think) and everything worked perfectly

@George / @patrick
I tried creating a new project, added library using composer & tried setting GIT. Getting the same error.
So its definitely something to do with Wappler.

could you explain how you did this exactly?
Does it happen if you simple copy the folder to your project?

  1. Opened existing/Created new project in Wappler
  2. Added composer.json file to this project folder
  3. Navigated to this folder on CMD and ran composer update command
  4. Created GIT using Wappler
  5. Saved all uncommitted changes.
  6. Got the error.

At step 3, I also tried just copying the VENDOR folder from another location, did NOT run composer command, then creating GIT & committing gave the error.

well if you could try to find out what is so special about this folder?
Because folders alone shouldn’t be offered for commit - only files.

I tried to replicate with creating any other folder and it works just fine.
So maybe you can try as well. Try replicate it with other folder names and files within.

Did you try specifically with this PDF Parser library?

I didn’t find anything special with the folder in Windows Explorer. It looks like a regular folder.

So have tried generating a debug log and checked fir errors in there?

No… would it help?
The error is showing up in the UI itself, so didn’t think of it.

Have logged off for the day, will try this too next time I work on this project.

It highlighted the error which caused my similar problem Error message indicating the file was clearly visible. In my opinion debug logs are as valuable to wappler as the developers console is to a browser

So your problem is with just that specific library?

I have used Git on Wappler just once before, and it worked fine.
Got this error only for this library specifically.

OK found the issue. Seems that componer is just copying the whole git repository from the included project.

Then you are getting git repository within git repository (your own) and that is not possible.It is also not recommended by composer them selves.

Just as with node projects - you never commit the “node_modules” folder, the same is for composer you never commit the “vendor” folder. So just add it to your .gitignore file

See:
https://getcomposer.org/doc/faqs/should-i-commit-the-dependencies-in-my-vendor-directory.md

Oh. Interesting. Thank you for the explanation.
Will add it to .gitignore file.