Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directory assets: symlinks #731

Closed
eladb opened this issue Sep 17, 2018 · 3 comments · Fixed by #1318
Closed

Directory assets: symlinks #731

eladb opened this issue Sep 17, 2018 · 3 comments · Fixed by #1318
Labels
feature-request A feature should be added or improved.

Comments

@eladb
Copy link
Contributor

eladb commented Sep 17, 2018

Allow configuring how symlinks are treated:

  1. Do not materialize symlinks
  2. Materialize all symlinks
  3. Materialize symlinks that are outside the tree
@rix0rrr rix0rrr added feature-request A feature should be added or improved. and removed feature-request A feature should be added or improved. feature labels Nov 6, 2018
@sentient-jbreindel
Copy link

sentient-jbreindel commented Nov 6, 2018

I think this would be welcomed upgrade. It could be as easy as switching out the current archiver library with a different one. There seems to be some chatter on the issues in archiver about supporting materializing symlinks however, it doesn't seem like anything concrete was released yet.

For now I'm just leveraging my underlying zip linux utility here which is really hacky, but supports following the symlinks out of the box.

@kennu
Copy link

kennu commented Nov 27, 2018

+1 from here because I can't deploy my Node.js Lambda function which has some node_modules symlinked using npm link. I believe the default should be to materialize so that npm link works out-of-the-box.

@justinmchase
Copy link
Contributor

justinmchase commented Dec 10, 2018

This is a pretty important required feature.

In nodejs its possible to create either links as @kennu said for testing or to actually put a hard dependency to a relative module such as:

"dependencies:" {
  "shared": "../shared"
}

Which will make a symlink to the shared folder under your functions node_modules. In this case the process of packaging the zip file for deployment needs to follow the symlink and also package all sub files.

I don't think it's really necessary to have options here, it needs to always do it.

rix0rrr pushed a commit that referenced this issue Dec 11, 2018
When building a nodejs lambda it is really common for dependencies under the `node_modules` folder to actually be symlink'd to other folders on your system. The symlinks will now be followed and the indicated files packaged (instead of the symlinks themselves).

Fixes #731
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants