Automatically add the `emscripten-forge` channel if it is missing?
Problem
Currently the default channels are only added if there is no environment file:
https://github.com/jupyterlite/xeus/blob/eda12f8c2e50bd7ca4b171e38492de652a678cb4/jupyterlite_xeus/add_on.py#L130-L147
Proposed Solution
Maybe the add-on should check if the user-provided environment.yml includes https://repo.mamba.pm/emscripten-forge in the list of channels, and add it automatically otherwise?
Additional context
This could help improving compatibility with existing environment.yml files without having to create a copy of the file with https://repo.mamba.pm/emscripten-forge in it.
And also for use cases such as repo2jupyterlite: https://github.com/jupyterlite/repo2jupyterlite/pull/19
I don't think we should add https://repo.mamba.pm/emscripten-forge automagically if it's not there.
People should be free to use any channel they want (if they mirror emscripten-forge or provide their own channel with emscripten packages).
If no channel is specified, it's used by default though: https://github.com/jupyterlite/xeus/blob/main/jupyterlite_xeus/create_conda_env.py#L47
Ah ok, I thought we used to have something like this in jupyterlite-xeus-python. But maybe because it was always installing xeus-python by default.
If no channel is specified, it's used by default though: https://github.com/jupyterlite/xeus/blob/main/jupyterlite_xeus/create_conda_env.py#L47
Could it make sense to also do this if only the conda-forge channel is specified? I guess this could address most use cases.
Could it make sense to also do this if only the conda-forge channel is specified? I guess this could address most use cases
I see, yeah that could make sense!
Could it make sense to also do this if only the conda-forge channel is specified? I guess this could address most use cases.
Let's put this behind an optional flag though, as we probably should not change the environment file without the user knowing.
Let's put this behind an optional flag though, as we probably should not change the environment file without the user knowing.
That sounds good, and would at least help experiment with that without too much disruption.
Projects like https://github.com/jupyterlite/repo2jupyterlite could then enable that option by default.