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

Improve heuristics around meta.yaml source path and git_url #783

Closed
kwmsmith opened this issue Feb 17, 2016 · 7 comments
Closed

Improve heuristics around meta.yaml source path and git_url #783

kwmsmith opened this issue Feb 17, 2016 · 7 comments
Labels
locked [bot] locked due to inactivity

Comments

@kwmsmith
Copy link

We hit a subtle issue when defining:

source:
   path: ../

when we should have set:

source:
   git_url: ../

This shows up as an empty version string in any jinja templates, and is somewhat subtle to debug.

Because conda decides to set git related env vars based on the presence of source/git_url, these vars weren't set for the jinja templates, leading to an empty version string.

Possible solutions:

  • deprecate the source/path key
  • something else?
@groutr groutr added the pending::discussion contains some ongoing discussion that needs to be resolved prior to proceeding label Feb 17, 2016
@groutr
Copy link
Contributor

groutr commented Feb 17, 2016

Question to the community: Are there any compelling use cases for source/path that aren't already handled by source/git_url (or equivalent key)?

@msarahan
Copy link
Contributor

I think we're stuck between a rock and a hard place. A user complained that a recipe was not building because conda build was looking for git, but git was not installed. This was on windows. Conda build was looking for git because a .git folder was present, and the path heuristic found that, and triggered the git logic. We (Ilan) thus removed it.

I see the path entry as perhaps needing documentation regarding not defining git stuff for jinja2, but also needing to be kept. git_url should be used if you want git to do stuff like provide version info.

@stuarteberg
Copy link
Contributor

This shows up as an empty version string in any jinja templates, and is somewhat subtle to debug.

Was that behavior observed using the latest version of the master branch, or using conda-build 1.19.0?

I think the behavior here has been slightly improved in the master branch. Instead of simply seeing an empty string for GIT_DESCRIBE_TAG, which is subtle to debug, you will now see an error message like Error: 'GIT_DESCRIBE_TAG' is undefined. Hopefully a complaint about a GIT_ variable will nudge users towards providing git_url instead of path.

@stuarteberg
Copy link
Contributor

Question to the community: Are there any compelling use cases for source/path that aren't already handled by source/git_url (or equivalent key)?

The source/path case allows you to avoid re-cloning the repo. I don't think that's a huge deal, but apparently at least some users are hurting from the additional overhead. See #753.

@stuarteberg
Copy link
Contributor

The source/path case allows you to avoid re-cloning the repo.

I now see that the source/git_depth setting in meta.yaml can alleviate this concern, at least in part. (It had a tiny bug, though. See #803 for a tiny fix.)

@groutr
Copy link
Contributor

groutr commented Apr 11, 2016

The only practical difference between source/git_url and source/path should now be that git_url is a clone of a repository and path is copy of the repository. Using path will allow you to build packages with unstaged/uncommited changes in working directory. git_url will only build up to/including the latest commit.

@groutr groutr closed this as completed Apr 11, 2016
@groutr groutr removed the pending::discussion contains some ongoing discussion that needs to be resolved prior to proceeding label Apr 11, 2016
@github-actions
Copy link

Hi there, thank you for your contribution!

This issue has been automatically locked because it has not had recent activity after being closed.

Please open a new issue if needed.

Thanks!

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Apr 23, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity
Projects
None yet
Development

No branches or pull requests

4 participants