language stringlengths 0 24 | filename stringlengths 9 214 | code stringlengths 99 9.93M |
|---|---|---|
TOML | hhvm/hphp/hack/src/utils/rust/relative_path/Cargo.toml | # @generated by autocargo
[package]
name = "relative_path"
version = "0.0.0"
edition = "2021"
[lib]
path = "../relative_path.rs"
[dependencies]
arena_trait = { version = "0.0.0", path = "../../../arena_trait" }
eq_modulo_pos = { version = "0.0.0", path = "../../eq_modulo_pos" }
no_pos_hash = { version = "0.0.0", pat... |
TOML | hhvm/hphp/hack/src/utils/rust/relative_path_utils/Cargo.toml | # @generated by autocargo
[package]
name = "relative_path_utils"
version = "0.0.0"
edition = "2021"
[lib]
path = "../relative_path_utils.rs"
[dependencies]
anyhow = "1.0.71"
relative_path = { version = "0.0.0", path = "../relative_path" }
[dev-dependencies]
tempfile = "3.5" |
TOML | hhvm/hphp/hack/src/utils/rust/signed_source/Cargo.toml | # @generated by autocargo
[package]
name = "signed_source"
version = "0.0.0"
edition = "2021"
[lib]
path = "../signed_source.rs"
[dependencies]
bstr = { version = "1.4.0", features = ["serde", "std", "unicode"] }
hex = "0.4.3"
md-5 = "0.10"
once_cell = "1.12"
regex = "1.9.2"
thiserror = "1.0.43" |
OCaml | hhvm/hphp/hack/src/utils/sqlite/sqlite_utils.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Core
(* Check a sqlite result, and crash if it is invalid *)
let check_rc (db : Sqlite3.db) (rc : Sqlite3.Rc.t)... |
TOML | hhvm/hphp/hack/src/utils/stack_limit/Cargo.toml | # @generated by autocargo
[package]
name = "stack_limit"
version = "0.0.0"
edition = "2021"
[lib]
path = "lib.rs"
[dependencies]
psm = "0.1.17"
stacker = "0.1.14" |
Rust | hhvm/hphp/hack/src/utils/stack_limit/lib.rs | // Copyright (c) 2019, Facebook, Inc.
// All rights reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
/// Use a large enough redzone value to avoid stack overflow between
/// calls to stack_limit::maybe_grow(). This can be adjus... |
hhvm/hphp/hack/src/utils/state_loader/dune | (* -*- tuareg -*- *)
let library_entry name suffix =
Printf.sprintf
"(library
(name %s)
(wrapped false)
(modules)
(libraries %s_%s))" name name suffix
let fb_entry name =
library_entry name "fb"
let stubs_entry name =
library_entry name "stubs"
let entry is_fb name =
if is_fb then
fb_entry name
... | |
OCaml | hhvm/hphp/hack/src/utils/string/string_utils.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
exception Incorrect_format
let string_before s n = String.sub s 0 n
let string_after s n = String.sub s n (String.... |
OCaml Interface | hhvm/hphp/hack/src/utils/string/string_utils.mli | (*
* Copyright (c) 2019, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(* This `.mli` file was generated automatically. It may include extra
definitions that should not actually be exp... |
OCaml | hhvm/hphp/hack/src/utils/sys/daemon.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
external disable_ASLR : string array -> unit = "caml_disable_ASLR"
module Option = Base.Option
type 'a in_channel ... |
OCaml Interface | hhvm/hphp/hack/src/utils/sys/daemon.mli | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(** Type-safe version of the in channel in Stdlib. *)
type 'a in_channel
(** Type-safe version of the out channel i... |
C | hhvm/hphp/hack/src/utils/sys/daemon_stubs.c | /* Copyright (c) 2021, Meta Inc. All rights reserved. */
#include <caml/mlvalues.h>
#include <caml/memory.h>
#if defined(__linux__)
# include <sys/personality.h>
# include <unistd.h>
#endif
/* Programs using the Daemon module tend to rely heavily on the
ability to pass closures to the instances of themselves th... |
hhvm/hphp/hack/src/utils/sys/dune | (library
(name sys_utils)
(wrapped false)
(flags
(:standard -safe-string))
(libraries collections disk exec_command memtrace str unix utils_core)
(foreign_stubs
(language c)
(names
daemon_stubs
files
gc_profiling
getrusage
handle_stubs
priorities
processor_info
realpath
sysinfo))
... | |
C | hhvm/hphp/hack/src/utils/sys/files.c | /**
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*/
#define CAML_NAME_SPACE
#include <caml/fail.h>
#include <caml/memory.h>
#include <caml/unixsupport.h>
#include <st... |
OCaml | hhvm/hphp/hack/src/utils/sys/fork.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
(* Forking duplicates data in all buffers, so we flush them beforehand to avoid
* writing the same... |
C | hhvm/hphp/hack/src/utils/sys/gc_profiling.c | /**
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the "hack" directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*/
#define CAML_... |
C | hhvm/hphp/hack/src/utils/sys/getrusage.c | /**
* Copyright (c) 2018, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*/
#include <caml/alloc.h>
#include <caml/memory.h>
#ifdef _WIN32
#include <caml/fail.h>
#include <windows.h>
value h... |
OCaml | hhvm/hphp/hack/src/utils/sys/handle.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(* On Win32, unwrap the handle from the 'abstract block' representing
the file descriptor otherwise it can't be m... |
C | hhvm/hphp/hack/src/utils/sys/handle_stubs.c | /**
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*/
#define CAML_NAME_SPACE
#include <caml/mlvalues.h>
#include <caml/unixsupport.h>
#include <caml/intext.h>
#include ... |
OCaml | hhvm/hphp/hack/src/utils/sys/lock.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
let lock_fds = ref SMap.empty
(**
* Basic lock operations.
*
* We use these for two reasons:
* 1. making sure w... |
OCaml Interface | hhvm/hphp/hack/src/utils/sys/lock.mli | (*
* Copyright (c) 2017, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
val grab : string -> bool
val release : string -> bool
val blocking_grab_then_release : string -> unit
val fd_of ... |
OCaml | hhvm/hphp/hack/src/utils/sys/path.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
open Reordered_argument_collections
include Stdlib.Sys
module S = struct
type t = string [@@deriv... |
OCaml Interface | hhvm/hphp/hack/src/utils/sys/path.mli | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Reordered_argument_collections
module S : sig
type t = private string [@@deriving show]
val equal : t -> ... |
OCaml | hhvm/hphp/hack/src/utils/sys/pidLog.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Core
module Unix = Caml_unix
let log_oc = ref None
let enabled = ref true
let disable () = enabled := false
... |
OCaml | hhvm/hphp/hack/src/utils/sys/printSignal.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
let string_of_signal n =
match n with
| _ when n = Sys.sigabrt -> "sigabrt"
| _ when n = Sys.sigalrm -> "sigal... |
C | hhvm/hphp/hack/src/utils/sys/priorities.c | /**
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*/
#define CAML_NAME_SPACE
#include <caml/mlvalues.h>
#include <caml/unixsupport.h>
#include <caml/memory.h>
#include ... |
OCaml | hhvm/hphp/hack/src/utils/sys/proc.ml | (*
* Copyright (c) 2018, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
type proc_stat = {
cmdline: string;
ppid: int;
}
let cmdline_delimiter_re = Str.regexp "\x00"
... |
C | hhvm/hphp/hack/src/utils/sys/processor_info.c | /**
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*/
#define CAML_NAME_SPACE
#include <caml/alloc.h>
#include <caml/fail.h>
#include <caml/memory.h>
#include <stdio.h>
... |
C | hhvm/hphp/hack/src/utils/sys/realpath.c | /**
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*/
#define CAML_NAME_SPACE
#include <caml/mlvalues.h>
#include <caml/memory.h>
#include <caml/alloc.h>
#include <limit... |
C | hhvm/hphp/hack/src/utils/sys/sysinfo.c | /**
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*/
#define CAML_NAME_SPACE
#include <caml/alloc.h>
#include <caml/fail.h>
#include <caml/memory.h>
#include <caml/mlva... |
OCaml | hhvm/hphp/hack/src/utils/sys/sys_utils.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
module Printexc = Stdlib.Printexc
external realpath : string -> string option = "hh_realpath"
exte... |
OCaml Interface | hhvm/hphp/hack/src/utils/sys/sys_utils.mli | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
external realpath : string -> string option = "hh_realpath"
external is_nfs : string -> bool = "hh_is_nfs"
external is_apple... |
OCaml | hhvm/hphp/hack/src/utils/sys/timeout.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Core
module Unix = Caml_unix
type timings = {
start_time: float;
deadline_time: float; (** caller-supplie... |
OCaml Interface | hhvm/hphp/hack/src/utils/sys/timeout.mli | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(** Helpers for handling timeout, in particular input timeout. *)
type timings = {
start_time: float;
deadline_... |
OCaml | hhvm/hphp/hack/src/utils/sys/timer.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(* Warning: This is the ONLY code that should be using sigalrm. Any code using it should use Timer
* instead.
*
*... |
OCaml Interface | hhvm/hphp/hack/src/utils/sys/timer.mli | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(* Warning: This is the ONLY code that should be using sigalrm. Any code using it should use Timer
* instead.
*
*... |
OCaml | hhvm/hphp/hack/src/utils/sys/tmp.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(*****************************************************************************)
(* Handling where our temporary file... |
OCaml Interface | hhvm/hphp/hack/src/utils/sys/tmp.mli | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(** [temp_dir parent_dir prefix ] creates a new temporary directory under parent_dir.
The name of that directory is made of... |
OCaml | hhvm/hphp/hack/src/utils/sys/tty.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
type raw_color =
| Default
| Black
| Red
| Green
| Yellow
| Blue
| Magenta
| Cyan
... |
OCaml Interface | hhvm/hphp/hack/src/utils/sys/tty.mli | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
* *)
type raw_color =
| Default
| Black
| Red
| Green
| Yellow
| Blue
| Magenta
| Cyan
| White
type ... |
TOML | hhvm/hphp/hack/src/utils/test/Cargo.toml | # @generated by autocargo
[package]
name = "line_break_map_tests"
version = "0.0.0"
edition = "2021"
[lib]
path = "line_break_map_tests.rs"
test = false
doctest = false
[dependencies]
line_break_map = { version = "0.0.0", path = "../line_break_map" }
ocamlrep_ocamlpool = { version = "0.1.0", git = "https://github.co... |
OCaml | hhvm/hphp/hack/src/utils/test/ffi_runner.ml | (*
* Copyright (c) 2016, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
external offset_to_file_pos_triple : string -> int -> int * int * int
= "offset_to_file_pos_triple"
external offs... |
Rust | hhvm/hphp/hack/src/utils/test/line_break_map_tests.rs | // Copyright (c) 2019, Facebook, Inc.
// All rights reserved.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use line_break_map::LineBreakMap;
use ocamlrep_ocamlpool::ocaml_ffi;
ocaml_ffi! {
fn offset_to_file_pos_triple(string: St... |
Rust | hhvm/hphp/hack/src/utils/test/macro_test_util.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use std::fmt::Display;
use proc_macro2::TokenStream;
use proc_macro2::TokenTree;
fn mismatch(ta: Option<TokenTree>, tb: Option<TokenTr... |
TOML | hhvm/hphp/hack/src/utils/test/arena_deserializer/Cargo.toml | # @generated by autocargo
[package]
name = "arena_deserializer_tests"
version = "0.0.0"
edition = "2021"
[lib]
path = "lib.rs"
[dev-dependencies]
arena_deserializer = { version = "0.0.0", path = "../../arena_deserializer" }
bincode = "1.3.3"
bstr = { version = "1.4.0", features = ["serde", "std", "unicode"] }
bumpal... |
Rust | hhvm/hphp/hack/src/utils/test/arena_deserializer/lib.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
#![cfg(test)]
use arena_deserializer::*;
use bumpalo::Bump;
use serde::Deserialize;
use serde::Serialize;
fn round_trip<'a, X: Deseria... |
TOML | hhvm/hphp/hack/src/utils/test/macro_test_util/Cargo.toml | # @generated by autocargo
[package]
name = "macro_test_util"
version = "0.0.0"
edition = "2021"
[lib]
path = "../macro_test_util.rs"
[dependencies]
proc-macro2 = { version = "1.0.64", features = ["span-locations"] } |
TOML | hhvm/hphp/hack/src/utils/unwrap_ocaml/Cargo.toml | # @generated by autocargo
[package]
name = "unwrap_ocaml"
version = "0.0.0"
edition = "2021"
[lib]
path = "../unwrap_ocaml.rs"
test = false
doctest = false
[dependencies]
libc = "0.2.139" |
OCaml | hhvm/hphp/hack/src/utils/username/sys_username.ml | (** When sudo is used to execute a process, effective user ID is root,
* but user id will still be the original user. *)
let get_real_user_name () =
let uid = Unix.getuid () in
if uid = 1 then
None
else
let pwd_entry = Unix.getpwuid uid in
Some pwd_entry.Unix.pw_name
let get_logged_in_username () =
... |
OCaml Interface | hhvm/hphp/hack/src/utils/username/sys_username.mli | (*
* Tries to get the logged in username via various ways, consecutively
* as each one fails.
*)
val get_logged_in_username : unit -> string option |
OCaml | hhvm/hphp/hack/src/utils/username/sys_username_runner.ml | let () =
match Sys_username.get_logged_in_username () with
| Some name -> Printf.printf "%s\n" name
| None -> failwith "Can't get logged in username" |
Rust | hhvm/hphp/hack/src/utils/write_bytes/arguments.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use std::io::Result;
use std::io::Write;
use crate::BytesFormatter;
use crate::DisplayBytes;
use crate::FmtSpec;
pub fn write_bytes_fm... |
Rust | hhvm/hphp/hack/src/utils/write_bytes/bytes_formatter.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use std::io::Result;
use std::io::Write;
// Once we support fmtspec this is where the parameters (like width) will live.
pub struct Fmt... |
Rust | hhvm/hphp/hack/src/utils/write_bytes/display_bytes.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use std::io::Result;
use std::io::Write;
use bstr::BStr;
use bstr::BString;
use crate::BytesFormatter;
pub trait DisplayBytes {
f... |
Rust | hhvm/hphp/hack/src/utils/write_bytes/lib.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
pub mod arguments;
pub mod bytes_formatter;
pub mod display_bytes;
#[cfg(test)]
mod test;
#[cfg(test)]
extern crate self as write_byte... |
Rust | hhvm/hphp/hack/src/utils/write_bytes/test.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the "hack" directory of this source tree.
use std::borrow::Cow;
use crate::format_bytes;
use crate::write_bytes;
type Result = std::io::Result<()>;
#[test]
fn test_basic() -> ... |
Rust | hhvm/hphp/hack/src/utils/write_bytes/write_bytes-macro.rs | // Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
use std::borrow::Cow;
use std::collections::HashMap;
use std::collections::HashSet;
use proc_macro2::Literal;
use proc_macro2::Span;
use proc_macro2::TokenStream;
use quote::quote;
use syn::parse::Parser;
use syn::punctuated::Punctuated;
use syn... |
TOML | hhvm/hphp/hack/src/utils/write_bytes/write_bytes/Cargo.toml | # @generated by autocargo
[package]
name = "write_bytes"
version = "0.0.0"
edition = "2021"
[lib]
path = "../lib.rs"
[dependencies]
bstr = { version = "1.4.0", features = ["serde", "std", "unicode"] }
write_bytes-macro = { version = "0.0.0", path = "../write_bytes-macro" } |
TOML | hhvm/hphp/hack/src/utils/write_bytes/write_bytes-macro/Cargo.toml | # @generated by autocargo
[package]
name = "write_bytes-macro"
version = "0.0.0"
edition = "2021"
[lib]
path = "../write_bytes-macro.rs"
test = false
doctest = false
proc-macro = true
[dependencies]
proc-macro2 = { version = "1.0.64", features = ["span-locations"] }
quote = "1.0.29"
syn = { version = "1.0.109", feat... |
OCaml | hhvm/hphp/hack/src/version/hh_version.ml | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(* Monotonically increasing identifier that can be used when we introduce
* backward incompatible changes in hh_client comman... |
OCaml | hhvm/hphp/hack/src/version/build_banner/build_banner.ml | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
external get_build_banner : unit -> string option = "hh_get_build_banner"
let banner = get_build_banner () |
OCaml Interface | hhvm/hphp/hack/src/version/build_banner/build_banner.mli | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
val banner : string option |
C | hhvm/hphp/hack/src/version/build_banner/build_banner_stubs.c | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*/
#define CAML_NAME_SPACE
#include <caml/alloc.h>
#include <caml/memory.h>
#include <caml/mlvalues.h>
#include <string.h>
#if... |
hhvm/hphp/hack/src/version/build_banner/dune | (library
(name build_banner)
(wrapped false)
(foreign_stubs
(language c)
(names build_banner_stubs)
(flags
(:standard
-I%{env:CMAKE_SOURCE_DIR=xxx}
(:include build-id-opt)))))
(rule
(targets build-id build-id.c)
(deps (universe))
(action
(progn
(write-file
generate-build-id.sh
"INST... | |
OCaml | hhvm/hphp/hack/src/version/compiler_id/compiler_id.ml | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
external get_compiler_id : unit -> string = "hh_get_compiler_id" |
OCaml Interface | hhvm/hphp/hack/src/version/compiler_id/compiler_id.mli | (*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
external get_compiler_id : unit -> string = "hh_get_compiler_id" |
C | hhvm/hphp/hack/src/version/compiler_id/compiler_id_impl.c | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*/
#define CAML_NAME_SPACE
#include <caml/memory.h>
#include <caml/alloc.h>
#include <string.h>
extern const char* const build_i... |
hhvm/hphp/hack/src/version/compiler_id/dune | (copy_files ../build_banner/build-id.c)
(library
(name compiler_id)
(wrapped false)
(modules compiler_id)
(foreign_stubs
(language c)
(names compiler_id_impl build-id)
(flags
(:standard -I%{env:CMAKE_SOURCE_DIR=xxx})))) | |
hhvm/hphp/hack/src/watchman/dune | (library
(name watchman)
(wrapped false)
(modules watchman watchman_sig)
(libraries
buffered_line_reader
core_kernel
hh_json
logging_common
sys_utils
utils_core)
(preprocess
(pps lwt_ppx ppx_deriving.std)))
(library
(name watchman_utils)
(wrapped false)
(modules watchman_utils)
(libraries hh_jso... | |
OCaml | hhvm/hphp/hack/src/watchman/watchman.ml | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
* *)
open Hh_prelude
open Utils
(*
* Module for us to interface with Watchman, a file watching service.
* https://fa... |
OCaml Interface | hhvm/hphp/hack/src/watchman/watchman.mli | (*
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
module Watchman_process_helpers : sig
module J = Hh_json_helpers.AdhocJsonHelpers
val debug : bool
val timeo... |
OCaml | hhvm/hphp/hack/src/watchman/watchman_sig.ml | (*
* Copyright (c) 2016, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
module Types = struct
exception Timeout
exception Watchman_error of string
exception Subscription_canceled_b... |
OCaml | hhvm/hphp/hack/src/watchman/watchman_utils.ml | (** State_enter and State_leave events contains a JSON blob specifying
* the revision we are moving to. This gets it. *)
let rev_in_state_change json =
Hh_json.Access.(
return json >>= get_string "rev" |> function
| Error _ ->
let () =
Hh_logger.log
"Watchman_utils failed to get rev i... |
hhvm/hphp/hack/src/watchman_event_watcher/dune | (library
(name watchman_config)
(wrapped false)
(modules watchmanEventWatcherConfig)
(libraries injector_config server_utils))
(library
(name watchman_lib)
(wrapped false)
(modules watchmanEventWatcher)
(libraries socket watchman_config watchman_utils))
(executable
(name watcher_bin)
(modules watcher_bin)
... | |
YAML | hhvm/hphp/hack/src/watchman_event_watcher/packman.yml | packages:
fb-hh-watchman-event-watcher:
packager: hack
build_architectures: [x86_64, aarch64]
summary: Watches a repo for Watchman state change events. Reports to clients the state of the repo
rules:
buck:hphp/hack/src/watchman_event_watcher:watcher_bin:
# Packman looks for the targets i... |
OCaml | hhvm/hphp/hack/src/watchman_event_watcher/watcher_bin.ml | module WEW = WatchmanEventWatcher
module Config = WatchmanEventWatcherConfig
let () = Random.self_init ()
module Args = struct
type t = {
root: Path.t;
daemonize: bool;
get_sockname: bool;
}
let usage =
Printf.sprintf "Usage: %s [--daemonize] [REPO DIRECTORY]\n" Sys.argv.(0)
let parse () =
... |
OCaml | hhvm/hphp/hack/src/watchman_event_watcher/watchmanEventWatcher.ml | (*
* Copyright (c) 2016, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(***************************************************
("Who watches the Watchmen?")
******************... |
OCaml | hhvm/hphp/hack/src/watchman_event_watcher/watchmanEventWatcherClient.ml | (*
* Copyright (c) 2017, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(**
* A client to get the repo state from an already-running
* server watching a repo.
*
* See .mli file for det... |
OCaml | hhvm/hphp/hack/src/watchman_event_watcher/watchmanEventWatcherClient_sig.ml | (*
* Copyright (c) 2017, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
(**
* A client to get the repo state from an already-running
* server watching a repo.
*
* Since the server send... |
OCaml | hhvm/hphp/hack/src/watchman_event_watcher/watchmanEventWatcherConfig.ml | let lock root = ServerFiles.path_of_root root "watchman_event_watcher_lock"
let log_link root = ServerFiles.path_of_root root "watchman_event_watcher_log"
let socket_file root =
ServerFiles.path_of_root root "watchman_event_watcher_sock"
module Responses = struct
let unknown_str = "unknown"
let mid_update_str... |
hhvm/hphp/hack/test/.gitignore | *.diff
*.format_out
*.out
*.decl_out
*.direct_decl_out
*.reparse_out
*.tast_typecheck_out
*.type_check_out
*.php.pess
hhi/pessimised_hhi
*.hhvm_out
*.round_trip.hhas
*.hhcodegen_messages
*.hhcodegen_output.hhas
*.semdiff
*.semdiff_messages
*.hhcodegen_config.json
*.debug_out
*.type_check_raised_out
oUnit-*.cache | |
hhvm/hphp/hack/test/dune | (env
(_
(flags
(:standard -w @a-3-4-29-32-34-35-37-41-42-44-45-48-50-60-70 \ -strict-sequence)))) | |
Python | hhvm/hphp/hack/test/parse_errors.py | #!/usr/bin/env python3
# pyre-strict
import re
from dataclasses import dataclass
from typing import IO, List, Tuple
@dataclass
class ErrorCode:
type: str
code: int
@dataclass
class Position:
fileName: str
line: int
startColumn: int
endColumn: int
@dataclass
class PositionedMessage:
po... |
Python | hhvm/hphp/hack/test/pessimise_and_single_type_check.py | #!/usr/bin/env python3
# pyre-strict
import os
import shutil
import subprocess
import sys
from typing import List
def arg_extract(args: List[str], arg: str) -> str:
index = args.index(arg)
value = args.pop(index + 1)
del args[index]
return value
if __name__ == "__main__":
# Parsing the argument... |
Python | hhvm/hphp/hack/test/pessimise_targeted_and_single_type_check.py | #!/usr/bin/env python3
# pyre-strict
import io
import os
import subprocess
import sys
from typing import List
def arg_extract(args: List[str], arg: str) -> str:
index = args.index(arg)
value = args.pop(index + 1)
del args[index]
return value
if __name__ == "__main__":
# Parsing the arguments is... |
Shell Script | hhvm/hphp/hack/test/review.sh | #! /usr/bin/env bash
# Usage: First do 'make -C ../src test' to generate the .out files. If there are
# failures, their test filenames will be printed to stdout. Pass these as
# arguments to this script.
# note: we don't use [ -z $FOO ] to check if FOO is unset because that is also
# true if FOO=""
if [ -z "${OUT_EXT... |
Python | hhvm/hphp/hack/test/verify.py | #!/usr/bin/env python3
# pyre-strict
import argparse
import difflib
import os
import os.path
import re
import shlex
import subprocess
import sys
from concurrent.futures import ThreadPoolExecutor
from dataclasses import dataclass
from enum import Enum
from typing import Callable, Dict, List, Optional, Tuple
from hphp.... |
PHP | hhvm/hphp/hack/test/autocomplete/case.php | <?hh
// Namespace is important: we need to check that there's no user-supplied
// prefix, not just that there is no prefix at all, and AUTO332 expands to
// Foo\AUTO322
namespace Foo;
function main(): void {
switch(\random_int(123, 456)) {
case 123:AUTO332 // this should not invoke autocomplete
}
} |
PHP | hhvm/hphp/hack/test/autocomplete/case_with_ns.php | <?hh
// Namespace is important: we need to check that there's no user-supplied
// prefix, not just that there is no prefix at all, and AUTO332 expands to
// Foo\AUTO322
namespace Foo;
class ABC {}
function main(): void {
switch(\random_int(123, 456)) {
case 123:namespace\AUTO332
}
} |
PHP | hhvm/hphp/hack/test/autocomplete/case_with_prefix.php | <?hh
// Namespace is important: we need to check that there's no user-supplied
// prefix, not just that there is no prefix at all, and AUTO332 expands to
// Foo\AUTO322
namespace Foo;
class ABC {}
function main(): void {
switch(\random_int(123, 456)) {
case 123:AAUTO332
}
} |
PHP | hhvm/hphp/hack/test/autocomplete/chained_methods0.php | <?hh
enum class E : int {
int AAAA = 42;
int BBBB = 0;
}
class C {
const type T = this;
public function f(): this {
return $this;
}
public function g(HH\EnumClass\Label<E, int> $x): void {}
}
function main(): void {
$c = new C();
$c->f()->g(#AUTO332 // g has type dynamic | supportdyn<Tfun ...> |
PHP | hhvm/hphp/hack/test/autocomplete/dict_keys_str.php | <?hh
function foo(): string {
}
function bar(dict<string, string> $in): string {
return $in['AUTO332];
} |
hhvm/hphp/hack/test/autocomplete/dune | (rule
(alias autocomplete)
(deps
%{exe:../../src/hh_single_complete.exe}
%{project_root}/hack/test/verify.py
%{project_root}/hack/test/review.sh
(glob_files %{project_root}/hack/test/autocomplete/HH_FLAGS)
(glob_files %{project_root}/hack/test/autocomplete/*.php)
(glob_files %{project_root}/hack/test/auto... | |
PHP | hhvm/hphp/hack/test/autocomplete/enum_fun_arg.php | <?hh
enum MyEnum: string {
TYPE_A = "A value";
TYPE_B = "B value";
TYPE_C = "C value";
}
function takes_enum(MyEnum $_): void {}
function demo(): void {
takes_enum(AUTO332);
} |
PHP | hhvm/hphp/hack/test/autocomplete/enum_in_case.php | <?hh
enum MyEnum: string {
TYPE_A = "A value";
TYPE_B = "B value";
TYPE_C = "C value";
}
function takes_enum(MyEnum $me): void {
switch ($me) {
case AUTO332
}
} |
PHP | hhvm/hphp/hack/test/autocomplete/enum_in_case_included.php | <?hh
enum MyEnumParent: string {
TYPE_A = "A value";
TYPE_B = "B value";
}
enum MyEnum: string {
use MyEnumParent;
TYPE_C = "C value";
TYPE_D = "D value";
}
function takes_enum(MyEnum $me): void {
switch ($me) {
case AUTO332
}
} |
PHP | hhvm/hphp/hack/test/autocomplete/enum_in_second_case.php | <?hh
enum MyEnum: string {
TYPE_A = "A value";
TYPE_B = "B value";
TYPE_C = "C value";
}
function takes_enum(MyEnum $me): void {
switch ($me) {
case MyEnum::TYPE_A:
break;
// We should only offer B and C in the completion.
case AUTO332
}
} |
PHP | hhvm/hphp/hack/test/autocomplete/enum_value_fun_arg.php | <?hh
enum MyEnum: string {
TYPE_A = "A value";
TYPE_B = "B value";
TYPE_C = "C value";
}
function takes_enum(MyEnum $_): void {}
function demo(): void {
// We should only offer concrete values here, not e.g. MyEnum::getValues().
takes_enum(MyEnum::AUTO332);
} |
PHP | hhvm/hphp/hack/test/autocomplete/force_contra_tvars.php | <?hh
enum class E : mixed {
int X = 42;
string A = 'zuck';
}
function f<T as int>(HH\EnumClass\Label<E, T> $label) : void {
}
function main(): void {
f(#AUTO332 // During type checking: Label<E, Tvar(0)> knowing that Tvar(0) <: int
// During auto-completion: Label<E, Tvar(0)>, no constraints on T... |
PHP | hhvm/hphp/hack/test/autocomplete/generic_fun_enum_arg.php | <?hh
enum MyEnum: string {
TYPE_A = "A value";
TYPE_B = "B value";
TYPE_C = "C value";
}
function takes_vec(Vector<MyEnum> $_): void {}
// Invariant, so we solve to Vector<MyEnum> at the call site.
function creates_vec<T>(T $x): Vector<T> { return Vector {$x}; }
function foo(): void {
takes_vec(creates_vec(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.