@@ -34,7 +34,7 @@ use zip::result::ZipError;
3434use zip:: ZipArchive ;
3535
3636use self :: error:: ValidationError ;
37- use crate :: api:: { Api , ChunkServerOptions , ChunkUploadCapability } ;
37+ use crate :: api:: { Api , ChunkServerOptions } ;
3838use crate :: config:: Config ;
3939use crate :: constants:: { DEFAULT_MAX_DIF_SIZE , DEFAULT_MAX_WAIT } ;
4040use crate :: utils:: chunks;
@@ -1267,14 +1267,9 @@ pub struct DifUpload<'a> {
12671267 zips_allowed : bool ,
12681268 max_file_size : u64 ,
12691269 max_wait : Duration ,
1270- pdbs_allowed : bool ,
1271- portablepdbs_allowed : bool ,
1272- sources_allowed : bool ,
12731270 include_sources : bool ,
1274- bcsymbolmaps_allowed : bool ,
12751271 wait : bool ,
12761272 upload_il2cpp_mappings : bool ,
1277- il2cpp_mappings_allowed : bool ,
12781273 no_upload : bool ,
12791274}
12801275
@@ -1308,14 +1303,9 @@ impl<'a> DifUpload<'a> {
13081303 zips_allowed : true ,
13091304 max_file_size : DEFAULT_MAX_DIF_SIZE ,
13101305 max_wait : DEFAULT_MAX_WAIT ,
1311- pdbs_allowed : false ,
1312- portablepdbs_allowed : false ,
1313- sources_allowed : false ,
13141306 include_sources : false ,
1315- bcsymbolmaps_allowed : false ,
13161307 wait : false ,
13171308 upload_il2cpp_mappings : false ,
1318- il2cpp_mappings_allowed : false ,
13191309 no_upload : false ,
13201310 }
13211311 }
@@ -1465,69 +1455,9 @@ impl<'a> DifUpload<'a> {
14651455 . min ( Duration :: from_secs ( chunk_options. max_wait ) ) ;
14661456 }
14671457
1468- self . pdbs_allowed = chunk_options. supports ( ChunkUploadCapability :: Pdbs ) ;
1469- self . portablepdbs_allowed = chunk_options. supports ( ChunkUploadCapability :: PortablePdbs ) ;
1470- self . sources_allowed = chunk_options. supports ( ChunkUploadCapability :: Sources ) ;
1471- self . bcsymbolmaps_allowed = chunk_options. supports ( ChunkUploadCapability :: BcSymbolmap ) ;
1472- self . il2cpp_mappings_allowed = chunk_options. supports ( ChunkUploadCapability :: Il2Cpp ) ;
1473-
1474- if !chunk_options. supports ( ChunkUploadCapability :: DebugFiles ) {
1475- anyhow:: bail!(
1476- "Your Sentry server does not support chunked uploads for debug files. Please upgrade \
1477- your Sentry server, or if you cannot upgrade your server, downgrade your Sentry \
1478- CLI version to 2.x."
1479- ) ;
1480- }
1481-
1482- self . validate_capabilities ( ) ;
14831458 upload_difs_chunked ( self , chunk_options)
14841459 }
14851460
1486- /// Validate that the server supports all requested capabilities.
1487- fn validate_capabilities ( & mut self ) {
1488- // Checks whether source bundles are *explicitly* requested on the command line.
1489- if ( self
1490- . formats
1491- . contains ( & DifFormat :: Object ( FileFormat :: SourceBundle ) )
1492- || self . include_sources )
1493- && !self . sources_allowed
1494- {
1495- warn ! ( "Source uploads are not supported by the configured Sentry server" ) ;
1496- self . include_sources = false ;
1497- }
1498-
1499- // Checks whether PDBs or PEs were *explicitly* requested on the command line.
1500- if ( self . formats . contains ( & DifFormat :: Object ( FileFormat :: Pdb ) )
1501- || self . formats . contains ( & DifFormat :: Object ( FileFormat :: Pe ) ) )
1502- && !self . pdbs_allowed
1503- {
1504- warn ! ( "PDBs and PEs are not supported by the configured Sentry server" ) ;
1505- // This is validated additionally in .valid_format()
1506- }
1507-
1508- // Checks whether Portable PDBs were *explicitly* requested on the command line.
1509- if self
1510- . formats
1511- . contains ( & DifFormat :: Object ( FileFormat :: PortablePdb ) )
1512- && !self . portablepdbs_allowed
1513- {
1514- warn ! ( "Portable PDBs are not supported by the configured Sentry server" ) ;
1515- // This is validated additionally in .valid_format()
1516- }
1517-
1518- // Checks whether BCSymbolMaps and PLists are **explicitly** requested on the command line.
1519- if ( self . formats . contains ( & DifFormat :: BcSymbolMap )
1520- || self . formats . contains ( & DifFormat :: PList ) )
1521- && !self . bcsymbolmaps_allowed
1522- {
1523- warn ! ( "BCSymbolMaps are not supported by the configured Sentry server" ) ;
1524- }
1525-
1526- if self . upload_il2cpp_mappings && !self . il2cpp_mappings_allowed {
1527- warn ! ( "il2cpp line mappings are not supported by the configured Sentry server" ) ;
1528- }
1529- }
1530-
15311461 /// Determines if this `DebugId` matches the search criteria.
15321462 fn valid_id ( & self , id : DebugId ) -> bool {
15331463 self . ids . is_empty ( ) || self . ids . contains ( & id)
@@ -1542,11 +1472,6 @@ impl<'a> DifUpload<'a> {
15421472 fn valid_format ( & self , format : DifFormat ) -> bool {
15431473 match format {
15441474 DifFormat :: Object ( FileFormat :: Unknown ) => false ,
1545- DifFormat :: Object ( FileFormat :: Pdb ) if !self . pdbs_allowed => false ,
1546- DifFormat :: Object ( FileFormat :: Pe ) if !self . pdbs_allowed => false ,
1547- DifFormat :: Object ( FileFormat :: SourceBundle ) if !self . sources_allowed => false ,
1548- DifFormat :: Object ( FileFormat :: PortablePdb ) if !self . portablepdbs_allowed => false ,
1549- DifFormat :: BcSymbolMap | DifFormat :: PList if !self . bcsymbolmaps_allowed => false ,
15501475 format => self . formats . is_empty ( ) || self . formats . contains ( & format) ,
15511476 }
15521477 }
0 commit comments