Commit 0bf9914 1 parent 317ae34 commit 0bf9914 Copy full SHA for 0bf9914
File tree 7 files changed +36
-12
lines changed
commit_rewriting/mononoke_x_repo_sync_job/src
megarepo_api/megarepo_error/src
7 files changed +36
-12
lines changed Original file line number Diff line number Diff line change 10
10
branches :
11
11
- main
12
12
13
+ permissions :
14
+ contents : read # to fetch code (actions/checkout)
15
+
13
16
jobs :
14
17
build :
15
18
runs-on : ubuntu-20.04
16
19
steps :
17
- - uses : actions/checkout@v2
20
+ - uses : actions/checkout@v4
18
21
- name : Show disk space at start
19
22
run : df -h
20
23
- name : Free up disk space
@@ -25,10 +28,10 @@ jobs:
25
28
run : sudo apt-get update
26
29
- name : Install system deps
27
30
run : sudo python3 build/fbcode_builder/getdeps.py --allow-system-packages install-system-deps --recursive mononoke
31
+ - name : Install packaging system deps
32
+ run : sudo python3 build/fbcode_builder/getdeps.py --allow-system-packages install-system-deps --recursive patchelf
28
33
- name : Install Rust Stable
29
34
uses : dtolnay/rust-toolchain@stable
30
- - name : Fetch lld
31
- run : python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests lld
32
35
- name : Fetch ninja
33
36
run : python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests ninja
34
37
- name : Fetch cmake
89
92
run : python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests fb303
90
93
- name : Fetch rust-shed
91
94
run : python3 build/fbcode_builder/getdeps.py --allow-system-packages fetch --no-tests rust-shed
92
- - name : Build lld
93
- run : python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests lld
94
95
- name : Build ninja
95
96
run : python3 build/fbcode_builder/getdeps.py --allow-system-packages build --free-up-disk --no-tests ninja
96
97
- name : Build cmake
Original file line number Diff line number Diff line change 10
10
branches :
11
11
- main
12
12
13
+ permissions :
14
+ contents : read # to fetch code (actions/checkout)
15
+
13
16
jobs :
14
17
build :
15
18
runs-on : macOS-latest
16
19
steps :
17
- - uses : actions/checkout@v2
20
+ - uses : actions/checkout@v4
18
21
- name : Show disk space at start
19
22
run : df -h
20
23
- name : Free up disk space
Original file line number Diff line number Diff line change @@ -523,7 +523,7 @@ async fn check_if_independent_branch_and_return(
523
523
. commit_graph ( )
524
524
. ancestors_difference_stream ( ctx, branch_tips. clone ( ) , other_branches)
525
525
. await ?
526
- . map_ok ( { move |cs| async move { Ok ( cs. load ( ctx, blobstore) . await ?) } } )
526
+ . map_ok ( move |cs| async move { Ok ( cs. load ( ctx, blobstore) . await ?) } )
527
527
. try_buffered ( 100 )
528
528
. try_collect :: < Vec < _ > > ( )
529
529
. await ?;
Original file line number Diff line number Diff line change 7
7
8
8
#![ feature( error_generic_member_access) ]
9
9
#![ feature( iterator_try_reduce) ]
10
- #![ feature( provide_any) ]
10
+ #![ cfg_attr ( fbcode_build , feature( provide_any) ) ]
11
11
12
12
pub mod mode;
13
13
Original file line number Diff line number Diff line change 6
6
*/
7
7
8
8
#![ feature( error_generic_member_access) ]
9
- #![ feature( provide_any) ]
9
+ #![ cfg_attr ( fbcode_build , feature( provide_any) ) ]
10
10
11
11
use std:: backtrace:: BacktraceStatus ;
12
12
use std:: convert:: Infallible ;
@@ -21,6 +21,9 @@ use thiserror::Error;
21
21
pub mod macro_reexport {
22
22
pub use anyhow:: anyhow;
23
23
}
24
+ // The cargo build of anyhow disables its backtrace features when using RUSTC_BOOTSTRAP=1
25
+ #[ cfg( not( fbcode_build) ) ]
26
+ pub static DISABLED : std:: backtrace:: Backtrace = std:: backtrace:: Backtrace :: disabled ( ) ;
24
27
25
28
#[ macro_export]
26
29
macro_rules! cloneable_error {
@@ -29,9 +32,15 @@ macro_rules! cloneable_error {
29
32
pub struct $name( pub :: std:: sync:: Arc <anyhow:: Error >) ;
30
33
31
34
impl $name {
35
+ #[ cfg( fbcode_build) ]
32
36
pub fn backtrace( & self ) -> & :: std:: backtrace:: Backtrace {
33
37
self . 0 . backtrace( )
34
38
}
39
+
40
+ #[ cfg( not( fbcode_build) ) ]
41
+ pub fn backtrace( & self ) -> & :: std:: backtrace:: Backtrace {
42
+ & $crate:: DISABLED
43
+ }
35
44
}
36
45
37
46
impl :: std:: fmt:: Display for $name {
@@ -51,6 +60,7 @@ macro_rules! cloneable_error {
51
60
Some ( & * * self . 0 )
52
61
}
53
62
63
+ #[ cfg( fbcode_build) ]
54
64
fn provide<' a>( & ' a self , demand: & mut :: std:: any:: Demand <' a>) {
55
65
demand. provide_ref:: <:: std:: backtrace:: Backtrace >( self . backtrace( ) ) ;
56
66
}
Original file line number Diff line number Diff line change 5
5
* GNU General Public License version 2.
6
6
*/
7
7
8
- use std:: any:: Demand ;
9
8
use std:: backtrace:: Backtrace ;
10
9
use std:: convert:: Infallible ;
11
10
use std:: error:: Error as StdError ;
@@ -30,10 +29,20 @@ use crate::path::MononokePath;
30
29
#[ derive( Clone , Debug ) ]
31
30
pub struct InternalError ( Arc < Error > ) ;
32
31
32
+ // The cargo build of anyhow disables its backtrace features when using RUSTC_BOOTSTRAP=1
33
+ #[ cfg( not( fbcode_build) ) ]
34
+ static DISABLED : Backtrace = Backtrace :: disabled ( ) ;
35
+
33
36
impl InternalError {
37
+ #[ cfg( fbcode_build) ]
34
38
pub fn backtrace ( & self ) -> & Backtrace {
35
39
self . 0 . backtrace ( )
36
40
}
41
+
42
+ #[ cfg( not( fbcode_build) ) ]
43
+ pub fn backtrace ( & self ) -> & Backtrace {
44
+ & DISABLED
45
+ }
37
46
}
38
47
39
48
impl fmt:: Display for InternalError {
@@ -53,7 +62,8 @@ impl StdError for InternalError {
53
62
Some ( & * * self . 0 )
54
63
}
55
64
56
- fn provide < ' a > ( & ' a self , demand : & mut Demand < ' a > ) {
65
+ #[ cfg( fbcode_build) ]
66
+ fn provide < ' a > ( & ' a self , demand : & mut :: std:: any:: Demand < ' a > ) {
57
67
demand. provide_ref :: < Backtrace > ( self . backtrace ( ) ) ;
58
68
}
59
69
}
Original file line number Diff line number Diff line change 6
6
*/
7
7
8
8
#![ feature( error_generic_member_access) ]
9
- #![ feature( provide_any) ]
9
+ #![ cfg_attr ( fbcode_build , feature( provide_any) ) ]
10
10
#![ feature( trait_alias) ]
11
11
12
12
use std:: sync:: Arc ;
You can’t perform that action at this time.
0 commit comments