You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, go:embed errors when it is passes a symlinked file, indicating that it isn't supported. This support would be useful.
In the Fuchsia go build system, we often end up with files that are symlinked in a generated directory that serves as inputs to go. While the files can be copied, it would be much easier if the symlinked files could be directly referenced.
The text was updated successfully, but these errors were encountered:
jayconrod
changed the title
go:embed symlink support
embed: allow symbolic links
Feb 22, 2021
Sorry, forbidding symbolic links was a design decision from the embed proposal.
It is an error for a pattern to match files outside the current module or that cannot be packaged into a module, like .git/* or symbolic links (or, as noted above, empty directories).
Symbolic links are ignored when modules are archived for distribution. That would mean if symbolic links were allowed, a different set of files would be embedded in a package depending on whether the package was in the main module or in a dependency.
(I'm not familiar with Fuchsia's build system. Is it based on cmd/go or does it invoke cmd/compile directly? cmd/compile treats symbolic links like regular files or directories, but it needs another tool to generate an embedcfg file for it.)
Currently, go:embed errors when it is passes a symlinked file, indicating that it isn't supported. This support would be useful.
In the Fuchsia go build system, we often end up with files that are symlinked in a generated directory that serves as inputs to go. While the files can be copied, it would be much easier if the symlinked files could be directly referenced.
The text was updated successfully, but these errors were encountered: