Suppress related warnings, fix nanoid, and get the build green (#7579)
This is in preparation for adding a Linux build step to our CI. Release Notes: - N/A
This commit is contained in:
parent
8f7d7863d6
commit
d4be15b2b2
8 changed files with 18 additions and 12 deletions
|
@ -1,3 +1,6 @@
|
||||||
|
// todo!(linux): remove
|
||||||
|
#![cfg_attr(target_os = "linux", allow(dead_code))]
|
||||||
|
|
||||||
mod app_menu;
|
mod app_menu;
|
||||||
mod keystroke;
|
mod keystroke;
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#![allow(non_upper_case_globals)]
|
#![allow(non_upper_case_globals)]
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
#![allow(non_snake_case)]
|
#![allow(non_snake_case)]
|
||||||
|
//todo!(linux): remove
|
||||||
|
#![allow(unused_variables)]
|
||||||
|
|
||||||
use crate::{PlatformDispatcher, TaskLabel};
|
use crate::{PlatformDispatcher, TaskLabel};
|
||||||
use async_task::Runnable;
|
use async_task::Runnable;
|
||||||
|
|
|
@ -1,18 +1,12 @@
|
||||||
|
//todo!(linux) remove
|
||||||
|
#[allow(unused)]
|
||||||
use crate::{
|
use crate::{
|
||||||
Bounds, DevicePixels, Font, FontId, FontMetrics, FontRun, GlyphId, LineLayout, Pixels,
|
Bounds, DevicePixels, Font, FontId, FontMetrics, FontRun, GlyphId, LineLayout, Pixels,
|
||||||
PlatformTextSystem, RenderGlyphParams, SharedString, Size,
|
PlatformTextSystem, RenderGlyphParams, SharedString, Size,
|
||||||
};
|
};
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use collections::HashMap;
|
use collections::HashMap;
|
||||||
use font_kit::{
|
use font_kit::{font::Font as FontKitFont, source::SystemSource, sources::mem::MemSource};
|
||||||
font::Font as FontKitFont,
|
|
||||||
handle::Handle,
|
|
||||||
hinting::HintingOptions,
|
|
||||||
metrics::Metrics,
|
|
||||||
properties::{Style as FontkitStyle, Weight as FontkitWeight},
|
|
||||||
source::SystemSource,
|
|
||||||
sources::mem::MemSource,
|
|
||||||
};
|
|
||||||
use parking_lot::RwLock;
|
use parking_lot::RwLock;
|
||||||
use smallvec::SmallVec;
|
use smallvec::SmallVec;
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
//todo!(linux): remove
|
||||||
|
#![allow(unused)]
|
||||||
|
|
||||||
use super::BladeRenderer;
|
use super::BladeRenderer;
|
||||||
use crate::{
|
use crate::{
|
||||||
Bounds, GlobalPixels, LinuxDisplay, Pixels, PlatformDisplay, PlatformInputHandler,
|
Bounds, GlobalPixels, LinuxDisplay, Pixels, PlatformDisplay, PlatformInputHandler,
|
||||||
|
|
|
@ -19,6 +19,9 @@ use parking_lot::Mutex;
|
||||||
use smallvec::SmallVec;
|
use smallvec::SmallVec;
|
||||||
use std::{cell::Cell, ffi::c_void, mem, ptr, sync::Arc};
|
use std::{cell::Cell, ffi::c_void, mem, ptr, sync::Arc};
|
||||||
|
|
||||||
|
// Exported to metal
|
||||||
|
pub(crate) type PointF = crate::Point<f32>;
|
||||||
|
|
||||||
#[cfg(not(feature = "runtime_shaders"))]
|
#[cfg(not(feature = "runtime_shaders"))]
|
||||||
const SHADERS_METALLIB: &[u8] = include_bytes!(concat!(env!("OUT_DIR"), "/shaders.metallib"));
|
const SHADERS_METALLIB: &[u8] = include_bytes!(concat!(env!("OUT_DIR"), "/shaders.metallib"));
|
||||||
#[cfg(feature = "runtime_shaders")]
|
#[cfg(feature = "runtime_shaders")]
|
||||||
|
@ -77,7 +80,7 @@ impl MetalRenderer {
|
||||||
.new_library_with_data(SHADERS_METALLIB)
|
.new_library_with_data(SHADERS_METALLIB)
|
||||||
.expect("error building metal library");
|
.expect("error building metal library");
|
||||||
|
|
||||||
fn to_float2_bits(point: crate::PointF) -> u64 {
|
fn to_float2_bits(point: PointF) -> u64 {
|
||||||
let mut output = point.y.to_bits() as u64;
|
let mut output = point.y.to_bits() as u64;
|
||||||
output <<= 32;
|
output <<= 32;
|
||||||
output |= point.x.to_bits() as u64;
|
output |= point.x.to_bits() as u64;
|
||||||
|
|
|
@ -5,8 +5,6 @@ use crate::{
|
||||||
use collections::{BTreeMap, FxHashSet};
|
use collections::{BTreeMap, FxHashSet};
|
||||||
use std::{fmt::Debug, iter::Peekable, slice};
|
use std::{fmt::Debug, iter::Peekable, slice};
|
||||||
|
|
||||||
// Exported to metal
|
|
||||||
pub(crate) type PointF = Point<f32>;
|
|
||||||
#[allow(non_camel_case_types, unused)]
|
#[allow(non_camel_case_types, unused)]
|
||||||
pub(crate) type PathVertex_ScaledPixels = PathVertex<ScaledPixels>;
|
pub(crate) type PathVertex_ScaledPixels = PathVertex<ScaledPixels>;
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@ async-trait = { workspace = true }
|
||||||
collections = { workspace = true, features = ["test-support"] }
|
collections = { workspace = true, features = ["test-support"] }
|
||||||
gpui = { workspace = true, features = ["test-support"] }
|
gpui = { workspace = true, features = ["test-support"] }
|
||||||
live_kit_server.workspace = true
|
live_kit_server.workspace = true
|
||||||
|
nanoid = "0.4"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
anyhow.workspace = true
|
anyhow.workspace = true
|
||||||
|
|
|
@ -26,6 +26,8 @@ pub struct PurescriptLspAdapter {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl PurescriptLspAdapter {
|
impl PurescriptLspAdapter {
|
||||||
|
// todo!(linux): remove
|
||||||
|
#[cfg_attr(target_os = "linux", allow(dead_code))]
|
||||||
pub fn new(node: Arc<dyn NodeRuntime>) -> Self {
|
pub fn new(node: Arc<dyn NodeRuntime>) -> Self {
|
||||||
Self { node }
|
Self { node }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue