Comments (15)
Thanks @adrienbernede. As @cyrush mentioned, we discussed this at a recent axom meeting due to similar concerns and opted not to make the change.
My take is that, if there is a project that wants to use uberenv as a submodule and there are relatively simple changes that can be made to uberenv's structure to support that, we should make those changes. But we should do so in a way that minimizes changes to existing users (e.g. add some knobs that default to the current setting).
from uberenv.
@adrienbernede wrote:
So I’m considering completing my work on environments first, even if some changes in Spack will likely imply adapting uberenv later on, hopefully drastically reducing its scope.
This sounds like a good plan to me.
from uberenv.
Uberenv now usable as submodule.
from uberenv.
@white238 @kennyweiss @cyrush, any thought about this?
I’ll create an issue to discuss the impact of Greg's PR (spack/spack#15256).
from uberenv.
I don't see how changing uberenv to a submodule makes it easier to upgrade. They are both essentially locked into a SHA. The only difference is a copy vs a "cd uberenvSubmodule; git checkout develop; git pull". The nice thing about having it directly in the repo is I can put the script (and only the script) exactly where I want it in the repo.
from uberenv.
Locked into a SHA?
Copying uberenv in a project implies losing the history, and any information about what version of Uberenv we are using and how to merge in new changes.
I agree that the submodule will apply only to the script (and possibly to some shared spack configurations, like compilers for machines) which limits the interest of the process.
OK, I’ll try to come back better prepared for this battle :)
from uberenv.
By locking into a SHA, I meant locking into a point in history. Yes i lose git history one way but as a user of uberenv I don't really care about the history that much. If i do care I can go look at the uberenv repo.
Also if i remember correctly uberenv requires the spack_configs and packages directories to at the same level as the script. This could obviously be solved with a simple change in uberenv.
from uberenv.
Yes, that’s part of the changes that would need to be done.
I’m going back and forth with this submodule thing. Clearly, some projects don’t like adding another project, in source, and I understand them.
"Uberenv is just a script" and for a long while it hasn’t be changing much. But during the last year, it has changed, and I have it in at least 6 projects.
from uberenv.
@adrienbernede you can use uberenv a a submodule in any project you like, but its a per project decision.
We discussed this for axom, we didn't see a strong benefit, as we would also have to change the directory structure and how it was called if it was a submodule.
from uberenv.
@cyrush, in fact, uberenv cannot be used as a submodule as-is, percisely because it requires changes in the directory structure.
For example, the fact that the Spack configuration is in the same directory as the uberenv script prevents from versioning the former in the parent project.
from uberenv.
A while back @becker33 added a feature at my request i never got around to trying out:
spack config --scope site add spack.yaml
// then some command to remove the user scope
This should remove any scope/config patching we do.
from uberenv.
I'll say that as a user of uberenv
, I don't need the commit hash of uberenv.py
to use it, but having its commit hash can help when diagnosing build errors that arise when calling uberenv
-- specifically, excluding uberenv
as a cause of any errors. (This task is something I'm doing now, hence this comment.)
For the purpose of debugging, you may want to suggest in your documentation that users run git hash-object
on uberenv.py
so they can get the commit hash in this repo corresponding to their project's version of uberenv.py
. Suggested use of this command assumes no local modifications to uberenv.py
, and additional flags may be needed if a user's local project is configured with things like filters that differ from the configuration of this upstream repo. If a user's project locally modifies uberenv.py
(e.g., via something like running a formatter on all Python source in its repo), they may have to roll their own script to get the commit hash of the "closest" upstream version of uberenv.py
.
If users can get the commit hash of the most relevant upstream version of uberenv.py
, they can probably get at the other information they would otherwise want to get from vendoring in uberenv
as a git submodule
. Maybe they can't find that information as easily or conveniently, but they could find it nevertheless. Providing a means in your documentation of getting at that commit hash for 80ish% of use cases would require no other project restructuring on your part, but would probably help reduce your support burden.
from uberenv.
It would be nice when this is done, uberenv could allow multiple packages directory. Something like:
<repo>/someSubmodule/tpls/packages
<repo>/tpls/packages
Then they would just be copied into Spack in order.
from uberenv.
@white238 That does not seem straightforward.
Currently one can specify the package directory on command line (with the "arch" part).
Now with submodule, we need to be able to setup the root package directory (without the "arch" part).
Having the later while maintaining compatibility with the first is possible but causes confusion. So adding multiple layers, hmm, I don't know yet.
from uberenv.
Oops, I realize I was mixing up "package directory" and "spack config directory" :)
Seems much simpler now :)
from uberenv.
Related Issues (20)
- Add --force option to concretizer opts
- Fix Github Actions deprecated warnings
- No docs for spack_clean, spack_clean_packages
- optparse -> argparse
- Add ability to create a useful Spack environment via command line
- Add guidance to upgrade to new Spack Environment file
- Investigate if we are adding the spec unnecessarily to the various install commands
- Add ability to build a different package than project's main HOT 2
- Command line argument --upstream not working HOT 5
- Spack environments in uberenv: handling of compiler flags HOT 3
- Move to `spack bootstrap now`
- spack envs + uberenv python issues HOT 1
- capture extra_rpaths?
- symlinking host config is broken with envs + extra spec constraints
- Add option to force creating a spack.yaml
- Always copy generated `spack.yaml`
- Verify Uberenv behavior when no `.uberenv_config.json`
- python3.12 dropping distutils
- Support multiple package repos? HOT 4
- Mirrors in uberenv cannot be defined with an url (http or oci) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uberenv.