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

Custom build dir #725

Closed
wants to merge 9 commits into from
Closed

Conversation

rgrinberg
Copy link
Member

Fix #291

@rgrinberg rgrinberg requested a review from a user April 26, 2018 11:06
@ghost
Copy link

ghost commented Apr 26, 2018

A few thoughts:

  • if the build directory is set to an external path, then Path.is_local p will no longer be true for paths
    inside the build directory. I expect that this will break quite a few things
  • renaming the build directory completely invalidate the cache, given that the real build directory is present in all rules
  • _build is hard-coded in the the documentation as well, so the documentation needs to be updated as well

Initially, I had thought that we only needed to know about the actual build directory at the edges, i.e. when converting to/from strings. And in between we would only manipulate symbolic paths, in the same way that local paths are not absolute but relative to the chosen root. Basically we could represent Path.t as follow:

type t =
  | External of Absolute.t
  | In_source_tree of Relative.t
  | In_build_dir of Relative.t

@rgrinberg
Copy link
Member Author

if the build directory is set to an external path, then Path.is_local p will no longer be true for paths inside the build directory. I expect that this will break quite a few things

So I suppose we should change the meaning of local to be anything under the workspace or in the build dir. Regardless if the build dir is in the workspace.

renaming the build directory completely invalidate the cache, given that the real build directory is present in all rules

That seems to be expected. At least until we have the global build cache.

Initially, I had thought that we only needed to know about the actual build directory at the edges, i.e. when converting to/from strings. And in between we would only manipulate symbolic paths, in the same way that local paths are not absolute but relative to the chosen root. Basically we could represent Path.t as follow:

Okay, I'll try making it work with this type

@rgrinberg rgrinberg mentioned this pull request May 2, 2018
@rgrinberg
Copy link
Member Author

Closed in favor of #735

@rgrinberg rgrinberg closed this May 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant