aturan repositori cache
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Fungsi berikut dapat dimuat dari
@bazel_tools//tools/build_defs/repo:cache.bzl
.
Menampilkan ID kanonis default yang akan digunakan untuk download.
get_default_canonical_id
get_default_canonical_id(repository_ctx, urls)
Menampilkan ID kanonis default yang akan digunakan untuk download.
Menampilkan ""
(string kosong) saat Bazel dijalankan dengan
--repo_env=BAZEL_HTTP_RULES_URLS_AS_DEFAULT_CANONICAL_ID=0
.
mis.
```python
load("@bazel_tools//tools/build_defs/repo:cache.bzl", "get_default_canonical_id")
...
repository_ctx.download_and_extract(
url = urls,
integrity = integrity
canonical_id = get_default_canonical_id(repository_ctx, urls),
),
### Parameters
<table class="params-table">
<colgroup>
<col class="col-param" />
<col class="col-description" />
</colgroup>
<tbody>
<tr id="get_default_canonical_id-repository_ctx">
<td><code>repository_ctx</code></td>
<td>
required.
<p>
The repository context of the repository rule calling this utility
function.
</p>
</td>
</tr>
<tr id="get_default_canonical_id-urls">
<td><code>urls</code></td>
<td>
required.
<p>
A list of URLs matching what is passed to `repository_ctx.download` and
`repository_ctx.download_and_extract`.
</p>
</td>
</tr>
</tbody>
</table>
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2024-08-23 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Informasi yang saya butuhkan tidak ada"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Terlalu rumit/langkahnya terlalu banyak"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Sudah usang"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"Masalah terjemahan"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Masalah kode / contoh"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Lainnya"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Mudah dipahami"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Memecahkan masalah saya"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Lainnya"
}]
{"lastModified": "Terakhir diperbarui pada 2024-08-23 UTC."}
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2024-08-23 UTC."],[],[]]