Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Symbolic link support #244

Closed
rlouapre opened this issue May 15, 2014 · 10 comments
Closed

Symbolic link support #244

rlouapre opened this issue May 15, 2014 · 10 comments

Comments

@rlouapre
Copy link
Contributor

I frequently use symbolic link to avoid file / directory duplication.
Apparently ml deploy command does not support it. Here is the error returned:

C:\Users\rlouapre\Projects\ml\marklogic_alm>ml local deploy modules
ERROR: No such file or directory - C:/Users/rlouapre/Projects/ml/marklogic_alm/src/main/node_modules/xquerrail2.framework/node_modules/gulp-header/node_modules/lodash.assign/node_modules/lodash._basecreatecallback/node_modules/lodash.bind/node_modules/lodash._createwrapper/node_modules/lodash.isfunction
ERROR: ["C:/Users/rlouapre/Projects/ml/marklogic_alm/deploy/lib/xcc.rb:241:in `initialize'", "C:/Users/rlouapre/Projects/ml/marklogic_alm/deploy/lib/xcc.rb:241:in `open'", "C:/Users/rlouapre/Projects/ml/marklogic_alm/deploy/lib/xcc.rb:241:in `prep_body'", "C:/Users/rlouapre/Projects/ml/marklogic_alm/deploy/lib/xcc.rb:122:in `block in load_files'", "C:/Users/rlouapre/Projects/ml/marklogic_alm/deploy/lib/xcc.rb:115:in `each'", "C:/Users/rlouapre/Projects/ml/marklogic_alm/deploy/lib/xcc.rb:115:in `each_with_index'", "C:/Users/rlouapre/Projects/ml/marklogic_alm/deploy/lib/xcc.rb:115:in `load_files'", "C:/Users/rlouapre/Projects/ml/marklogic_alm/deploy/lib/server_config.rb:516:in `load_data'", "C:/Users/rlouapre/Projects/ml/marklogic_alm/deploy/lib/server_config.rb:980:in `block in deploy_src'", "C:/Users/rlouapre/Projects/ml/marklogic_alm/deploy/lib/server_config.rb:974:in `each'", "C:/Users/rlouapre/Projects/ml/marklogic_alm/deploy/lib/server_config.rb:974:in `deploy_src'", "C:/Users/rlouapre/Projects/ml/marklogic_alm/deploy/lib/server_config.rb:960:in `deploy_modules'", "C:/Users/rlouapre/Projects/ml/marklogic_alm/deploy/lib/server_config.rb:478:in `deploy'", "deploy/lib/ml.rb:135:in `<main>'"]

Would it be possible to add this feature?

@grtjn
Copy link
Contributor

grtjn commented May 15, 2014

What did you link to where?

Funny path. Mentions node_modules multiple times. What happened you think?

@rlouapre
Copy link
Contributor Author

I link to local directory in a different location.
I think Roxy is not able to follow the symbolic link.

@rlouapre
Copy link
Contributor Author

Well actually the issue does not seem to be the symbolic link.

I verify the long path does exist so I am not sure what the error means

@grtjn
Copy link
Contributor

grtjn commented May 19, 2014

I'd very much like to reproduce this. Could you be as explicit as possible what you did. It may depend on which folder you linked, and to where exactly. Maybe Roxy gets confused, and tries to evaluate certain paths from wrong location.

@rlouapre
Copy link
Contributor Author

It was because the path was too long.
But actually I would like to exclude that directory (which is only required during development) from source folder.
Is there a way to exclude a directory from deploy command?

@grtjn
Copy link
Contributor

grtjn commented Jun 11, 2014

How about a src-local or src-dev folder that contains that extra folder and symlinks to all others in src, and then use local.properties or dev.properties to override the location of src for that environment?

@grtjn
Copy link
Contributor

grtjn commented Jun 11, 2014

Actually you could perhaps do (in addition to deploy modules or deploy src):

ml {env} deploy src --ml.xquery.dir=src-extra

Requires dev-branch for overriding properties from command-line..

@rlouapre
Copy link
Contributor Author

I am not sure to follow you.
Let's say I have the directory src/lib/my-library I need to deploy from Roxy.
This directory contains the following directory structure:

  • src
  • dist
  • node_modules

My application currently only uses dist by when I am in dev mode (src/lib/my-library is a symbolic link) so I would like to exclude src and node_modules

So I am looking a feature similar to .gitignore

@grtjn
Copy link
Contributor

grtjn commented Jun 11, 2014

I meant instead of ignoring files/folders at deploy (currently not possible anyhow), you could physically split your src in two folders, and deploy those parts separately. So, you would have src/lib/mylib/dist and src-dev/lib/mylib/src..

You could then use symlinks in src-dev to make it look like it contains all, and get src-dev deployed for dev instead of default src. Or deploy the two parts separately..

Having an ignore list ({env}.ignore perhaps?) does make sense to me. Just trying to suggest other ways to accomplish this..

@grtjn
Copy link
Contributor

grtjn commented Jun 14, 2017

End conclusion: symlinks were not the issues. The part about ignoring files resurfaced in ticket #419, but by then was already covered by the ignore-folders property. Closing this ticket.

@grtjn grtjn closed this as completed Jun 14, 2017
@grtjn grtjn self-assigned this Jun 14, 2017
@grtjn grtjn added this to the July 2017 milestone Jun 14, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants