Skip to content

Commit 9c80616

Browse files
authored
Bzl integration (#25)
1 parent 19209aa commit 9c80616

205 files changed

Lines changed: 17445 additions & 2408 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
out
2+
tmp
23
node_modules
4+
.vscode
35
.vscode-test/
46
*.vsix

.vscode/extensions.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

.vscode/launch.json

Lines changed: 0 additions & 36 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

.vscode/tasks.json

Lines changed: 0 additions & 20 deletions
This file was deleted.

.vscodeignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
.vscode-test/**
33
out/test/**
44
src/**
5+
tmp/**
6+
docs/**
57
.gitignore
6-
ext.vsix
7-
vsc-extension-quickstart.md
88
**/tsconfig.json
99
**/.eslintrc.json
1010
**/*.map
1111
**/*.ts
12+
node_modules/**

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## 0.5.0 (Thu Set 17 2020)
4+
5+
- Experimental Bzl integration (disabled by default)
6+
37
## 0.4.1 (Tue Aug 4 2020)
48

59
- Enable language server by default

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Build and test targets quickly within vscode.
9898

9999
Quick-pick targets and jump to their location.
100100

101-
![bzl-repositories](https://user-images.githubusercontent.com/50580/93265314-b2199500-f765-11ea-903e-b00600a1f2df.gif)
101+
![bsv.bzl.repository](https://user-images.githubusercontent.com/50580/93265314-b2199500-f765-11ea-903e-b00600a1f2df.gif)
102102

103103
### Bzl Integration
104104

help/repositories.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ This is due to several possible root causes:
2424
delete the `output_base`.
2525
3. You have a non-standard location where you are persisting output bases,
2626
perhaps with the `--output_user_root` flag. To fix, configure the
27-
`feature.bzl.server.command` extension setting to include the flag
27+
`bsv.bzl.server.command` extension setting to include the flag
2828
`--repository_output_user_root=/path/to/output_user_root`. This will allow
2929
bzl to scan subdirectories of this location.
3030
4. A bug in Bzl that prevented it from finding your repositories.
@@ -34,5 +34,9 @@ Additional steps to resolve this issue:
3434
1. Start vscode in a bazel repository.
3535
2. Explicitly configure the location of bazel repositories on your filesystem.
3636
To fix, configure the
37-
`feature.bzl.server.command` extension setting to include the flag
37+
`bsv.bzl.server.command` extension setting to include the flag
3838
`--repository_dir=/path/to/bazel_repo`.
39+
3. Enable debug logging for the bzl server with `--log_level=debug` (or
40+
`--log_level=workspace=debug` to be more selective) in
41+
`bsv.bzl.server.command`.
42+

moduleinfo/bazel_tools-git.bzl.moduleinfo

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
2+
�
3+
git_repository�Clone an external git repository.
4+
5+
Clones a Git repository, checks out the specified tag, or commit, and
6+
makes its targets available for binding. Also determine the id of the
7+
commit actually checked out and its date, and return a dict with parameters
8+
that provide a reproducible version of this rule (which a tag not necessarily
9+
is).
10+
.
11+
name"A unique name for this repository. z
12+
branchjbranch in the remote repository to checked out. Precisely one of branch, tag, or commit must be specified.2""m
13+
commit]specific commit to be checked out. Precisely one of branch, tag, or commit must be specified.2""J
14+
init_submodules.Whether to clone submodules in the repository.2False�
15+
16+
patch_args�The arguments given to the patch tool. Defaults to -p0, however -p1 will usually be needed for patches generated by git. If multiple -p arguments are specified, the last one will take effect.If arguments other than -p are specified, Bazel will fall back to use patch command line tool instead of the Bazel-native patch implementation. When falling back to patch command line tool and patch_tool attribute is not specified, `patch` will be used.2["-p0"]e
17+
18+
patch_cmdsQSequence of Bash commands to be applied on Linux/Macos after patches are applied.2[]�
19+
patch_cmds_win�Sequence of Powershell commands to be applied on Windows after patches are applied. If this attribute is not set, patch_cmds will be executed on Windows, which requires Bash binary to exist.2[]�
20+
21+
patch_tool�The patch(1) utility to use. If this is specified, Bazel will use the specifed patch tool instead of the Bazel-native patch implementation.2""�
22+
patches�A list of files that are to be applied as patches after extracting the archive. By default, it uses the Bazel-native patch implementation which doesn't support fuzz match and binary patch, but Bazel will fall back to use patch command line tool if `patch_tool` attribute is specified or there are arguments other than `-p` in `patch_args` attribute.2[]2
23+
remote$The URI of the remote Git repository �
24+
repo_mapping�A dictionary from local repository name to global repository name. This allows controls over workspace dependency resolution for dependencies of this repository.<p>For example, an entry `"@foo": "@bar"` declares that, for any time this repository depends on `@foo` (such as a dependency on `@foo//some:target`, it should actually resolve that dependency within globally-declared `@bar` (`@bar//some:target`).
25+
�
26+
shallow_since�an optional date, not after the specified commit; the argument is not allowed if a tag is specified (which allows cloning with depth 1). Setting such a date close to the specified commit allows for a more shallow clone of the repository, saving bandwidth and wall-clock time.2""K
27+
strip_prefix5A directory prefix to strip from the extracted files.2""t
28+
taggtag in the remote repository to checked out. Precisely one of branch, tag, or commit must be specified.2""
29+
verbose2False
30+
�
31+
new_git_repository�Clone an external git repository.
32+
33+
Clones a Git repository, checks out the specified tag, or commit, and
34+
makes its targets available for binding. Also determine the id of the
35+
commit actually checked out and its date, and return a dict with parameters
36+
that provide a reproducible version of this rule (which a tag not necessarily
37+
is).
38+
.
39+
name"A unique name for this repository. z
40+
branchjbranch in the remote repository to checked out. Precisely one of branch, tag, or commit must be specified.2""�
41+
42+
build_file�The file to use as the BUILD file for this repository.This attribute is an absolute label (use '@//' for the main repo). The file does not need to be named BUILD, but can be (something like BUILD.new-repo-name may work well for distinguishing it from the repository's actual BUILD files. Either build_file or build_file_content must be specified.2None�
43+
build_file_contentnThe content for the BUILD file for this repository. Either build_file or build_file_content must be specified.2""m
44+
commit]specific commit to be checked out. Precisely one of branch, tag, or commit must be specified.2""J
45+
init_submodules.Whether to clone submodules in the repository.2False�
46+
47+
patch_args�The arguments given to the patch tool. Defaults to -p0, however -p1 will usually be needed for patches generated by git. If multiple -p arguments are specified, the last one will take effect.If arguments other than -p are specified, Bazel will fall back to use patch command line tool instead of the Bazel-native patch implementation. When falling back to patch command line tool and patch_tool attribute is not specified, `patch` will be used.2["-p0"]e
48+
49+
patch_cmdsQSequence of Bash commands to be applied on Linux/Macos after patches are applied.2[]�
50+
patch_cmds_win�Sequence of Powershell commands to be applied on Windows after patches are applied. If this attribute is not set, patch_cmds will be executed on Windows, which requires Bash binary to exist.2[]�
51+
52+
patch_tool�The patch(1) utility to use. If this is specified, Bazel will use the specifed patch tool instead of the Bazel-native patch implementation.2""�
53+
patches�A list of files that are to be applied as patches after extracting the archive. By default, it uses the Bazel-native patch implementation which doesn't support fuzz match and binary patch, but Bazel will fall back to use patch command line tool if `patch_tool` attribute is specified or there are arguments other than `-p` in `patch_args` attribute.2[]2
54+
remote$The URI of the remote Git repository �
55+
repo_mapping�A dictionary from local repository name to global repository name. This allows controls over workspace dependency resolution for dependencies of this repository.<p>For example, an entry `"@foo": "@bar"` declares that, for any time this repository depends on `@foo` (such as a dependency on `@foo//some:target`, it should actually resolve that dependency within globally-declared `@bar` (`@bar//some:target`).
56+
�
57+
shallow_since�an optional date, not after the specified commit; the argument is not allowed if a tag is specified (which allows cloning with depth 1). Setting such a date close to the specified commit allows for a more shallow clone of the repository, saving bandwidth and wall-clock time.2""K
58+
strip_prefix5A directory prefix to strip from the extracted files.2""t
59+
taggtag in the remote repository to checked out. Precisely one of branch, tag, or commit must be specified.2""
60+
verbose2False�
61+
workspace_file�The file to use as the `WORKSPACE` file for this repository. Either `workspace_file` or `workspace_file_content` can be specified, or neither, but not both.2None�
62+
workspace_file_content�The content for the WORKSPACE file for this repository. Either `workspace_file` or `workspace_file_content` can be specified, or neither, but not both.2""*,Rules for cloning external git repositories.

0 commit comments

Comments
 (0)