-
Notifications
You must be signed in to change notification settings - Fork 413
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
Symbolic Paths #744
Closed
Closed
Symbolic Paths #744
Changes from 71 commits
Commits
Show all changes
87 commits
Select commit
Hold shift + click to select a range
da56fda
WIP
rgrinberg 9ba8715
Error checking for .aliases path
rgrinberg 80817b4
Path.pp_debug
rgrinberg 6e2d5bb
Unify build dir constants
rgrinberg f8aa2d4
Remove hard coded _build in error checking
rgrinberg 99dc7e8
Change is_local to work like is_managed
rgrinberg 9b4ad5e
Let the base build dir be Kind.t
rgrinberg bf44bfa
Add Path.mkdir_p
rgrinberg 6e0025e
Change local_mkdirs to work on Path.Set.t
rgrinberg dc9891e
fix drop_build_dir for external paths
rgrinberg d0020b9
Fix Parh.relative to recognize absolute paths
rgrinberg 9c672ba
Remove error checks that don't work for external paths
rgrinberg ec54812
Update tests
rgrinberg 0900122
Make the build dir customizeable via Path.set_build_dir
rgrinberg 1238861
Introduce Path.in_source
rgrinberg 9282f30
Remove build dir check in_source paths
rgrinberg b3090a5
Use absolute paths for config
rgrinberg c8de924
Make the build dir configurable
rgrinberg 03014ed
Fix bootstrap to set build dir
rgrinberg 2efef26
Fix utop
rgrinberg dbe6453
Don't use Path.of_string where it isn't required
rgrinberg 4ba811b
Set build dir in path unit tests
rgrinberg 355601a
Fix Path.reach for local paths being reach from absolute paths
rgrinberg b10677a
Add tests for custom build-dir
rgrinberg 9ebdac3
Fix make_local_parent_dirs
rgrinberg 01f6470
Some formatting fixes
rgrinberg 339dc00
Rename is_local to is_managed
rgrinberg 0c9fb4a
cleanup
3a11ac8
Use source code ordering for Path.compare
f9bec51
Remove public uses of Path.kind
rgrinberg d12d021
Retain constructors of paths in sexp conversion
rgrinberg b84545d
Implement normalization for external paths
rgrinberg 8eea911
Make Kind.t abstract
rgrinberg e98af3f
Normalize paths in kind.of_string
rgrinberg 872c421
Make normalize raise on invalid path
rgrinberg 4c1cad2
Add setting workspace root global var
rgrinberg ae9e8e9
External.descendant
rgrinberg f02026f
Make Kind.of_string translate absolute paths into local paths when po…
rgrinberg c0cc86f
Fix bootstrap
rgrinberg 0830d60
Fix error message
rgrinberg 1230776
Rename drop_build_dir to as_relative_to_build_dir
rgrinberg dd1bf32
Remove trying to convert external paths to build paths
rgrinberg 18782ab
Make Local.t abstract
rgrinberg 62de740
Fix reach_for_running
rgrinberg dc1342f
Make Path.External.t abstract
rgrinberg 99cedbc
Remove broken normalization
rgrinberg c236947
Make sure sexp conversion functions in path.ml preserve the invariants
f44b78d
_
0138034
Make extend_basename more efficient
rgrinberg b57a2a6
Fix accidental capitalization
rgrinberg e587c42
Use Kind.append_local to concat local paths
rgrinberg a55b1e5
rework Path.relative/of_string
0d01d5c
Add Path.Local.Prefix
5e2a6d9
Use Path.pp_debug in path expect tests
rgrinberg 3397abe
Use lazy values for root and build_dir
e76abb6
Intern external paths
rgrinberg 2e287ec
Re-implement Local functions in terms of is_root
rgrinberg f25b9a7
Intern local paths
rgrinberg 4da825f
Simplify some conditionals into ||
rgrinberg 54bde97
Remove functions from Path.Local
rgrinberg a076300
Do not marshall Path.t
rgrinberg c57f6af
Don't marshal Action.t
rgrinberg dd2e3d1
Sort paths based on their values before marshalling
rgrinberg 98e9fb9
Add Path.Set.to_alpha_list
rgrinberg df5e0ac
Make path lists passed to user deterministic
rgrinberg c76bc54
Restore old printing order
rgrinberg 07de911
Use greedy resizing for interned paths
rgrinberg 386ab5e
Fix for generative sets
rgrinberg 6b724c9
Remove interning
rgrinberg 1a774e3
Remove sorting from to_alpha_list
rgrinberg dbd13da
Fix compare_val issue
rgrinberg 06d69b7
Represent root as "."
e6ad475
Avoid a few extra comparisons
7662acf
Fix Local.descendant
2426bc3
Slightly faster implem of Path.reach
b60ea2e
Get rid of Clflags.workspace_root
487f3d4
Restore utop target
bc33d09
Remove Path.Set.to_alpha_list
49ba8ed
Rename Path.absolute to Path.of_filename_relative_to_initial_cwd
a297a52
Merge remote-tracking branch 'origin/master' into sym-path
fbcc458
Update tests
110e79f
Constraint on the form of the build directory a bit more
c2d3e62
Add a test with invalid result
8d4a3b9
Merge remote-tracking branch 'origin/master' into sym-path
01b3b5d
Fix Path.relative when going from the source tree to the build directory
4d3021f
Add a test with a build directory not starting with _
8694b22
Fix Path.is_build_dir and add Path.is_strict_descendant_of_build_dir
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,7 +67,7 @@ end = struct | |
None | ||
|
||
let anonymous path = | ||
if Path.is_local path then | ||
if Path.is_managed path then | ||
Some (Anonymous path) | ||
else | ||
None | ||
|
@@ -107,7 +107,7 @@ end = struct | |
|> List.tl | ||
|> String.concat ~sep:"/") | ||
in | ||
if not (Path.is_local p) then invalid s; | ||
if not (Path.is_managed p) then invalid s; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @diml I think this check and the one above can perhaps be tightened a little. E.g. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indeed |
||
Anonymous p | ||
| _ when validate s -> Named s | ||
| _ -> invalid s | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not put the default value in the
Arg.(value ...)
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's because the default would have to be duplciated for bootstrap, but I'm no longer sure. I agree that making the default part of the CLI is correct.