Skip to content

Commit ede9aa2

Browse files
Re-sync with internal repository (#81)
The internal and external repositories are out of sync. This Pull Request attempts to brings them back in sync by patching the GitHub repository. Please carefully review this patch. You must disable ShipIt for your project in order to merge this pull request. DO NOT IMPORT this pull request. Instead, merge it directly on GitHub using the MERGE BUTTON. Re-enable ShipIt after merging.
1 parent 4d52d4a commit ede9aa2

File tree

21 files changed

+49
-49
lines changed

21 files changed

+49
-49
lines changed

.cargo/config.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[alias]
22
xtask = "run --package xtask --"
33

4-
# @fb-only:
5-
# @fb-only:
4+
# @fb-only
5+
# @fb-only
66

77
[profile.release]
88
lto = "thin"

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ threadpool = "1.8.1"
9999
timeout-readwrite = "0.3.3"
100100
toml = "0.5"
101101
tree-sitter = "0.23.2"
102-
# @fb-only:
102+
# @fb-only
103103
tree-sitter-erlang = "0.11.0" # @oss-only
104104
url = "2.5.4"
105105
vfs = { git = "https://github.com/rust-lang/rust-analyzer", rev = "2024-07-29" }

crates/base_db/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ mod module_index;
2929
// Public API
3030

3131
pub mod fixture;
32-
// @fb-only:
32+
// @fb-only
3333
pub mod test_utils;
3434
pub use change::Change;
3535
pub use elp_project_model::AppType;
@@ -414,7 +414,7 @@ lazy_static! {
414414
static ref IGNORED_SOURCES: Vec<Regex> = {
415415
let regexes: Vec<Vec<Regex>> = vec![
416416
//ignore sources goes here
417-
// @fb-only:
417+
// @fb-only
418418
];
419419
regexes.into_iter().flatten().collect::<Vec<Regex>>()
420420
};

crates/elp/src/bin/glean.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ use elp_ide::elp_ide_db::elp_base_db::VfsPath;
3131
use elp_ide::elp_ide_db::EqwalizerDatabase;
3232
use elp_ide::elp_ide_db::LineIndexDatabase;
3333
use elp_ide::elp_ide_db::RootDatabase;
34-
// @fb-only:
34+
// @fb-only
3535
use elp_ide::Analysis;
3636
use elp_ide::TextRange;
3737
use elp_project_model::buck::BuckQueryConfig;
@@ -1604,8 +1604,8 @@ impl GleanIndexer {
16041604
expansion,
16051605
ods_url: None,
16061606
};
1607-
// @fb-only:
1608-
// @fb-only:
1607+
// @fb-only
1608+
// @fb-only
16091609
Some(XRef {
16101610
source: range.into(),
16111611
target: XRefTarget::Macro(target.into()),
@@ -2459,7 +2459,7 @@ mod tests {
24592459
%% ^^^^^^^^^^^ macro.erl/macro/COUNT_INFRA/70/has_ods/'atom'
24602460
24612461
"#;
2462-
// @fb-only:
2462+
// @fb-only
24632463
}
24642464

24652465
#[test]

crates/elp/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ mod handlers;
3535
pub mod line_endings;
3636
pub mod lsp_ext;
3737
mod mem_docs;
38-
// @fb-only:
38+
// @fb-only
3939
mod op_queue;
4040
mod project_loader;
4141
pub mod reload;
@@ -106,7 +106,7 @@ pub fn otp_file_to_ignore(db: &Analysis, file_id: FileId) -> bool {
106106
"redbug_dtop",
107107
]
108108
.iter()
109-
// @fb-only:
109+
// @fb-only
110110
.map(SmolStr::new)
111111
.collect();
112112
}

crates/hir/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ pub use module_data::TypeAliasDef;
145145
pub use module_data::TypeAliasSource;
146146
pub use module_data::VarDef;
147147
pub use name::known;
148-
// @fb-only:
148+
// @fb-only
149149
pub use name::AsName;
150150
pub use name::MacroName;
151151
pub use name::Name;

crates/hir/src/name.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
//! See [`Name`].
1111
12-
// @fb-only:
12+
// @fb-only
1313

1414
use std::borrow::Cow;
1515
use std::collections::HashSet;

crates/ide/src/annotations.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use elp_syntax::TextRange;
1616
use fxhash::FxHashMap;
1717
use fxhash::FxHashSet;
1818

19-
// @fb-only:
19+
// @fb-only
2020
use crate::runnables::runnables;
2121
use crate::runnables::Runnable;
2222

@@ -46,7 +46,7 @@ pub struct Link {
4646

4747
pub(crate) fn annotations(db: &RootDatabase, file_id: FileId) -> Vec<Annotation> {
4848
let mut annotations = Vec::default();
49-
// @fb-only:
49+
// @fb-only
5050
annotations
5151
}
5252

crates/ide/src/diagnostics.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ mod inefficient_last;
9696
mod map_find_to_syntax;
9797
mod map_insertion_to_syntax;
9898
mod meck;
99-
// @fb-only:
99+
// @fb-only
100100
mod missing_compile_warn_missing_spec;
101101
mod missing_separator;
102102
mod misspelled_attribute;
@@ -804,7 +804,7 @@ pub fn native_diagnostics(
804804
config
805805
.lints_from_config
806806
.get_diagnostics(&mut res, &sema, file_id);
807-
// @fb-only:
807+
// @fb-only
808808
syntax_diagnostics(&sema, &parse, &mut res, file_id);
809809
diagnostics_from_descriptors(
810810
&mut res,
@@ -1515,7 +1515,7 @@ pub fn ct_diagnostics(
15151515
let testcases =
15161516
common_test::runnable_names(&sema, file_id, all.clone(), groups.clone()).ok();
15171517
common_test::unreachable_test(&mut res, &sema, file_id, &testcases);
1518-
// @fb-only:
1518+
// @fb-only
15191519
}
15201520
CommonTestInfo::EvalError(_error) => {
15211521
// The error currently does not contain anything useful, so we ignore it

crates/ide/src/diagnostics/application_env.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ use crate::codemod_helpers::find_call_in_function;
2727
use crate::codemod_helpers::CheckCallCtx;
2828
use crate::codemod_helpers::FunctionMatch;
2929
use crate::codemod_helpers::MakeDiagCtx;
30-
// @fb-only:
30+
// @fb-only
3131
use crate::diagnostics::DiagnosticCode;
3232
use crate::diagnostics::Severity;
3333

@@ -106,7 +106,7 @@ fn check_function(diags: &mut Vec<Diagnostic>, sema: &Semantic, def: &FunctionDe
106106
vec![2, 3],
107107
BadEnvCallAction::AppArg(0),
108108
),
109-
// @fb-only:
109+
// @fb-only
110110
]
111111
.into_iter()
112112
.flatten()

crates/ide/src/diagnostics/atoms_exhaustion.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use super::DiagnosticDescriptor;
1818
use crate::codemod_helpers::find_call_in_function;
1919
use crate::codemod_helpers::CheckCallCtx;
2020
use crate::codemod_helpers::MakeDiagCtx;
21-
// @fb-only:
21+
// @fb-only
2222
use crate::diagnostics::Diagnostic;
2323
use crate::diagnostics::DiagnosticCode;
2424
use crate::diagnostics::Severity;
@@ -47,7 +47,7 @@ fn atoms_exhaustion(diagnostics: &mut Vec<Diagnostic>, sema: &Semantic, file_id:
4747
// FunctionMatch::mfa("erlang", "binary_to_term", 2),
4848
]
4949
.into_iter()
50-
// @fb-only:
50+
// @fb-only
5151
.collect();
5252

5353
static ref BAD_CALLS_MFAS: Vec<(&'static FunctionMatch, ())> = BAD_CALLS
@@ -61,7 +61,7 @@ fn atoms_exhaustion(diagnostics: &mut Vec<Diagnostic>, sema: &Semantic, file_id:
6161
.for_each(|(_arity, def)| {
6262
if def.file.file_id == file_id {
6363
let is_relevant;
64-
// @fb-only:
64+
// @fb-only
6565
is_relevant = true; // @oss-only
6666
if is_relevant {
6767
check_function(diagnostics, sema, def, &BAD_CALLS_MFAS);
@@ -88,7 +88,7 @@ fn check_function(
8888
..
8989
}: CheckCallCtx<'_, ()>| {
9090
let is_safe;
91-
// @fb-only:
91+
// @fb-only
9292
is_safe = false; // @oss-only
9393
if !is_safe {
9494
match args.as_vec()[..] {

crates/ide/src/diagnostics/cross_node_eval.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use super::DiagnosticDescriptor;
2222
use crate::codemod_helpers::find_call_in_function;
2323
use crate::codemod_helpers::FunctionMatch;
2424
use crate::codemod_helpers::MakeDiagCtx;
25-
// @fb-only:
25+
// @fb-only
2626
use crate::diagnostics::DiagnosticCode;
2727
use crate::diagnostics::Severity;
2828

@@ -58,7 +58,7 @@ fn check_function(diags: &mut Vec<Diagnostic>, sema: &Semantic, def: &FunctionDe
5858
FunctionMatch::mfas("erlang", "spawn_monitor", vec![2, 4]).into_iter().map(|fm| (fm,None)).collect(),
5959
FunctionMatch::mfas("erlang", "spawn_opt", vec![3, 5]).into_iter().map(|fm| (fm,None)).collect(),
6060
FunctionMatch::mfas("sys", "install", vec![2, 3]).into_iter().map(|fm| (fm,None)).collect(),
61-
// @fb-only:
61+
// @fb-only
6262
]
6363
.into_iter()
6464
.flatten()

crates/ide/src/diagnostics/deprecated_function.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ use super::DiagnosticDescriptor;
4040
use super::Severity;
4141
use crate::codemod_helpers::FunctionMatch;
4242
use crate::codemod_helpers::FunctionMatcher;
43-
// @fb-only:
43+
// @fb-only
4444
use crate::fix;
4545

4646
pub(crate) static DESCRIPTOR: DiagnosticDescriptor = DiagnosticDescriptor {
@@ -87,7 +87,7 @@ fn deprecated_function(diagnostics: &mut Vec<Diagnostic>, sema: &Semantic, file_
8787
lazy_static! {
8888
static ref DEPRECATED_FUNCTIONS: Vec<(FunctionMatch, DeprecationDetails)> = {
8989
let matches: Vec<Vec<(FunctionMatch, DeprecationDetails)>> = vec![
90-
// @fb-only:
90+
// @fb-only
9191
];
9292
matches.into_iter()
9393
.flatten()

crates/ide/src/diagnostics/slow_functions.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ See https://www.erlang.org/doc/man/sets.html
7373
diagnostic_template: DiagnosticTemplate {
7474
code: DiagnosticCode::SlowFunction,
7575
message: format!("The dict module is very slow in Erlang.\nIt is recommend to use maps instead of the dict module.\n\n{}\n",
76-
// @fb-only:
76+
// @fb-only
7777
"" // @oss-only
7878
)
7979
.to_string(),
@@ -120,7 +120,7 @@ mod tests {
120120
)
121121
}
122122

123-
// @fb-only:
123+
// @fb-only
124124
// @oss-only #[allow(dead_code)]
125125
fn slow_function_dict() {
126126
check_diagnostics(

crates/ide/src/doc_links.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use elp_syntax::AstNode;
1414
use hir::InFile;
1515
use hir::Semantic;
1616

17-
// @fb-only:
17+
// @fb-only
1818
mod otp_links;
1919

2020
#[derive(Debug, Clone, PartialEq, Eq)]
@@ -39,7 +39,7 @@ pub(crate) fn external_docs(db: &RootDatabase, position: &FilePosition) -> Optio
3939
.iter()
4040
.for_each(|def| otp_links::links(&mut doc_links, &sema, &def));
4141
}
42-
// @fb-only:
42+
// @fb-only
4343
Some(doc_links)
4444
}
4545

crates/ide/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ pub mod diagnostics;
107107
pub mod diagnostics_collection;
108108
pub mod diff;
109109
mod highlight_related;
110-
// @fb-only:
110+
// @fb-only
111111

112112
pub use annotations::Annotation;
113113
pub use annotations::AnnotationKind;

crates/ide_completion/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ mod helpers;
3434
mod keywords;
3535
mod macros;
3636
mod maps;
37-
// @fb-only:
37+
// @fb-only
3838
mod modules;
3939
mod records;
4040
mod spec;
@@ -164,7 +164,7 @@ pub fn completions(
164164
}
165165
CtxKind::Other => {
166166
let _ = attributes::add_completions(&mut acc, ctx)
167-
// @fb-only:
167+
// @fb-only
168168
|| vars::add_completions(&mut acc, ctx)
169169
|| maps::add_completions(&mut acc, ctx)
170170
|| records::add_completions(&mut acc, ctx);

crates/ide_db/src/diagnostic_code.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ use serde::Deserializer;
1919
use strum::IntoEnumIterator;
2020
use strum_macros::EnumIter;
2121

22-
// @fb-only:
22+
// @fb-only
2323

24-
// @fb-only:
24+
// @fb-only
2525
pub const BASE_URL: &str = "https://whatsapp.github.io/erlang-language-platform/docs"; // @oss-only
2626

2727
#[derive(Clone, Debug, PartialEq, Eq, Hash, EnumIter)]
@@ -72,7 +72,7 @@ pub enum DiagnosticCode {
7272
Eqwalizer(String),
7373
// Used for ad-hoc diagnostics via lints/codemods
7474
AdHoc(String),
75-
// @fb-only:
75+
// @fb-only
7676
}
7777

7878
// These namespaces map the error codes returned by the Erlang Service.
@@ -200,7 +200,7 @@ impl DiagnosticCode {
200200
DiagnosticCode::ErlangService(c) => c.to_string(),
201201
DiagnosticCode::Eqwalizer(c) => format!("eqwalizer: {c}"),
202202
DiagnosticCode::AdHoc(c) => format!("ad-hoc: {c}"),
203-
// @fb-only:
203+
// @fb-only
204204
}
205205
}
206206

@@ -267,7 +267,7 @@ impl DiagnosticCode {
267267
DiagnosticCode::ErlangService(c) => c.to_string(),
268268
DiagnosticCode::Eqwalizer(c) => c.to_string(),
269269
DiagnosticCode::AdHoc(c) => format!("ad-hoc: {c}"),
270-
// @fb-only:
270+
// @fb-only
271271
}
272272
}
273273

@@ -278,7 +278,7 @@ impl DiagnosticCode {
278278
pub fn maybe_from_string(s: &str) -> Option<DiagnosticCode> {
279279
DIAGNOSTIC_CODE_LOOKUPS
280280
.get(s).cloned()
281-
// @fb-only:
281+
// @fb-only
282282
.or_else( ||
283283
// Look for ErlangService and AdHoc
284284
if let Some(code) = Self::is_adhoc(s) {
@@ -295,7 +295,7 @@ impl DiagnosticCode {
295295
match self {
296296
DiagnosticCode::DefaultCodeForEnumIter => None,
297297
DiagnosticCode::AdHoc(_) => None,
298-
// @fb-only:
298+
// @fb-only
299299
DiagnosticCode::ErlangService(code) => Namespace::from_str(code).ok(),
300300
_ => Namespace::from_str(&self.as_code()).ok(),
301301
}
@@ -393,7 +393,7 @@ impl DiagnosticCode {
393393
DiagnosticCode::ErlangService(_) => false,
394394
DiagnosticCode::Eqwalizer(_) => false,
395395
DiagnosticCode::AdHoc(_) => false,
396-
// @fb-only:
396+
// @fb-only
397397
}
398398
}
399399
}

crates/ide_db/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub mod docs;
5656
pub mod eqwalizer;
5757
mod erl_ast;
5858
mod line_index;
59-
// @fb-only:
59+
// @fb-only
6060
pub mod metadata;
6161
mod search;
6262

crates/project_model/src/buck.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1456,7 +1456,7 @@ mod tests {
14561456
}
14571457

14581458
// TODO: enable when buck is properly set up on github project
1459-
// @fb-only:
1459+
// @fb-only
14601460
const BUCK_TESTS_ENABLED: bool = false; // @oss-only
14611461

14621462
fn get_prelude_cell(buck_config: &BuckConfig) -> Result<String> {

0 commit comments

Comments
 (0)