Deleted poetry cache folder and cannot put things back - python-poetry

How to recreate the poetry cache folder, since I deleted it creating it again not helping. Now I've set the venv inside the project folder.

Related

Why does Go keep creating `~/go` folder for its cache?

Go seems to create a folder ~/go with a folder pkg/mod inside. Deleting this folder simply leads to it being recreated as Go is run in due course.
Does anyone know how to set the Go environment such that this folder resides elsewhere? My go env shows the following line for $GOCACHE & $GOMODCACHE:
...
GOCACHE="~/Library/Caches/go-build"
GOMODCACHE="~/Library/gocode/pkg/mod"
...
(I've replaced the /User/<user name>/ bit here with ~/.)
There's no sign of the ~/go folder in either of them, so I'm lost as to how to redirect it.
I have Go version go version go1.19.5 darwin/arm64 on macOS Ventura.

Laravel vendor files

I am working on an application with laravel 8, whenever I run composer update 5000+ vendor files are tracked by GitHub however /vendor is added into the .gitignore file. here is a snap of my .gitignore file:
Might be possible that you have already staged/added the vendor folder before putting in the .gitignore file. Or you have manually staged/added the folder to git through command.
In any case, one solution for you is to unstage the files by using
git reset /vendor/*
and if this doesn't solve your problem, then it might be possible that you already have committed older files into git; so, /vendor files are getting tracked by git.
Solution steps:
Delete the /vendor folder.
Make a clean commit of tracked files inside /vendor (if there are any)
Run composer install again to get back /vendor folder.
After these steps, vendor will not be tracked. (Considering /vendor/ is still present in the .gitignore file)

When a package is removed all package files should be removed?

To remove a package using the command "composer remove vendor/vendor" it works, the command dont shows any error. However the package files (classes, etc) are not removed from the folder of the project. Its necessary to remove manually the package fiels that are not removed with the remove command?
Just if you want to remove them from your disk.
If you are running in developer mode, i think that has no problem to let them there, because when you go to deploy your project a new fresh installation script will run with the information of your composer.json, if in your composer.json file don't have any entry with the 'vendor/package' which you want to remove, it will not be installed.
Commonly composer removes any packages that aren't in your composer.json package list fom the vendor folder.

yarn deletes hidden files (.metadata_never_index, .gitkeep)

In my node_module folder I use to have 2 hidden files:
.metadata_never_index
.gitkeep
The first one prevents Spotlight from indexing the folder
(maybe the second file isn't really needed, but that doesn't matter for now).
In the past I used npm to install the modules.
Now i wanted to switch to yarn.
But yarn deletes these two files when using yarn install.
How can I prevent yarn from deleting those files in the node_modules folder?

Why is vendor package not pushing to github even when "/vendor" is not listed in .gitignore file?

When I add files to my local repository, some vendor packages are excluded even though they are not listed in the .gitignore file. Since they are not pushed to the remote repository, other developers are not able to pull the vendor packages.
The Vendors files are not to upload on github.The composer.json file of your laravel project have all the information to install all of your vendors.So try to update your composer.
To update composer use cmd or terminal command:
composer update
composer install
Be sure that the composer.json file is not ignore by .gitignore file.
Fixing the root .gitignore is not enough.
I had the same problem and found out that there are multiple .gitignore in subfolders.

Resources