#Ignoring stuff
1 messages ยท Page 1 of 1 (latest)
I think the current state of the art is to use views which are potentially deprecated but still the best approach. ๐
If you great a chance, could you try something like this in your dagger.json?
{
"name": "lala",
"sdk": "go",
"source": ".dagger",
"engineVersion": "v0.13.3",
"views": [
{
"name": "default",
"patterns": [
"!some_large_file"
]
}
]
}
Where patterns represents all the LFS files
Then, to use this you would call it like this
dagger call build --source .:default
Where default is the same as the name of the view in your dagger.json and build is whatever function you are calling that accepts a local directory argument
I think I read somewhere that if you only define a single view, it will use it by default, I'll give that a try now, thanks
I don't recall that being the case, IIRC you'd still need to supply name.
That seems to do the trick, and you seem to be correct about the need to supply the name (in my case dagger call build-docker-image --source .\code:default
Build time without your suggestion (unchanged code) 21-30 seconds
Build time with your suggestion 11-17 seconds.
Thank you @worldly musk
anytime! ping if you need extra help
Glad to hear it!
@opaque mulch FYI in the next release we'll be able to use the defaultPath with directory parameters which should remove the need to use views
https://github.com/dagger/dagger/blob/main/.changes/unreleased/Added-20240920-122701.yaml
An engine to run your pipelines in containers. Contribute to dagger/dagger development by creating an account on GitHub.
@uncut hamlet I'm not sure I follow. I'm not very knowledgable about some of the terminology used in this project. 99% beginner here... but it sounds good.
No worries, once this ships ill ping you and we can make sure your code is up to date ๐
Full service here, I like it !
That change is not actually about defaultPath, it's about ignore. So you can have ignore and no default, then directories provided via CLI will be filtered using those ignores.
That's a good point Helder, seems like this user could already start using defaultPath with ignores as it doesn't seem there's anything that's preventing it
It won't work right now if they are passing the directory via CLI. But if they are using the defaultPath, yes