Skip to content

Commit e79199c

Browse files
christollidaymeta-codesync[bot]
authored andcommitted
Fix oss build
Summary: Fix more OSS breakages due to pagable impls in D94933232 Removing `pagable_dep` gate for `starlark-rust/starlark` because it no longer makes sense: - The OSS breakage came from adding buck2 code that depends on `starlark-rust/starlark` without enabling the `pagable_dep` feature from buck2. - Enabling `pagable_dep` for `starlark-rust/starlark` no longer makes sense since it now has a non-optional dependency on pagable. - The non-optional dependency from `starlark-rust/starlark` was added by Nero5023 by using the `tokio` feature instead of `pagable_dep`: D96530196 Reviewed By: Nero5023 Differential Revision: D96976881 fbshipit-source-id: ee78a2447deed1c3097ce9a0397382644cba8ae6
1 parent 1aa8d79 commit e79199c

File tree

10 files changed

+11
-11
lines changed

10 files changed

+11
-11
lines changed

starlark/src/environment/globals.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ use crate::values::types::function::NativeFunction;
5050

5151
/// The global values available during execution.
5252
#[derive(Clone, Dupe, Debug, Allocative)]
53-
#[cfg_attr(feature = "pagable_dep", derive(pagable::PagablePanic))]
53+
#[derive(pagable::PagablePanic)]
5454
pub struct Globals(Arc<GlobalsData>);
5555

5656
type GlobalValue = MaybeDocHiddenValue<'static, FrozenValue>;

starlark/src/environment/modules.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ enum ModuleError {
7777
/// these values after the [`FrozenModule`] has been released unless you obtain a reference
7878
/// to the frozen heap.
7979
#[derive(Debug, Clone, Dupe, Allocative)]
80-
#[cfg_attr(feature = "pagable_dep", derive(pagable::PagablePanic))]
80+
#[derive(pagable::PagablePanic)]
8181
// We store the two elements separately since the FrozenHeapRef contains
8282
// a copy of the FrozenModuleData inside it.
8383
// Two Arc's should still be plenty cheap enough to qualify for `Dupe`.

starlark/src/eval/runtime/profile/mode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use dupe::Dupe;
2323

2424
/// How to profile starlark code.
2525
#[derive(Debug, PartialEq, Eq, Hash, Clone, Dupe, Copy, Allocative)]
26-
#[cfg_attr(feature = "pagable_dep", derive(pagable::Pagable))]
26+
#[derive(pagable::Pagable)]
2727
#[non_exhaustive]
2828
pub enum ProfileMode {
2929
/// The heap profile mode provides information about the time spent in each function and allocations

starlark/src/values/layout/typed.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ pub struct ValueTyped<'v, T: StarlarkValue<'v>>(Value<'v>, marker::PhantomData<T
7777
/// [`FrozenValue`] wrapper which asserts contained value is of type `<T>`.
7878
#[derive(Copy_, Clone_, Dupe_, ProvidesStaticType, Allocative)]
7979
#[allocative(skip)] // Heap owns the value.
80-
#[cfg_attr(feature = "pagable_dep", derive(pagable::PagablePanic))]
80+
#[derive(pagable::PagablePanic)]
8181
#[repr(transparent)]
8282
pub struct FrozenValueTyped<'v, T: StarlarkValue<'v>>(FrozenValue, marker::PhantomData<&'v T>);
8383

starlark/src/values/layout/value.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ impl Equivalent<Value<'_>> for FrozenValue {
245245
/// when working directly with [`FrozenValue`]s. See the type [`OwnedFrozenValue`](crate::values::OwnedFrozenValue)
246246
/// for a little bit more safety.
247247
#[derive(Clone, Copy, Dupe, ProvidesStaticType, Allocative)]
248-
#[cfg_attr(feature = "pagable_dep", derive(pagable::PagablePanic))]
248+
#[derive(pagable::PagablePanic)]
249249
// One possible change: moving from Blackhole during GC
250250
pub struct FrozenValue(
251251
#[allocative(skip)] // Because it is owned by the heap.

starlark/src/values/owned.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ enum OwnedError {
5252
/// is strongly discouraged. See the other methods which unpack the code, access it as a
5353
/// [`Value`] (which has a suitable lifetime) or add references to other heaps.
5454
#[derive(Debug, Clone, Dupe, Allocative)]
55-
#[cfg_attr(feature = "pagable_dep", derive(pagable::PagablePanic))]
55+
#[derive(pagable::PagablePanic)]
5656
pub struct OwnedFrozenValue {
5757
owner: FrozenHeapRef,
5858
// Invariant: this FrozenValue must be kept alive by the `owner` field.
@@ -199,7 +199,7 @@ impl OwnedFrozenValue {
199199

200200
/// Same as [`OwnedFrozenValue`] but it is known to contain `T`.
201201
#[derive(Debug, Clone_, Dupe_, Allocative)]
202-
#[cfg_attr(feature = "pagable_dep", derive(pagable::PagablePanic))]
202+
#[derive(pagable::PagablePanic)]
203203
pub struct OwnedFrozenValueTyped<T: StarlarkValue<'static>> {
204204
owner: FrozenHeapRef,
205205
value: FrozenValueTyped<'static, T>,

starlark/src/values/thin_box_slice_frozen_value/packed_impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ unsafe impl Sync for PackedImpl where FrozenValue: Sync {}
112112
/// Specifically, this type uses bit packing and other tricks so that it is only
113113
/// 8 bytes in size, while being allocation free for lengths zero and one. It
114114
/// depends on the lower bit of a FrozenPointer always being unset.
115-
#[cfg_attr(feature = "pagable_dep", derive(pagable::PagablePanic))]
115+
#[derive(pagable::PagablePanic)]
116116
pub struct ThinBoxSliceFrozenValue<'v>(PackedImpl, PhantomData<&'v ()>);
117117

118118
impl<'v> ThinBoxSliceFrozenValue<'v> {

starlark/src/values/types/type_instance_id.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use crate as starlark;
2828
#[derive(
2929
Debug, Copy, Clone, Dupe, Hash, Eq, PartialEq, Ord, PartialOrd, Allocative, Freeze
3030
)]
31-
#[cfg_attr(feature = "pagable_dep", derive(pagable::PagablePanic))]
31+
#[derive(pagable::PagablePanic)]
3232
pub struct TypeInstanceId(u64);
3333

3434
impl TypeInstanceId {

starlark/src/values/typing/callable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ impl<'v, P: StarlarkCallableParamSpec, R: StarlarkTypeRepr> AllocValue<'v>
211211
/// Marker for a callable value.
212212
#[derive(Allocative)]
213213
#[allocative(bound = "")]
214-
#[cfg_attr(feature = "pagable_dep", derive(pagable::PagablePanic))]
214+
#[derive(pagable::PagablePanic)]
215215
pub struct FrozenStarlarkCallable<
216216
P: StarlarkCallableParamSpec = StarlarkCallableParamAny,
217217
R: StarlarkTypeRepr = FrozenValue,

starlark/src/values/value_of_unchecked.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ use crate::values::type_repr::StarlarkTypeRepr;
4848
/// Store value annotated with type, but do not check the type.
4949
#[derive(Clone_, Copy_, Dupe_, Allocative)]
5050
#[allocative(bound = "")]
51-
#[cfg_attr(feature = "pagable_dep", derive(pagable::PagablePanic))]
51+
#[derive(pagable::PagablePanic)]
5252
pub struct ValueOfUncheckedGeneric<V: ValueLifetimeless, T: StarlarkTypeRepr>(
5353
V,
5454
PhantomData<fn() -> T>,

0 commit comments

Comments
 (0)