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

feat(nix): Ignore many files when creating src #1255

Merged
merged 1 commit into from
Oct 2, 2021

Conversation

doronbehar
Copy link
Contributor

No description provided.

@doronbehar
Copy link
Contributor Author

In response to #1231 (comment)

Copy link
Member

@alerque alerque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking into this.

Just a few question marks in my mind. See comments, plus more generally does this filter have any kind of wildcard/globbing/regex support? Could it accept a file list from another source / format? We now have include/exclude lists for quite a few purposes: git ignores, linting include / exclude, vendored libraries, autotools dist_files, docker builds, etc. Someday we're going to want to unify them a bit.

flake.nix Show resolved Hide resolved
flake.nix Show resolved Hide resolved
@alerque alerque added the tooling Build tooling, release management, and packaging processes label Sep 29, 2021
@alerque alerque added this to the v0.12.x milestone Sep 29, 2021
@doronbehar
Copy link
Contributor Author

more generally does this filter have any kind of wildcard/globbing/regex support?

Sort of, but it's not that well developed, see: https://github.com/numtide/nix-filter#design-notes

Could it accept a file list from another source / format?

Yes, we can read a list of files from another file, we can even read that list of files and ignore the file itself along.

We now have include/exclude lists for quite a few purposes: git ignores, linting include / exclude, vendored libraries, autotools dist_files, docker builds, etc. Someday we're going to want to unify them a bit.

I'm not against that, but to my view many of these exclude lists perhaps intersect but not match a lot since they serve different purposes. The sole purpose of this exclude list is to make the source directory of the build cleaner so that running nix build two times in a row won't require a real rebuild if the source is exactly the same - exactly the same regarding source files that are actually used in the build.

I do see a reason to ignore both what's in the list here, and what's written in .gitignore. I'll see how can I use https://github.com/hercules-ci/gitignore.nix as well.

@doronbehar
Copy link
Contributor Author

.gitignore is used now to ignore files, and the other list of files are also excluded.

@alerque alerque merged commit 0cf86a7 into sile-typesetter:master Oct 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling Build tooling, release management, and packaging processes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants