Comments (5)
Also not sure if we should repeat the arguments in the end call. (i.e. _operator_env_end(id, "key", "value")
) For all internal operators this is not needed as these things can be tracked in rust code, but a user writing their own operators may find those useful...
from modus.
@maowtm, thanks for summarizing the discussion. This feels like a macro
$x::with_std(std) => $x::in_env("CFLAGS", f"-std=${std}")
Do we need overlapping regions?
It will be even more interesting if it was possible to define custom cache invalidation conditions. For example, define cache invalidation conditions for git/hg/svn, etc, given some basic intrinsics.
from modus.
This feels like a macro
Yes, and in fact if we don't consider any internal implementation at all what I had is actually quite a bad syntax. Your macro-style definition is much better IMO. But I just proposed this because it is easy to implement and fits into our internal model. A bit of leaky abstraction I guess.
Do we need overlapping regions?
Probably not.
Custom cache invalidation conditions
Not sure how this would work and what would be the use, as usually people would want to rebuild the thing if source has a new commit...?
from modus.
I had a discussion with @barr, and he suggested to use operators that define conditions of cache invalidation. We were thinking of something like that:
::no_cache
always invalidate the cache::invalidate_cache_if_before(CMD)
invalidate cache if CMD, executed before the layer is applied, returns non-exit code.::invalidate_cache_if_after(CMD)
invalidate cache if CMD, executed after the layer is applied, returns non-exit code.::invalidate_cache_if_changed(PATH)
invalidate cache if the file/directory changes after the layer is applied.
This is just a rough sketch of the API.
from modus.
Or maybe something like ::invalidate_cache_if_different(CMD_BEFORE, CMD_AFTER)
from modus.
Related Issues (20)
- Misleading error message `expected ")"` HOT 1
- `run(...)` and `(copy(...))::merge` fails on scratch image
- Invalid operator usage does not result in proper error messages HOT 1
- Better Analysis in recursive cases HOT 2
- Stratified construction
- Array Types (v1) HOT 4
- Fix hard-coded scratch image spec
- Better error messages for malformed goals
- Better Proof Highlighting HOT 2
- Proposal: Allow copying multiple files to the same destination via `(::)copy([...], dest)` HOT 3
- Types HOT 1
- `modus run`, `modus ls`, etc
- Format strings in negated expressions HOT 1
- string_concat -> f-string reversal HOT 1
- Layer expression that creates no layers HOT 5
- Should mention in the README.md to download protoc for M1
- Outdated comment
- Print a warning when there multiple minimal proofs
- Who's behind this project ? HOT 4
- SLD Resolution? HOT 2
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 modus.