plz clean doesn't remove LinkGeneratedSources'ed links
When using LinkGeneratedSources, the linked files aren't cleaned up when executing a plz clean.
[Build]
LinkGeneratedSources = soft
UpdateGitignore = true
$ ls -lA
total 40
-rw-r--r-- 1 seanc staff 171 Apr 18 09:10 .gitignore
-rw-r--r-- 1 seanc staff 1617 Apr 18 09:11 BUILD.plz
drwxr-xr-x 5 seanc staff 160 Apr 18 09:10 loglevel
$ plz build
Build finished; total time 3.2s, incrementality 91.6%. Outputs:
//resources/pkl/mycmd:gen-go:
/Users/seanc/src/example/mycmd/plz-out/gen/resources/pkl/mycmd/Config.pkl.go
/Users/seanc/src/example/mycmd/plz-out/gen/resources/pkl/mycmd/init.pkl.go
//resources/pkl/mycmd:mycmd:
/Users/seanc/src/example/mycmd/plz-out/gen/resources/pkl/mycmd/mycmd.a
//resources/pkl/mycmd/loglevel:loglevel:
/Users/seanc/src/example/mycmd/plz-out/gen/resources/pkl/mycmd/loglevel/loglevel.a
$ plz clean
$ ls -lA
total 40
-rw-r--r-- 1 seanc staff 171 Apr 18 09:10 .gitignore
-rw-r--r-- 1 seanc staff 1617 Apr 18 09:11 BUILD.plz
lrwxr-xr-x 1 seanc staff 80 Apr 18 09:35 Config.pkl.go -> /Users/seanc/src/example/mycmd/plz-out/gen/resources/pkl/mycmd/Config.pkl.go
lrwxr-xr-x 1 seanc staff 78 Apr 18 09:35 init.pkl.go -> /Users/seanc/src/example/mycmd/plz-out/gen/resources/pkl/mycmd/init.pkl.go
drwxr-xr-x 5 seanc staff 160 Apr 18 09:10 loglevel
-rw-r--r-- 1 seanc staff 1972 Apr 17 22:29 mycmd.pkl
Maybe this is just a call to git clean?
Thanks for pointing this out. I don't think a git clean will work if you have UpdateGitignore true. I'll take a look and see if there's anything we can do. Does it cause you other issues other than the links just cluttering up the directory?
No actual issues, I intended to just point this out. I just discovered LinkGeneratedSources and was looking closely at my local dev environment and noticed I had a few dead symlinks from old .pkl.go files as I was iterating. With git clean -f -X . that would work:
$ cd resources/pkl/mycmd && git clean -f -X .
Removing Config.pkl.go
Removing init.pkl.go
Ah nice -X. I wasn't aware of that flag thanks for that