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

Ignore _build #4230

Merged
merged 3 commits into from Jun 11, 2020
Merged

Ignore _build #4230

merged 3 commits into from Jun 11, 2020

Conversation

rjbou
Copy link
Collaborator

@rjbou rjbou commented Jun 10, 2020

On syncing (assume-built) and for opam file lookup (recursive)
fix #4195

@rjbou rjbou added this to the 2.1.0~alpha2 milestone Jun 10, 2020
@rjbou rjbou added this to PR in Progress in Opam 2.1.x Jun 10, 2020
Copy link
Member

@AltGr AltGr left a comment

Choose a reason for hiding this comment

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

Clearly the part for recursive-pin is what we want... not completely sure about the rest.
Especially in the case of assume_built, we'd want to keep the artefacts no ?

not (OpamStd.String.starts_with ~prefix:"." basename)
not (base_dir = OpamFilename.Base.of_string OpamSwitch.external_dirname ||
base_dir = OpamFilename.Base.of_string "_build" ||
OpamStd.String.starts_with ~prefix:"." basename)
Copy link
Member

Choose a reason for hiding this comment

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

We might consider anything starting with _ at this point... what do you think ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In fact, it will be better to have a list of exclusion folders/patterns, checked. I planned to keep that for rec pin rewriting.

@AltGr
Copy link
Member

AltGr commented Jun 10, 2020

and in the case of "file pin", it would be much cleaner, but we should make sure it corresponds to what the users of file-pin expect (it'll probably increase build times, and dune should be capable of handling any discrepancies)

@rjbou rjbou moved this from PR in Progress to PR Finalised in Opam 2.1.x Jun 11, 2020
@rjbou
Copy link
Collaborator Author

rjbou commented Jun 11, 2020

We don't need the build artefacts in opam source, assume-built implies inplace-build, so compile and install are launched from the current directory. For file pinning, if a user wants to take advantage of the _build, there is the inplace-build option (ftm).

@rjbou rjbou merged commit 184d0a1 into ocaml:master Jun 11, 2020
Opam 2.1.x automation moved this from PR Finalised to Done Jun 11, 2020
@rjbou rjbou mentioned this pull request Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Opam 2.1.x
  
Done
Development

Successfully merging this pull request may close these issues.

[Feature request] Allow ignoring _build directory when pinning with -k path
2 participants