Skip to content

WIP: mark all ReleaseFile related code as deprecated #2491

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ impl<'a> AuthenticatedApi<'a> {

/// Lists release files for the given `release`, filtered by a set of checksums.
/// When empty checksums list is provided, fetches all possible artifacts.
#[deprecated]
pub fn list_release_files_by_checksum(
&self,
org: &str,
Expand Down Expand Up @@ -525,6 +526,7 @@ impl<'a> AuthenticatedApi<'a> {
}

/// Lists all the release files for the given `release`.
#[deprecated]
pub fn list_release_files(
&self,
org: &str,
Expand All @@ -535,6 +537,7 @@ impl<'a> AuthenticatedApi<'a> {
}

/// Get a single release file and store it inside provided descriptor.
#[deprecated]
pub fn get_release_file(
&self,
org: &str,
Expand Down Expand Up @@ -569,6 +572,7 @@ impl<'a> AuthenticatedApi<'a> {
}

/// Get a single release file metadata.
#[deprecated]
pub fn get_release_file_metadata(
&self,
org: &str,
Expand Down Expand Up @@ -603,6 +607,7 @@ impl<'a> AuthenticatedApi<'a> {

/// Deletes a single release file. Returns `true` if the file was
/// deleted or `false` otherwise.
#[deprecated]
pub fn delete_release_file(
&self,
org: &str,
Expand Down Expand Up @@ -637,6 +642,7 @@ impl<'a> AuthenticatedApi<'a> {

/// Deletes all release files. Returns `true` if files were
/// deleted or `false` otherwise.
#[deprecated]
pub fn delete_release_files(
&self,
org: &str,
Expand Down Expand Up @@ -1423,6 +1429,7 @@ impl RegionSpecificApi<'_> {

/// Uploads a new release file. The file is loaded directly from the file
/// system and uploaded as `name`.
#[deprecated]
pub fn upload_release_file(
&self,
context: &UploadContext,
Expand Down
1 change: 1 addition & 0 deletions src/commands/files/delete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ pub fn make_command(command: Command) -> Command {
)
}

#[deprecated]
pub fn execute(matches: &ArgMatches) -> Result<()> {
let config = Config::current();
let release = config.get_release_with_legacy_fallback(matches)?;
Expand Down
1 change: 1 addition & 0 deletions src/commands/files/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pub fn make_command(command: Command) -> Command {
.arg(Arg::new("version").long("version").hide(true))
}

#[deprecated]
pub fn execute(matches: &ArgMatches) -> Result<()> {
let config = Config::current();
let release = config.get_release_with_legacy_fallback(matches)?;
Expand Down
1 change: 1 addition & 0 deletions src/commands/files/upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ pub fn make_command(command: Command) -> Command {
)
}

#[deprecated]
pub fn execute(matches: &ArgMatches) -> Result<()> {
let config = Config::current();
let release = config.get_release_with_legacy_fallback(matches)?;
Expand Down
4 changes: 4 additions & 0 deletions src/commands/sourcemaps/explain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ fn extract_nth_frame(stacktrace: &Stacktrace, position: usize) -> Result<&Frame>
Ok(frame)
}

#[deprecated]
fn fetch_release_artifacts(org: &str, project: &str, release: &str) -> Result<Vec<Artifact>> {
Api::current().authenticated()?.list_release_files(org, Some(project), release).map(|artifacts| {
if artifacts.is_empty() {
Expand Down Expand Up @@ -181,6 +182,7 @@ fn verify_dists_matches(artifact: &Artifact, dist: Option<&str>) -> Result<()> {
Ok(())
}

#[deprecated]
fn fetch_release_artifact_file(
org: &str,
project: &str,
Expand Down Expand Up @@ -215,6 +217,7 @@ fn fetch_release_artifact_file(
})?
}

#[deprecated]
fn fetch_release_artifact_file_metadata(
org: &str,
project: &str,
Expand Down Expand Up @@ -368,6 +371,7 @@ fn unify_artifact_url(abs_path: &str) -> Result<String> {
Ok(filename)
}

#[deprecated]
pub fn execute(matches: &ArgMatches) -> Result<()> {
let config = Config::current();
warning("DEPRECATION: `sourcemaps explain` has drifted from how sourcemap processing actually operates \
Expand Down
1 change: 1 addition & 0 deletions src/utils/file_upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ impl<'a> FileUpload<'a> {
}
}

#[deprecated]
fn upload_files_parallel(
context: &UploadContext,
files: &SourceFiles,
Expand Down
1 change: 1 addition & 0 deletions src/utils/sourcemaps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,7 @@ impl SourceMapProcessor {

/// Flags the collected sources whether they have already been uploaded before
/// (based on their checksum), and returns the number of files that *do* need an upload.
#[deprecated]
fn flag_uploaded_sources(&mut self, context: &UploadContext<'_>) -> usize {
let mut files_needing_upload = self.sources.len();

Expand Down
Loading