id
stringlengths
20
30
source
stringclasses
1 value
chunk_index
int64
0
520k
token_count
int32
154
512
content
stringlengths
185
57.5k
rust_dataset_chunk_509000
rust_dataset.txt
509,000
512
use indoc::{formatdoc, indoc}; use crate::tasks::workflows::{ extension_tests::{self}, runners, steps::{ self, BASH_SHELL, CommonJobConditions, CommonPermissionSets, DEFAULT_REPOSITORY_OWNER_GUARD, GitHubScriptStep, GitRef, NamedJob, RefSha, RepositoryTarget, TokenPermissions, cache...
rust_dataset_chunk_509001
rust_dataset.txt
509,001
512
workflow_call( WorkflowCall::default() .add_input(bump_type.name, bump_type.call_input()) .add_input(force_bump.name, force_bump.call_input()) .add_input(working_directory.name, working_directory.call_input()) .secrets([ ...
rust_dataset_chunk_509002
rust_dataset.txt
509,002
512
([(TokenPermissions::Contents, Level::Write)]) .into(); let (determine_tag_step, tag) = determine_tag(current_version); let job = steps::dependant_job(dependencies) .defaults(extension_job_defaults()) .cond(Expression::new(format!( "{DEFAULT_REPOSITORY_OWNER_GUARD} && git...
rust_dataset_chunk_509003
rust_dataset.txt
509,003
512
ITHUB_EVENT_NAME" == "pull_request" ]]; then PR_FORK_POINT="$(git merge-base origin/main HEAD)" git checkout "$PR_FORK_POINT" else git checkout "$(git log -1 --format=%H)"~1 fi PARENT_COMMIT_VERSION="$({VERSION_CHECK})" [[ "$CURRENT_VERSION" == "$PAR...
rust_dataset_chunk_509004
rust_dataset.txt
509,004
512
.add_step(bump_version) .add_step(create_pull_request( title, body, generated_token, branch_name, )); named::job(job) } fn install_bump_2_version() -> Step<Run> { named::run( runners::Platform::Linux, "pip install bump2version --...
rust_dataset_chunk_509005
rust_dataset.txt
509,005
512
-autobump"; }} >> "$GITHUB_OUTPUT" fi echo "new_version=${{NEW_VERSION}}" >> "$GITHUB_OUTPUT" "# }) .id("bump-version") .add_env(("OLD_VERSION", current_version.to_string())) .add_env(("BUMP_TYPE", bump_type.to_string())) .add_env(("WORKING_DIR", "${{ inputs.work...
rust_dataset_chunk_509006
rust_dataset.txt
509,006
512
get_extension_id() -> (Step<Run>, StepOutput) { let step = named::bash(indoc! { r#" EXTENSION_ID="$(sed -n 's/id = \"\(.*\)\"/\1/p' < extension.toml)" echo "extension_id=${EXTENSION_ID}" >> "$GITHUB_OUTPUT" "#}) .id("get-extension-id"); let extension_id = StepOutput::new(&step, "e...
rust_dataset_chunk_509007
rust_dataset.txt
509,007
512
zed-industries', repo: 'extensions', issue_number: pullNumber, assignees: [author] }); console.log(`Assigned ${author} to PR #${prNumber} in zed-industries/extensions`); // Get the GraphQL node ID const { data: pr } = await github.rest.pulls.get({ ...
rust_dataset_chunk_509008
rust_dataset.txt
509,008
512
push( Push::default() .add_branch("main") .add_ignored_path(".github/**"), ) .pull_request(PullRequest::default().add_type(PullRequestType::Labeled)) .workflow_dispatch(WorkflowDispatch::default())) .permissions(Permissi...
rust_dataset_chunk_509009
rust_dataset.txt
509,009
512
_type="minor" else bump_type="patch" fi echo "bump_type=$bump_type" >> $GITHUB_OUTPUT "#}, ) .add_env(("HAS_MAJOR_LABEL", indoc!{ "${{ (github.event.action == 'labeled' && github.event.label.name == 'major') || (github.e...
rust_dataset_chunk_509010
rust_dataset.txt
509,010
512
.push(Push::default().add_branch("main"))) .concurrency(one_workflow_per_non_main_branch_and_token("pr")) .add_job(call_extension_tests.name, call_extension_tests.job) } pub(crate) fn call_extension_tests(target_ref: Option<&GitSha>) -> NamedJob<UsesJob> { let job = Job::default() .permiss...
rust_dataset_chunk_509011
rust_dataset.txt
509,011
512
jobs, &[]); let working_directory = WorkflowInput::string("working-directory", Some(".".to_owned())); named::workflow() .with_minimal_permissions() .add_event( Event::default().workflow_call( WorkflowCall::default() .add_input(working_directory.n...
rust_dataset_chunk_509012
rust_dataset.txt
509,012
512
"$PACKAGE_NAME" --no-fail-fast --no-tests=warn --target "$(rustc -vV | sed -n 's|host: ||p')""#, ) .add_env(("PACKAGE_NAME", package_name.to_string())) .add_env(("NEXTEST_NO_TESTS", "warn")) } fn extension_job_defaults() -> Defaults { Defaults::default().run( RunDefaults::default() ...
rust_dataset_chunk_509013
rust_dataset.txt
509,013
512
-> (Step<Use>, StepOutput) { let step = named::uses( "actions", "cache", "0057852bfaa89a56745cba8c7296529d2fc39830", ) .id("cache-zed-extension-cli") .with( Input::default() .add("path", "zed-extension") .add("key", "zed-extension-${{ env.ZED_EXTE...
rust_dataset_chunk_509014
rust_dataset.txt
509,014
512
Dispatch, }; use indoc::formatdoc; use indoc::indoc; use serde_json::json; use crate::tasks::workflows::steps::GitRef; use crate::tasks::workflows::steps::RefSha; use crate::tasks::workflows::steps::{ CheckoutStep, CommonPermissionSets, DownloadArtifactStep, IfNoFilesFound, ResultEncoding, TokenPermissions, Up...
rust_dataset_chunk_509015
rust_dataset.txt
509,015
512
get_repositories(filter_repos_input: &WorkflowInput) -> (Step<Use>, StepOutput) { let step: Step<Use> = steps::github_script(formatdoc! {r#" const repos = await github.paginate(github.rest.repos.listForOrg, {{ org: 'zed-extensions', type: 'public', ...
rust_dataset_chunk_509016
rust_dataset.txt
509,016
512
) -> (Step<Run>, StepOutput, StepOutput) { let step = named::bash(indoc! {r#" for workflow_type in "ci" "shared"; do if [ "$workflow_type" = "ci" ]; then WORKFLOW_DIR="extensions/workflows" else WORKFLOW_DIR="extensions/workflow...
rust_dataset_chunk_509017
rust_dataset.txt
509,017
512
.timeout_minutes(10u32) .outputs([ ("repos".to_owned(), list_repos_output.to_string()), ("prev_commit".to_owned(), prev_commit.to_string()), ("removed_ci".to_owned(), removed_ci.to_string()), ("removed_shared".to_owned(), removed_shared.to_string()), ...
rust_dataset_chunk_509018
rust_dataset.txt
509,018
512
/workflows/ else cp workflow-files/shared/*.yml extension/.github/workflows/ fi "#}) .add_env(("REMOVED_CI", removed_ci)) .add_env(("REMOVED_SHARED", removed_shared)) .add_env(("MATRIX_REPO", "${{ matrix.repo }}")) } fn get_short_sha() -> ...
rust_dataset_chunk_509019
rust_dataset.txt
509,019
512
) .for_repository(RepositoryTarget::new( "zed-extensions", &["${{ matrix.repo }}"], )) .with_permissions([ (TokenPermissions::Contents, Level::Write), (TokenPermissions::Issues, Level::Write), (TokenPermi...
rust_dataset_chunk_509020
rust_dataset.txt
509,020
512
) .add_step(checkout_zed_repo(&token)) .add_step(steps::update_ref( GitRef::Tag(ROLLOUT_TAG_NAME.to_owned()), RefSha::Context, &token, true, )); named::job(job) } --- FILE: zed/tooling/xtask/src/tasks/workflows/nix_build.rs --- use crate::ta...
rust_dataset_chunk_509021
rust_dataset.txt
509,021
512
join(" || "); let synchronized = labels .iter() .map(|label| format!("contains(github.event.pull_request.labels.*.name, '{label}')")) .collect::<Vec<_>>() .join(" || "); [ (Platform::Linux, Arch::X86_64), (Platform::Mac, Arch::AARCH64), ] .map(|(platform, ...
rust_dataset_chunk_509022
rust_dataset.txt
509,022
512
{} -L --accept-flake-config", flake_output )) } // After install-nix, register ~/nix-cache as a local binary cache // substituter so nix pulls from it on demand during builds (no bulk // import). Also restart the daemon so it picks up the new config. pub fn configure_local_nix_c...
rust_dataset_chunk_509023
rust_dataset.txt
509,023
512
sdk examples which we don't actually depend on .add_step(steps::checkout_repo()); if deps.len() > 0 { job = job.needs(deps.iter().map(|d| d.name.clone()).collect::<Vec<String>>()); } // On Linux, `cache: nix` uses bind-mounts so the /nix store is available // before install-nix-action...
rust_dataset_chunk_509024
rust_dataset.txt
509,024
512
changes are included.", ); let publish = publish_job(); let update_sha_in_zed = update_sha_in_zed(&publish, &message); let update_sha_in_extensions = update_sha_in_extensions(&publish, &message); named::workflow() .with_minimal_permissions() .on(Event::default().workflow_dispatch(...
rust_dataset_chunk_509025
rust_dataset.txt
509,025
512
_step(authenticate) .add_step(steps::update_ref( GitRef::tag(EXTENSION_CLI_TAG), RefSha::Context, &token, true, )), ) } fn update_sha_in_zed(publish_job: &NamedJob, message: &WorkflowInput) -> NamedJob { let (generate_token...
rust_dataset_chunk_509026
rust_dataset.txt
509,026
512
} Release Notes: - N/A "#}; steps::CreatePrStep::new(title, "update-extension-cli-sha", generated_token) .with_body(body) .into() } fn update_sha_in_extensions(publish_job: &NamedJob, message: &WorkflowInput) -> NamedJob { let extensions_repo = RepositoryTarget::new("zed-...
rust_dataset_chunk_509027
rust_dataset.txt
509,027
512
); let body = formatdoc! {r#" This PR bumps the extension CLI version to https://github.com/zed-industries/zed/commit/${{{{ github.sha }}}}. {message} "#}; steps::CreatePrStep::new(title, "update-extension-cli-sha", generated_token) .with_body(body) .with_labels("allow-no-...
rust_dataset_chunk_509028
rust_dataset.txt
509,028
512
bundle_linux(Arch::X86_64, NIGHTLY, true, &[&tests]), bwrap_linux_aarch64: build_static_bwrap(Arch::AARCH64, &[&tests]), bwrap_linux_x86_64: build_static_bwrap(Arch::X86_64, &[&tests]), mac_aarch64: bundle_mac(Arch::AARCH64, NIGHTLY, &[&tests]), mac_x86_64: bundle_mac(Arch::X86_64, NIGH...
rust_dataset_chunk_509029
rust_dataset.txt
509,029
512
(("CARGO_TERM_COLOR", "always")) .add_env(("RUST_BACKTRACE", "1")) .add_job(check_tag.name, check_tag.job) .add_job(tests.name, tests.job) .map(|mut workflow| { for job in bundle.into_jobs() { workflow = workflow.add_job(job.name, job.job); } ...
rust_dataset_chunk_509030
rust_dataset.txt
509,030
512
Job { let (authenticate, token) = steps::authenticate_as_zippy() .for_repository(RepositoryTarget::current()) .with_permissions([(TokenPermissions::Contents, Level::Write)]) .into(); NamedJob { name: "update_nightly_tag".to_owned(), job: steps::release_job(&bundle.jobs()...
rust_dataset_chunk_509031
rust_dataset.txt
509,031
512
ippy = run_tests::clippy(Platform::Mac, None, false); let linux_clippy = run_tests::clippy(Platform::Linux, None, false); let windows_clippy = run_tests::clippy(Platform::Windows, None, false); let check_scripts = run_tests::check_scripts(false); let create_draft_release = create_draft_release(); l...
rust_dataset_chunk_509032
rust_dataset.txt
509,032
512
&macos_tests, &linux_tests, &windows_tests, &macos_clippy, &linux_clippy, &windows_clippy, &check_scripts, ]; let push_slack_notification = push_release_update_notification( &create_draft_release, &upload_release_assets, &validate_r...
rust_dataset_chunk_509033
rust_dataset.txt
509,033
512
_64: NamedJob, } impl ReleaseBundleJobs { pub fn jobs(&self) -> Vec<&NamedJob> { vec![ &self.linux_aarch64, &self.linux_x86_64, &self.bwrap_linux_aarch64, &self.bwrap_linux_x86_64, &self.mac_aarch64, &self.mac_x86_64, &self...
rust_dataset_chunk_509034
rust_dataset.txt
509,034
512
const COMPLIANCE_REPORT_PATH: &str = "compliance-report-${GITHUB_REF_NAME}.md"; pub(crate) const COMPLIANCE_REPORT_ARTIFACT_PATH: &str = "compliance-report-${{ github.ref_name }}.md"; pub(crate) const COMPLIANCE_STEP_ID: &str = "run-compliance-check"; const NEEDS_REVIEW_PULLS_URL: &str = "https://github.com/zed-in...
rust_dataset_chunk_509035
rust_dataset.txt
509,035
512
) .if_condition(Expression::new("always()")) .when( matches!(context, ComplianceContext::Release { .. }), |step| step.overwrite(true), ); let (success_prefix, failure_prefix) = match context { ComplianceContext::Release { .. } => { ("✅ Compliance ...
rust_dataset_chunk_509036
rust_dataset.txt
509,036
512
{ ComplianceContext::Release { .. } | ComplianceContext::ReleaseNonBlocking => { Context::github().ref_name().to_string() } ComplianceContext::Scheduled { tag_source } => tag_source.to_string(), }, )) .add_env(( ...
rust_dataset_chunk_509037
rust_dataset.txt
509,037
512
"#, }; named::job( dependant_job(deps) .runs_on(runners::LINUX_SMALL) // The release is still a draft at this point, and draft releases are // only visible to tokens with write access to repository contents. .permissions(Permissions::default().contents(L...
rust_dataset_chunk_509038
rust_dataset.txt
509,038
512
draft because it is the first preview release for v${major}.${minor}.x" fi if [[ "$should_release" == "true" ]]; then gh release edit "$tag" --repo=zed-industries/zed --draft=false release_published=true fi echo "release_published=$relea...
rust_dataset_chunk_509039
rust_dataset.txt
509,039
512
.permissions(Permissions::default().contents(Level::Write)) .add_step(download_workflow_artifacts()) .add_step(steps::script("ls -lR ./artifacts")) .add_step(prep_release_artifacts()) .add_step( steps::script("gh release upload \"$GITHUB_REF_NA...
rust_dataset_chunk_509040
rust_dataset.txt
509,040
512
case()) } let all_job_names: Vec<&str> = test_jobs .iter() .map(|j| j.name.as_ref()) .chain(bundle_jobs.jobs().into_iter().map(|j| j.name.as_ref())) .collect(); let env_entries = [ ( "DRAFT_RESULT".into(), format!("${{{{ needs.{}.result }}}}"...
rust_dataset_chunk_509041
rust_dataset.txt
509,041
512
BS="" {failure_checks} FAILED_JOBS=$(echo "$FAILED_JOBS" | xargs) if [ "$UPLOAD_RESULT" == "cancelled" ]; then if [ -n "$FAILED_JOBS" ]; then echo "❌ Release job for $TAG was cancelled, most likely because tests \`$FAILED_JOBS\`...
rust_dataset_chunk_509042
rust_dataset.txt
509,042
512
{{{{ github.workflow }}}} failed: {CURRENT_ACTION_RUN_URL}"); let mut job = dependant_job(deps) .runs_on(runners::LINUX_SMALL) .cond(Expression::new("failure()")); for step in notify_slack(MessageType::Static(failure_message)) { job = job.add_step(step); } named::job(job) } pu...
rust_dataset_chunk_509043
rust_dataset.txt
509,043
512
Output(output) => this .if_condition(Expression::new(format!("{message} != ''", message = output.expr()))), }) .add_env(("SLACK_WEBHOOK", vars::SLACK_WEBHOOK_WORKFLOW_FAILURES)) .add_env(("SLACK_MESSAGE", message_source.message())) } --- FILE: zed/tooling/xtask/src/tasks/workflows.rs --- use a...
rust_dataset_chunk_509044
rust_dataset.txt
509,044
512
.as_ref()), ]) .output() .map_err(|_| "Failed to spawn Git command to verify SHA".to_owned())?; if !output.status.success() { return Err(format!( "SHA {} is not a valid Git SHA within this repository!", sha.as_ref() )); } Ok(sha) } #[derive(Pa...
rust_dataset_chunk_509045
rust_dataset.txt
509,045
512
(workflow_name); let content = [disclaimer, content].join("\n"); fs::write(&workflow_path, content).map_err(Into::into) } } #[derive(PartialEq, Eq, strum::EnumIter)] pub enum WorkflowType { /// Workflows living in the Zed repository Zed, /// Workflows living in the `zed-extensions/work...
rust_dataset_chunk_509046
rust_dataset.txt
509,046
512
Remove all previously generated workflows to ensure these do not become stale. WorkflowType::remove_generated_workflows()?; let workflows = [ WorkflowFile::zed(after_release::after_release), WorkflowFile::zed(autofix_pr::autofix_pr), WorkflowFile::zed(bump_patch_version::bump_patch_ver...
rust_dataset_chunk_509047
rust_dataset.txt
509,047
512
64, None, false, &[]), linux_x86_64: bundle_linux(Arch::X86_64, None, false, &[]), bwrap_linux_aarch64: build_static_bwrap(Arch::AARCH64, &[]), bwrap_linux_x86_64: build_static_bwrap(Arch::X86_64, &[]), mac_aarch64: bundle_mac(Arch::AARCH64, None, &[]), mac_x86_64: bundle_mac(Arc...
rust_dataset_chunk_509048
rust_dataset.txt
509,048
512
crun --sdk macosx --show-sdk-version xcrun --sdk macosx --show-sdk-path xcrun clang --version printf 'DEVELOPER_DIR=%s\n' "${DEVELOPER_DIR-<unset>}" printf 'SDKROOT=%s\n' "${SDKROOT-<unset>}" printf 'MACOSX_DEPLOYMENT_TARGET=%s\n' "${MACOSX_DEPLOYMENT_TARGET-<...
rust_dataset_chunk_509049
rust_dataset.txt
509,049
512
Error) } pub(crate) fn build_static_bwrap(arch: Arch, deps: &[&NamedJob]) -> NamedJob { let artifact_name = match arch { Arch::X86_64 => assets::BWRAP_LINUX_X86_64, Arch::AARCH64 => assets::BWRAP_LINUX_AARCH64, }; let binary_name = artifact_name .strip_suffix(".gz") .expect(...
rust_dataset_chunk_509050
rust_dataset.txt
509,050
512
AARCH64 => assets::LINUX_AARCH64, }; let remote_server_artifact_name = match arch { Arch::X86_64 => assets::REMOTE_SERVER_LINUX_X86_64, Arch::AARCH64 => assets::REMOTE_SERVER_LINUX_AARCH64, }; NamedJob { name: format!("bundle_linux_{arch}"), job: bundle_job(deps) ...
rust_dataset_chunk_509051
rust_dataset.txt
509,051
512
::AARCH64 => assets::REMOTE_SERVER_WINDOWS_AARCH64, }; NamedJob { name: format!("bundle_windows_{arch}"), job: bundle_job(deps) .runs_on(runners::WINDOWS_DEFAULT) .envs(bundle_envs(platform)) .add_step(steps::checkout_repo()) .when_some(release_cha...
rust_dataset_chunk_509052
rust_dataset.txt
509,052
512
pub const LINUX_MEDIUM: Runner = Runner("namespace-profile-4x8-ubuntu-2204"); // Using Ubuntu 20.04 for minimal glibc version pub const LINUX_X86_BUNDLER: Runner = Runner("namespace-profile-32x64-ubuntu-2004"); pub const LINUX_ARM_BUNDLER: Runner = Runner("namespace-profile-8x32-ubuntu-2004-arm-m4"); // Larger Ubuntu...
rust_dataset_chunk_509053
rust_dataset.txt
509,053
512
Mac, } impl Platform { pub fn target_triple(self, arch: Arch) -> &'static str { match (self, arch) { (Self::Linux, Arch::X86_64) => "x86_64-unknown-linux-musl", (Self::Linux, Arch::AARCH64) => "aarch64-unknown-linux-musl", (Self::Mac, Arch::X86_64) => "x86_64-apple-darw...
rust_dataset_chunk_509054
rust_dataset.txt
509,054
512
/ci.yml) // - .wezel/ // - extensions/ (these have their own test workflow) let should_run_tests = PathCondition::inverted( "run_tests", r"^(docs/|script/update_top_ranking_issues/|\.github/(ISSUE_TEMPLATE|workflows/(?!run_tests))|[.]wezel/|extensions/)", ); let should_check_docs = ...
rust_dataset_chunk_509055
rust_dataset.txt
509,055
512
ways().then(check_dependencies()), // could be more specific here? should_check_docs .and_not_in_merge_queue() .then(deploy_docs::check_docs()), should_check_licences .and_not_in_merge_queue() .then(check_licenses()), should_check_scripts.and_alway...
rust_dataset_chunk_509056
rust_dataset.txt
509,056
512
enum OrchestrateTarget { /// For the main Zed repo: includes the cargo package filter and extension /// change detection, but no working-directory scoping. ZedRepo, /// For individual extension repos: scopes changed-file detection to the /// working directory, with no package filter or extension det...
rust_dataset_chunk_509057
rust_dataset.txt
509,057
512
{ local output_name="$1" local pattern="$2" local grep_arg="$3" echo "$CHANGED_FILES" | grep "$grep_arg" "$pattern" && \ echo "${output_name}=true" >> "$GITHUB_OUTPUT" || \ echo "${output_name}=false" >> "$GITHUB_OUTPUT" } "#}); let mut...
rust_dataset_chunk_509058
rust_dataset.txt
509,058
512
bogus package # (e.g. "lints") and produced a nextest filter like rdeps(lints) that # hard-errors ("operator didn't match any packages"). Skipping such # directories leaves the package set empty, which falls through to the # "run all tests" path below. if [ -...
rust_dataset_chunk_509059
rust_dataset.txt
509,059
512
", rule.name, rule.pattern, grep_arg )); } if target == OrchestrateTarget::ZedRepo { script.push_str(DETECT_CHANGED_EXTENSIONS_SCRIPT); script.push_str("echo \"changed_extensions=$EXTENSIONS_JSON\" >> \"$GITHUB_OUTPUT\"\n"); outputs.insert( "changed_exte...
rust_dataset_chunk_509060
rust_dataset.txt
509,060
512
_names .iter() .map(|name| name.to_string()) .collect::<Vec<String>>(), ) .cond(repository_owner_guard_expression(true)) .add_step( env_entries .into_iter() .fold(named::bash(&script), |step, env_item| { ...
rust_dataset_chunk_509061
rust_dataset.txt
509,061
512
{ named::bash(formatdoc!( r#"tar -xf "$GITHUB_WORKSPACE/{TS_QUERY_LS_FILE}" -C "$GITHUB_WORKSPACE" "$GITHUB_WORKSPACE/ts_query_ls" format --check {directory} || {{ echo "Found unformatted queries, please format them with ts_query_ls." echo "For easy use, install the Tree-sit...
rust_dataset_chunk_509062
rust_dataset.txt
509,062
512
named::uses( "actions", "dependency-review-action", "67d4f4bd7a9b17a0db54d2a7519187c65e339de8", // v4 ) .if_condition(Expression::new("github.event_name == 'pull_request'")) .with(("license-check", false)) } named::job(use_clang( release_job(...
rust_dataset_chunk_509063
rust_dataset.txt
509,063
512
.target_triple(arch); let runner = match (platform, arch) { (Platform::Linux, Arch::X86_64) => runners::LINUX_LARGE, (Platform::Linux, Arch::AARCH64) => runners::LINUX_ARM_BUNDLER, (Platform::Mac, _) => runners::MAC_SMALL, (Platform::Windows, _) => runners::WINDOWS_DEFAULT, }; ...
rust_dataset_chunk_509064
rust_dataset.txt
509,064
512
target}"))) .add_step(steps::setup_sccache(platform)) .add_step(check) .add_step(steps::show_sccache_stats(platform)), } } fn check_workspace_binaries() -> NamedJob { named::job(use_clang( release_job(&[]) .runs_on(runners::LINUX_LARGE) .add_s...
rust_dataset_chunk_509065
rust_dataset.txt
509,065
512
)); if platform == Platform::Linux { job = use_clang(job); } let name = match arch { Some(arch) => format!("clippy_{platform}_{arch}"), None => format!("clippy_{platform}"), }; NamedJob { name, job } } pub(crate) fn run_platform_tests(platform: Platform) -> NamedJob { ru...
rust_dataset_chunk_509066
rust_dataset.txt
509,066
512
job.add_step(steps::setup_linux()) }) .add_step(steps::setup_node()) .when( platform == Platform::Linux || platform == Platform::Mac, |job| job.add_step(steps::cargo_install_nextest()), ) .add_step(steps::clear_target_dir_if_la...
rust_dataset_chunk_509067
rust_dataset.txt
509,067
512
.add_with(("against", "https://github.com/${GITHUB_REPOSITORY}.git#branch=${BUF_BASE_BRANCH},subdir=crates/proto/proto/")) } fn buf_lint() -> Step<Run> { named::bash("buf lint crates/proto/proto") } fn check_protobuf_formatting() -> Step<Run> { named::bash("buf format --diff --exit-co...
rust_dataset_chunk_509068
rust_dataset.txt
509,068
512
(run_scheduler_tests_under_miri()) .add_step(steps::cleanup_cargo_config(Platform::Linux)), ) } fn doctests() -> NamedJob { fn run_doctests() -> Step<Run> { named::bash(indoc::indoc! {r#" cargo test --workspace --doc --no-fail-fast "#}) .id("run_doctests") } ...
rust_dataset_chunk_509069
rust_dataset.txt
509,069
512
a7ce02", // v0.6.0 ) .add_with(("advanced-security", false)) .add_with(("min-severity", "high")) .add_with(("version", "latest")) } fn check_xtask_workflows() -> Step<Run> { named::bash(indoc::indoc! {r#" cargo xtask workflows if ! git diff --exit...
rust_dataset_chunk_509070
rust_dataset.txt
509,070
512
, StepOutput}, }; pub(crate) fn use_clang(job: Job) -> Job { job.add_env(Env::new("CC", "clang")) .add_env(Env::new("CXX", "clang++")) } const SCCACHE_R2_BUCKET: &str = "sccache-zed"; pub(crate) const BASH_SHELL: &str = "bash -euxo pipefail {0}"; // https://docs.github.com/en/actions/reference/workflows-...
rust_dataset_chunk_509071
rust_dataset.txt
509,071
512
_name(mut self, name: &str) -> Self { self.name = Some(name.to_string()); self } pub fn with_custom_fetch_depth(mut self, fetch_depth: impl Into<Value>) -> Self { self.fetch_depth = FetchDepth::Custom(fetch_depth.into()); self } /// Sets `fetch-depth` to `2` on the main...
rust_dataset_chunk_509072
rust_dataset.txt
509,072
512
))) .when_some(value.ref_, |step, ref_| step.add_with(("ref", ref_))) .when_some(value.token, |step, token| step.add_with(("token", token))) } } impl FluentBuilder for CheckoutStep {} pub fn checkout_repo() -> CheckoutStep { CheckoutStep::default() } // Audit mode: logs egress, blocks...
rust_dataset_chunk_509073
rust_dataset.txt
509,073
512
-e", "install-action", "a6b2e2dcd845ddd7f509ce4f3ed3d922b80cc5d9", // v2.84.0 ) .add_with(("tool", tool)) } pub fn cargo_install_nextest() -> Step<Use> { taiki_install_action("nextest") } pub fn setup_cargo_config(platform: Platform) -> Step<Run> { match platform { ...
rust_dataset_chunk_509074
rust_dataset.txt
509,074
512
} } pub fn install_rustup_target(target: &str) -> Step<Run> { named::bash(format!("rustup target add {target}")) } pub fn cache_rust_dependencies_namespace() -> Step<Use> { named::uses( "namespacelabs", "nscloud-cache-action", "a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9", // v1 )...
rust_dataset_chunk_509075
rust_dataset.txt
509,075
512
-only root filesystem so nscloud's `cache: nix` // cannot mount or symlink there. Instead we cache a user-writable directory and // use nix-store --import/--export in separate steps to transfer store paths. named::uses( "namespacelabs", "nscloud-cache-action", "a90bb5d4b27522ce881c6e...
rust_dataset_chunk_509076
rust_dataset.txt
509,076
512
default().contents(Level::Read)) } } pub(crate) fn release_job(deps: &[&NamedJob]) -> Job { dependant_job(deps) .with_repository_owner_guard() .timeout_minutes(60u32) } pub(crate) fn dependant_job(deps: &[&NamedJob]) -> Job { let job = Job::default(); if deps.len() > 0 { job.ne...
rust_dataset_chunk_509077
rust_dataset.txt
509,077
512
, option: &Option<T>, then: impl FnOnce(Self) -> Self) -> Self where Self: Sized, { self.map(|this| if option.is_some() { this } else { then(this) }) } } // (janky) helper to generate steps with a name that corresponds // to the name of the calling function. pub mod named { use super::*...
rust_dataset_chunk_509078
rust_dataset.txt
509,078
512
(1) .rev() .collect::<Vec<_>>() .join("::"), ) .permissions(Permissions::default()) .defaults(Defaults::default().run(RunDefaults::default().shell(BASH_SHELL))) } /// Returns a Job with the same name as the enclosin...
rust_dataset_chunk_509079
rust_dataset.txt
509,079
512
e986cb6290c5673b"; // v7 const UPLOAD_ARTIFACT_SHA: &str = "043fb46d1a93c77aae656e7c1c64a875d1fc6a0a"; // v7.0.1 const DOWNLOAD_ARTIFACT_SHA: &str = "3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c"; // v8.0.1 #[allow(unused)] pub(crate) enum ResultEncoding { String, Json, } impl ResultEncoding { fn as_str(&self...
rust_dataset_chunk_509080
rust_dataset.txt
509,080
512
step.id(id)); for (key, val) in value.env { step = step.add_env((key, val)); } step } } impl FluentBuilder for GitHubScriptStep {} pub fn github_script(script: impl Into<String>) -> GitHubScriptStep { GitHubScriptStep { name: function_name(1), script: scrip...
rust_dataset_chunk_509081
rust_dataset.txt
509,081
512
}) .when(value.overwrite, |step| step.add_with(("overwrite", true))) } } impl FluentBuilder for UploadArtifactStep {} pub fn upload_artifact( artifact_name: impl Into<String>, path: impl Into<String>, ) -> UploadArtifactStep { UploadArtifactStep { name: function_name(1), a...
rust_dataset_chunk_509082
rust_dataset.txt
509,082
512
Token<'a, Target = Unset, Permissions = Unset> { job_name: String, app_id: &'a str, app_secret: &'a str, repository_target: Target, permissions: Permissions, } impl<'a, Permissions> GenerateAppToken<'a, Unset, Permissions> { pub fn for_repository( self, repository_target: Reposi...
rust_dataset_chunk_509083
rust_dataset.txt
509,083
512
String, } impl RepositoryTarget { pub fn new<T: ToString>(owner: T, repositories: &[&str]) -> Self { Self { owner: owner.to_string(), repositories: repositories.join("\n"), } } pub fn current() -> Self { Self::new( "${{ github.repository_owner }...
rust_dataset_chunk_509084
rust_dataset.txt
509,084
512
.add_with(("files", step.files)) .add_with(("token", step.token)) } } pub(crate) enum GitRef { Tag(String), Branch(String), } impl GitRef { pub fn tag(name: impl ToString) -> Self { Self::Tag(name.to_string()) } pub fn branch(name: impl ToString) -> Self { Self::B...
rust_dataset_chunk_509085
rust_dataset.txt
509,085
512
_path}', sha: {sha}{force_line} }}) "#, sha = match &op.sha { RefSha::Context => "context.sha".to_string(), RefSha::Custom(sha) => format!("'{sha}'"), } }; github_script(script) .custom_name(&step...
rust_dataset_chunk_509086
rust_dataset.txt
509,086
512
ToString) -> Self { Self { labels: Some(labels.to_string()), ..self } } pub fn with_path(self, path: impl ToString) -> Self { Self { path: Some(path.to_string()), ..self } } } impl From<CreatePrStep> for Step<Use> { fn fr...
rust_dataset_chunk_509087
rust_dataset.txt
509,087
512
!(AZURE_SIGNING_CLIENT_ID); secret!(AZURE_SIGNING_CLIENT_SECRET); secret!(AZURE_SIGNING_TENANT_ID); secret!(CACHIX_AUTH_TOKEN); secret!(CLUSTER_NAME); secret!(DIGITALOCEAN_ACCESS_TOKEN); secret!(DIGITALOCEAN_SPACES_ACCESS_KEY); secret!(DIGITALOCEAN_SPACES_SECRET_KEY); secret!(GITHUB_TOKEN); secret!(MACOS_CERTIFICATE); ...
rust_dataset_chunk_509088
rust_dataset.txt
509,088
512
add("AZURE_CLIENT_ID", AZURE_SIGNING_CLIENT_ID) .add("AZURE_CLIENT_SECRET", AZURE_SIGNING_CLIENT_SECRET) .add("ACCOUNT_NAME", AZURE_SIGNING_ACCOUNT_NAME) .add("CERT_PROFILE_NAME", AZURE_SIGNING_CERT_PROFILE_NAME) .add("ENDPOINT", AZURE_SIGNING_ENDPOINT) .add("...
rust_dataset_chunk_509089
rust_dataset.txt
509,089
512
'a self, job: NamedJob) -> NamedJob { let set_by_step = self .condition .set_by_step .borrow() .clone() .unwrap_or_else(|| panic!("condition {},is never set", self.condition.name)); NamedJob { name: job.name, job: job.jo...
rust_dataset_chunk_509090
rust_dataset.txt
509,090
512
, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "${{{{ {} }}}}", self.expr()) } } pub(crate) struct JobOutput { job_name: String, name: &'static str, } impl JobOutput { pub fn expr(&self) -> String { format!("needs.{}.outputs.{}", self.job_name, self.name) } } i...
rust_dataset_chunk_509091
rust_dataset.txt
509,091
512
::fmt::Display for WorkflowInput { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "${{{{ {} }}}}", self.expr()) } } impl serde::Serialize for WorkflowInput { fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: serde::Serializer, ...
rust_dataset_chunk_509092
rust_dataset.txt
509,092
512
_SERVER_MAC_AARCH64: &str = "zed-remote-server-macos-aarch64.gz"; pub const REMOTE_SERVER_MAC_X86_64: &str = "zed-remote-server-macos-x86_64.gz"; pub const REMOTE_SERVER_LINUX_AARCH64: &str = "zed-remote-server-linux-aarch64.gz"; pub const REMOTE_SERVER_LINUX_X86_64: &str = "zed-remote-server-linux-x86_64.g...
rust_dataset_chunk_509093
rust_dataset.txt
509,093
512
Args { /// Fail (rather than skip the enforcement checks) when the sandbox can't /// actually be enforced. Use this once the WSL environment is provisioned, /// so a broken sandbox is caught instead of silently skipped. #[arg(long)] require_enforced: bool, /// Build and run the helper in releas...
rust_dataset_chunk_509094
rust_dataset.txt
509,094
512
2-foundation` instead"), ("metal", "use `objc2-metal` and `objc2-quartz-core` instead"), ("objc", "use `objc2` instead"), ("objc-foundation", "use `objc2-foundation` instead"), ("objc_id", "use `objc2::rc::Retained` instead"), ]; /// Crates that must not depend on each other, di...
rust_dataset_chunk_509095
rust_dataset.txt
509,095
512
let dependencies = match name { "metal" => "[dependencies]\nobjc = { path = '../objc' }\n", "intermediate" => { "[dependencies]\nmetal = { path = '../metal', optional = true }\n" } _ => "", }; fs::wri...
rust_dataset_chunk_509096
rust_dataset.txt
509,096
512
::new(); command .manifest_path(&manifest) .other_options(vec!["--offline".to_owned()]); let mut violations = forbidden_objc_dependency_violations(&command.exec()?)?; violations.sort(); assert_eq!( violations, [ "Cargo.toml ...
rust_dataset_chunk_509097
rust_dataset.txt
509,097
512
objc2` instead", ], ); fs::write(&manifest, allowed)?; assert_eq!( forbidden_objc_dependency_violations(&command.exec()?)?, Vec::<String>::new(), ); Ok(()) } #[test] fn no_test_support_in_non_dev_dependencies() { let worksp...
rust_dataset_chunk_509098
rust_dataset.txt
509,098
512
} } assert_eq!( violations, Vec::<String>::new(), "forbidden dependency paths between sibling feature crates; \ break the dependency (e.g. by extracting shared code into a lower-level crate) \ instead of joining these crates into ...
rust_dataset_chunk_509099
rust_dataset.txt
509,099
512
}` uses `{name}`; {reason}" )); } Ok(violations) } fn dependency_path<'a>( graph: &BTreeMap<&'a str, BTreeSet<&'a str>>, from: &'a str, to: &str, ) -> Option<Vec<&'a str>> { let mut parents = BTreeMap::new(); let mut queue = VecDeque::from...