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

Remove broken $CONDA_DEFAULT_ENV templating engine #5494

Open
2 tasks done
kenodegard opened this issue Sep 18, 2024 · 2 comments · May be fixed by #5495
Open
2 tasks done

Remove broken $CONDA_DEFAULT_ENV templating engine #5494

kenodegard opened this issue Sep 18, 2024 · 2 comments · May be fixed by #5495
Labels
in-progress issue is actively being worked on source::anaconda created by members of Anaconda, Inc. type::feature request for a new feature or capability type::tech-debt identifies or resolves some technical debt

Comments

@kenodegard
Copy link
Contributor

kenodegard commented Sep 18, 2024

Checklist

  • I added a descriptive title
  • I searched open requests and couldn't find a duplicate

What is the idea?

Originally added in #578 (see writeup in #575) this templating engine would appear to be a precursor to the conda_build_config.yaml used today.

This templating engine is an odd artifact at this point and actually wont work anymore unless there happens to be a directory in the user's CWD that matches the currently active environment.

Per searches here on GitHub conda-forge, bioconda, nor Anaconda uses this templating engine anymore.

Uncovered while investigating #5493

Why is this needed?

Less legacy code to wrangle.

What should happen?

Review and remove clearly outdated code from the Jinja templating engine.

Additional Context

No response

@kenodegard kenodegard added source::anaconda created by members of Anaconda, Inc. type::feature request for a new feature or capability type::tech-debt identifies or resolves some technical debt in-progress issue is actively being worked on labels Sep 18, 2024
@kenodegard
Copy link
Contributor Author

The code block referenced:

# search relative to current conda environment directory
conda_env_path = os.environ.get(
"CONDA_DEFAULT_ENV"
) # path to current conda environment
if conda_env_path and os.path.isdir(conda_env_path):
conda_env_path = os.path.abspath(conda_env_path)
conda_env_path = conda_env_path.replace("\\", "/") # need unix-style path
env_loader = jinja2.FileSystemLoader(conda_env_path)
loaders.append(jinja2.PrefixLoader({"$CONDA_DEFAULT_ENV": env_loader}))

@kenodegard kenodegard linked a pull request Sep 18, 2024 that will close this issue
3 tasks
@kenodegard
Copy link
Contributor Author

Later on CONDA_DEFAULT_ENV is also set as the host_prefix within the templating engine:

"CONDA_DEFAULT_ENV": config.host_prefix,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in-progress issue is actively being worked on source::anaconda created by members of Anaconda, Inc. type::feature request for a new feature or capability type::tech-debt identifies or resolves some technical debt
Projects
Status: 🏗️ In Progress
Development

Successfully merging a pull request may close this issue.

1 participant