From 78e7a8814b163b6a90d0c4a6b8dd62f6ae20e622 Mon Sep 17 00:00:00 2001 From: Viktor Kleen Date: Mon, 26 Jun 2023 16:58:40 +0000 Subject: [PATCH] Rename and move workspace crates (#1399) * Rename and move workspace crates nickel-lang -> nickel-lang-cli in cli/ nickel-lang-lib -> nickel-lang-core in core/ nickel-lang-utilities -> nickel-lang-utils in utils/ nickel-repl -> nickel-repl in wasm-repl/ * Finish renaming in rust sources * Update RELEASING.md * Move to workspace dependencies * Rename nickel-repl -> nickel-wasm-repl * Update RELEASING.md Co-authored-by: Taeer Bar-Yam * Address suggestions from code review * Update HACKING.md Co-authored-by: Yann Hamdaoui * Elaborate on the versioning scheme in RELEASING.md --------- Co-authored-by: Taeer Bar-Yam Co-authored-by: Yann Hamdaoui --- Cargo.lock | 131 ++++-------------- Cargo.toml | 71 +++++++++- HACKING.md | 40 +++--- README.md | 2 +- RELEASING.md | 58 +++++--- cli/Cargo.toml | 32 +++++ {nickel-lang-cli => cli}/bin/nickel.rs | 14 +- .../tests/snapshot/README.md | 0 .../tests/snapshot/inputs/docs/function.ncl | 0 .../tests/snapshot/inputs/docs/record.ncl | 0 .../tests/snapshot/inputs/docs/types.ncl | 0 ...nnotated_record_pattern_typecheck_fail.ncl | 0 .../inputs/errors/array_at_empty_array.ncl | 0 .../inputs/errors/array_at_out_of_bound.ncl | 0 .../inputs/errors/array_contract_fail.ncl | 0 .../inputs/errors/array_merge_fail.ncl | 0 .../errors/array_range_reversed_indices.ncl | 0 .../errors/array_range_step_negative_step.ncl | 0 .../blame_custom_message_ansi_escaping.ncl | 0 .../errors/caller_contract_violation.ncl | 0 .../contract_with_custom_diagnostic.ncl | 0 .../errors/dictionary_contract_fail.ncl | 0 .../enum_forall_parametricity_violation.ncl | 0 .../errors/fun_contract_range_nested.ncl | 0 .../errors/fun_contract_range_violation.ncl | 0 .../function_contract_domain_violation.ncl | 0 .../errors/function_contract_violation.ncl | 0 .../errors/interpolate_record_type_field.ncl | 0 .../inputs/errors/invalid_record_type.ncl | 0 .../mismatched_row_record_pattern_fail.ncl | 0 ...nnotated_record_pattern_typecheck_fail.ncl | 0 .../inputs/errors/query_non_record.ncl | 0 .../snapshot/inputs/errors/record_access.ncl | 0 .../record_destructuring_duplicate_ident.ncl | 0 .../record_forall_constraints_contract.ncl | 0 .../record_forall_constraints_typecheck.ncl | 0 .../record_forall_parametricity_violation.ncl | 0 .../errors/record_type_repeated_field.ncl | 0 .../inputs/errors/simple_contract_fail.ncl | 0 .../subcontract_nested_custom_diagnostics.ncl | 0 .../subcontract_type_path_underline.ncl | 0 .../inputs/errors/trace_not_saturated.ncl | 0 .../errors/typed_field_without_annotation.ncl | 0 .../errors/unification_variable_aliasing.ncl | 0 .../errors/value_contract_violation.ncl | 0 .../tests/snapshot/inputs/eval/escaping.ncl | 0 .../tests/snapshot/inputs/eval/records.ncl | 0 .../snapshot/inputs/export/nested_record.ncl | 0 .../inputs/export/not_exported_undefined.ncl | 0 .../tests/snapshot/inputs/export/trace.ncl | 0 .../snapshot/inputs/pretty/multiline_doc.ncl | 0 .../snapshot/inputs/pretty/simple_record.ncl | 0 .../tests/snapshot/main.rs | 4 +- .../snapshot__doc_stderr_function.ncl.snap | 0 .../snapshot__doc_stdout_record.ncl.snap | 0 .../snapshot__doc_stdout_types.ncl.snap | 0 ...ted_record_pattern_typecheck_fail.ncl.snap | 0 ...error_stderr_array_at_empty_array.ncl.snap | 0 ...rror_stderr_array_at_out_of_bound.ncl.snap | 0 ..._error_stderr_array_contract_fail.ncl.snap | 0 ...ot__error_stderr_array_merge_fail.ncl.snap | 0 ...derr_array_range_reversed_indices.ncl.snap | 0 ...rr_array_range_step_negative_step.ncl.snap | 0 ...lame_custom_message_ansi_escaping.ncl.snap | 0 ..._stderr_caller_contract_violation.ncl.snap | 0 ...r_contract_with_custom_diagnostic.ncl.snap | 0 ...r_stderr_dictionary_contract_fail.ncl.snap | 0 ...um_forall_parametricity_violation.ncl.snap | 0 ..._stderr_fun_contract_range_nested.ncl.snap | 0 ...derr_fun_contract_range_violation.ncl.snap | 0 ...unction_contract_domain_violation.ncl.snap | 0 ...tderr_function_contract_violation.ncl.snap | 0 ...err_interpolate_record_type_field.ncl.snap | 0 ..._error_stderr_invalid_record_type.ncl.snap | 0 ...ismatched_row_record_pattern_fail.ncl.snap | 0 ...ted_record_pattern_typecheck_fail.ncl.snap | 0 ...pshot__error_stderr_record_access.ncl.snap | 0 ...ord_destructuring_duplicate_ident.ncl.snap | 0 ...ecord_forall_constraints_contract.ncl.snap | 0 ...cord_forall_constraints_typecheck.ncl.snap | 0 ...rd_forall_parametricity_violation.ncl.snap | 0 ...stderr_record_type_repeated_field.ncl.snap | 0 ...error_stderr_simple_contract_fail.ncl.snap | 0 ...ontract_nested_custom_diagnostics.ncl.snap | 0 ...r_subcontract_type_path_underline.ncl.snap | 0 ..._error_stderr_trace_not_saturated.ncl.snap | 0 ...rr_typed_field_without_annotation.ncl.snap | 0 ...err_unification_variable_aliasing.ncl.snap | 0 ...r_stderr_value_contract_violation.ncl.snap | 0 .../snapshot__error_stdout_escaping.ncl.snap | 0 .../snapshot__error_stdout_records.ncl.snap | 0 .../snapshot__export_stderr_trace.ncl.snap | 0 ...shot__export_stdout_nested_record.ncl.snap | 0 ...ort_stdout_not_exported_undefined.ncl.snap | 0 .../snapshot__export_stdout_trace.ncl.snap | 0 ...__pprint-ast_stdout_multiline_doc.ncl.snap | 0 ...__pprint-ast_stdout_simple_record.ncl.snap | 0 ...ot__query_stderr_query_non_record.ncl.snap | 0 core/Cargo.toml | 108 +++++++++++++++ {nickel-lang-lib => core}/benches/arrays.rs | 4 +- .../benches/arrays/fold.ncl | 0 .../benches/arrays/generate.ncl | 0 .../benches/arrays/map.ncl | 0 .../benches/arrays/pipe.ncl | 0 .../benches/arrays/primes.ncl | 0 .../benches/arrays/random.ncl | 0 .../benches/arrays/sort.ncl | 0 .../benches/arrays/sum.ncl | 0 .../benches/functions.rs | 2 +- .../benches/functions/church.ncl | 0 {nickel-lang-lib => core}/benches/lorem.txt | 0 {nickel-lang-lib => core}/benches/mantis.rs | 2 +- .../benches/mantis/README.md | 0 .../benches/mantis/deploy-example.ncl | 0 .../benches/mantis/deploy.ncl | 0 .../benches/mantis/jobs/mantis.ncl | 0 .../benches/mantis/lib.ncl | 0 .../benches/mantis/run.ncl | 0 .../benches/mantis/schemas/nomad/types.ncl | 0 .../benches/mantis/tasks/promtail.ncl | 0 .../benches/mantis/tasks/telegraf.ncl | 0 .../benches/nixpkgs/lists.ncl | 0 {nickel-lang-lib => core}/benches/numeric.rs | 2 +- .../benches/numeric/fibonacci.ncl | 0 .../benches/numeric/pidigits.ncl | 0 .../benches/numeric/reduce.ncl | 0 .../benches/numeric/scalar.ncl | 0 {nickel-lang-lib => core}/benches/records.rs | 2 +- .../benches/records/countLetters.ncl | 0 .../benches/records/merge.ncl | 0 .../benches/serialization.rs | 2 +- .../benches/serialization/input.json | 0 .../benches/serialization/main.ncl | 0 {nickel-lang-lib => core}/benches/stdlib.rs | 2 +- .../benches/strings/interpolation.ncl | 0 .../benches/typecheck-nixpkgs-lib.rs | 2 +- {nickel-lang-lib => core}/build.rs | 0 {nickel-lang-lib => core}/src/cache.rs | 0 {nickel-lang-lib => core}/src/deserialize.rs | 4 +- .../src/destructuring.rs | 0 {nickel-lang-lib => core}/src/environment.rs | 0 {nickel-lang-lib => core}/src/error.rs | 0 .../src/eval/cache/incremental.rs | 0 .../src/eval/cache/lazy.rs | 0 .../src/eval/cache/mod.rs | 0 .../src/eval/cache_old.rs | 0 .../src/eval/callstack.rs | 0 .../src/eval/fixpoint.rs | 0 {nickel-lang-lib => core}/src/eval/merge.rs | 0 {nickel-lang-lib => core}/src/eval/mod.rs | 0 .../src/eval/operation.rs | 0 {nickel-lang-lib => core}/src/eval/stack.rs | 0 {nickel-lang-lib => core}/src/eval/tests.rs | 0 {nickel-lang-lib => core}/src/identifier.rs | 0 {nickel-lang-lib => core}/src/label.rs | 0 {nickel-lang-lib => core}/src/lib.rs | 0 {nickel-lang-lib => core}/src/parser/error.rs | 0 .../src/parser/grammar.lalrpop | 0 {nickel-lang-lib => core}/src/parser/lexer.rs | 0 {nickel-lang-lib => core}/src/parser/mod.rs | 0 {nickel-lang-lib => core}/src/parser/tests.rs | 0 .../src/parser/uniterm.rs | 0 {nickel-lang-lib => core}/src/parser/utils.rs | 0 {nickel-lang-lib => core}/src/position.rs | 0 {nickel-lang-lib => core}/src/pretty.rs | 0 {nickel-lang-lib => core}/src/program.rs | 0 {nickel-lang-lib => core}/src/repl/command.rs | 0 {nickel-lang-lib => core}/src/repl/mod.rs | 0 .../src/repl/query_print.rs | 0 .../src/repl/rustyline_frontend.rs | 0 .../src/repl/simple_frontend.rs | 0 .../src/repl/wasm_frontend.rs | 0 {nickel-lang-lib => core}/src/serialize.rs | 0 {nickel-lang-lib => core}/src/stdlib.rs | 0 {nickel-lang-lib => core}/src/term/array.rs | 0 {nickel-lang-lib => core}/src/term/mod.rs | 6 +- {nickel-lang-lib => core}/src/term/record.rs | 0 {nickel-lang-lib => core}/src/term/string.rs | 0 .../src/transform/desugar_destructuring.rs | 0 .../src/transform/free_vars.rs | 0 .../src/transform/gen_pending_contracts.rs | 0 .../src/transform/import_resolution.rs | 0 .../src/transform/mod.rs | 0 .../src/transform/share_normal_form.rs | 0 .../src/transform/substitute_wildcards.rs | 0 .../src/typecheck/destructuring.rs | 0 {nickel-lang-lib => core}/src/typecheck/eq.rs | 0 .../src/typecheck/error.rs | 0 .../src/typecheck/linearization.rs | 0 .../src/typecheck/mk_uniftype.rs | 0 .../src/typecheck/mod.rs | 0 .../src/typecheck/operation.rs | 0 .../src/typecheck/reporting.rs | 0 {nickel-lang-lib => core}/src/types.rs | 0 .../stdlib/internals.ncl | 0 {nickel-lang-lib => core}/stdlib/std.ncl | 0 {nickel-lang-lib => core}/tests/README.md | 6 +- .../tests/examples/main.rs | 4 +- .../tests/integration/contract_label_path.rs | 8 +- .../tests/integration/contracts_fail.rs | 8 +- .../integration/destructuring/assign_fail.ncl | 0 .../integration/destructuring/closed_fail.ncl | 0 .../destructuring/nonexistent_idents.ncl | 0 .../integration/destructuring/pass/assign.ncl | 0 .../integration/destructuring/pass/atbind.ncl | 0 .../destructuring/pass/default.ncl | 0 .../integration/destructuring/pass/fun.ncl | 0 .../integration/destructuring/pass/mixed.ncl | 0 .../integration/destructuring/pass/nested.ncl | 0 .../pass/nested_duplicated_ident.ncl | 0 .../integration/destructuring/pass/open.ncl | 0 .../destructuring/pass/preserves_types.ncl | 0 .../integration/destructuring/pass/rest.ncl | 0 .../integration/destructuring/pass/simple.ncl | 0 .../destructuring/pass/type_annotations.ncl | 0 .../destructuring/pass/typecontract.ncl | 0 .../destructuring/repeated_ident.ncl | 0 .../destructuring/repeated_ident_typed.ncl | 0 .../integration/destructuring/rest_fail.ncl | 0 .../destructuring/type_mismatch_fail.ncl | 0 .../type_mismatch_field_pattern_fail.ncl | 0 ...ype_mismatch_nested_destructuring_fail.ncl | 0 .../destructuring/typecontract_fail.ncl | 0 .../fail/arrays/elem_at_empty_array.ncl | 0 .../arrays/elem_at_index_out_of_bounds.ncl | 0 .../fail/arrays/elem_at_negative_index.ncl | 0 .../fail/arrays/elem_at_non_array_arg.ncl | 0 .../fail/arrays/elem_at_non_int_index.ncl | 0 .../fail/arrays/slice_empty_array.ncl | 0 .../fail/arrays/slice_non_array.ncl | 0 .../stdlib_at_non_array_arg_raises_blame.ncl | 0 .../stdlib_at_non_number_arg_raises_blame.ncl | 0 .../stdlib_drop_first_non_array_arg.ncl | 0 .../arrays/stdlib_first_non_array_arg.ncl | 0 .../fail/contracts/and_bool_contract_fail.ncl | 0 .../fail/contracts/and_number_bool.ncl | 0 .../contracts/array_contract_bad_element.ncl | 0 .../array_contract_fn_is_not_an_array.ncl | 0 .../array_contract_num_is_not_an_array.ncl | 0 .../fail/contracts/basic_custom_contract.ncl | 0 .../contract_applies_to_default_value.ncl | 0 .../contracts_dont_capture_type_vars.ncl | 0 ...nary_contract_propagates_through_merge.ncl | 0 .../fail/contracts/div_by_zero.ncl | 0 .../contracts/enum_contract_empty_enum.ncl | 0 .../enum_contract_missing_variant.ncl | 0 .../enum_contract_non_enum_value.ncl | 0 .../fail/contracts/equating_fns_lhs.ncl | 0 .../fail/contracts/equating_fns_rhs.ncl | 0 .../poly_record_contract_bad_field.ncl | 0 .../poly_record_contract_empty_record.ncl | 0 .../poly_record_contract_higher_order_fn.ncl | 0 .../poly_record_contract_map_sealed_tail.ncl | 0 ..._record_contract_merge_sealed_tail_lhs.ncl | 0 ..._record_contract_merge_sealed_tail_rhs.ncl | 0 .../poly_record_contract_missing_field.ncl | 0 ...ecord_contract_return_val_without_tail.ncl | 0 ..._record_contract_return_val_wrong_tail.ncl | 0 ...rd_contract_sealed_tail_dynamic_access.ncl | 0 ...cord_contract_sealed_tail_remove_field.ncl | 0 ...ord_contract_sealed_tail_static_access.ncl | 0 .../polymorphic_function_contract.ncl | 0 .../contracts/record_contract_bad_field.ncl | 0 .../contracts/record_contract_constraint.ncl | 0 .../record_contract_empty_record.ncl | 0 .../contracts/record_contract_extra_field.ncl | 0 .../record_contract_missing_field.ncl | 0 .../record_contract_nested_extra_field.ncl | 0 .../record_contract_nested_failure.ncl | 0 .../record_contract_nested_missing_field.ncl | 0 .../fail/contracts/type_annot_inline.ncl | 0 .../fail/contracts/type_annot_let.ncl | 0 .../fail/core/comparison_ge_string_string.ncl | 0 .../core/comparison_geq_string_string.ncl | 0 .../fail/core/comparison_le_number_bool.ncl | 0 .../fail/core/comparison_le_string_number.ncl | 0 .../fail/core/comparison_leq_bool_array.ncl | 0 .../integration/fail/core/or_string_bool.ncl | 0 .../fail/core/string_interpolation_number.ncl | 0 .../mutually_recursive_functions.ncl | 0 .../infinite_loops/x_eq_expr_involving_x.ncl | 0 .../fail/infinite_loops/x_eq_x.ncl | 0 .../fail/infinite_loops/x_eq_y_eq_z_eq_x.ncl | 0 .../fail/merging/merge_compose_contract.ncl | 0 .../merge_conflict_inside_metavalue.ncl | 0 .../fail/merging/merge_contract.ncl | 0 .../fail/merging/merge_default_contract.ncl | 0 .../fail/parsing/type_var_outside_forall.ncl | 0 .../fail/parsing/unbound_record_tail_var.ncl | 0 .../fail/parsing/unbound_type_variable.ncl | 0 .../fail/parsing/unbound_var_in_contract.ncl | 0 .../fail/parsing/unexpected_token/buried.ncl | 0 .../fail/parsing/unexpected_token/dollar.ncl | 0 .../parsing/unexpected_token/in_record.ncl | 0 .../cannot_use_dynamic_fields_recursively.ncl | 0 .../fail/records/dynamic_field_missing.ncl | 0 .../merge_different_vals_both_force.ncl | 0 .../merge_different_vals_default_prio.ncl | 0 .../merge_different_vals_no_priority.ncl | 0 ...rge_nested_different_vals_default_prio.ncl | 0 .../merge_nested_different_vals_no_prio.ncl | 0 .../merge_nested_different_vals_prio_0.ncl | 0 ...ge_nested_different_vals_same_priority.ncl | 0 .../merge_nested_incompatible_types.ncl | 0 .../fail/records/missing_field.ncl | 0 .../records/missing_field_not_exported.ncl | 0 .../records/missing_field_with_contract.ncl | 0 .../records/static_access_missing_field.ncl | 0 .../tests/integration/free_vars.rs | 6 +- .../integration/imports/circular_imports.ncl | 0 .../integration/imports/contract_fail.ncl | 0 .../imports/direct_import_loop.ncl | 0 .../imports/imported/circular_imports.ncl | 0 .../imports/imported/circular_imports1.ncl | 0 .../imports/imported/circular_imports2.ncl | 0 .../imports/imported/contract_fail.ncl | 0 .../imports/imported/direct_import_loop.ncl | 0 .../imports/imported/multi_imports.ncl | 0 .../integration/imports/imported/nested.ncl | 0 .../imports/imported/nested_syntax_error.ncl | 0 .../imports/imported/nested_syntax_error1.ncl | 0 .../imports/imported/nested_syntax_error2.ncl | 0 .../imports/imported/root_path.ncl | 0 .../imports/imported/root_path/fourtytwo.ncl | 0 .../imports/imported/root_path/import.ncl | 0 .../imports/imported/serialize.ncl | 0 .../integration/imports/imported/two.ncl | 0 .../imports/imported/typecheck_fail.ncl | 0 .../imports/imported/unexpected_token.ncl | 0 .../imported/unexpected_token_buried.ncl | 0 .../imported/unexpected_token_in_record.ncl | 0 .../integration/imports/multi_imports.ncl | 0 .../tests/integration/imports/nested.ncl | 0 .../imports/nested_syntax_error.ncl | 0 .../tests/integration/imports/root_path.ncl | 0 .../tests/integration/imports/serialize.ncl | 0 .../imports/static_typing_fail.ncl | 0 .../integration/imports/typecheck_fail.ncl | 0 .../imports/unexpected_token_buried.ncl | 0 .../imports/unexpected_token_fail.ncl | 0 .../unexpected_token_in_record_fail.ncl | 0 .../tests/integration/infinite_rec.rs | 4 +- .../tests/integration/main.rs | 6 +- .../integration/pass/contracts/contracts.ncl | 0 .../pass/contracts/types_dont_propagate.ncl | 0 .../tests/integration/pass/core/arrays.ncl | 0 .../tests/integration/pass/core/basics.ncl | 0 .../tests/integration/pass/core/builtins.ncl | 0 .../tests/integration/pass/core/eq.ncl | 0 .../tests/integration/pass/core/fibo.ncl | 0 .../tests/integration/pass/core/functions.ncl | 0 .../tests/integration/pass/core/import.ncl | 0 .../tests/integration/pass/core/records.ncl | 0 .../integration/pass/core/recursive_let.ncl | 0 .../tests/integration/pass/lib/assert.ncl | 0 .../tests/integration/pass/lib/imported.ncl | 0 .../integration/pass/lib/typed-import.ncl | 0 .../integration/pass/merging/array-merge.ncl | 0 .../pass/merging/lazy-propagation.ncl | 0 .../integration/pass/merging/metavalues.ncl | 0 .../pass/merging/multiple_overrides.ncl | 0 .../integration/pass/merging/overriding.ncl | 0 .../integration/pass/merging/priorities.ncl | 0 .../integration/pass/parsing/annotations.ncl | 0 .../pass/parsing/quote_in_identifier.ncl | 0 .../integration/pass/records/record_defs.ncl | 0 .../pass/serialization/serialize.ncl | 0 .../pass/serialization/serialize_package.ncl | 0 .../stdlib/string_contains_find_replace.ncl | 0 .../pass/stdlib/string_contracts.ncl | 0 .../pass/stdlib/string_conversions.ncl | 0 .../pass/stdlib/string_primitives.ncl | 0 .../pass/stdlib/string_split_join.ncl | 0 .../integration/pass/stdlib/string_trim.ncl | 0 .../stdlib/string_uppercase_lowercase.ncl | 0 .../pass/strings/string_interpolation.ncl | 0 .../pass/strings/symbolic_strings.ncl | 0 .../regression-rrows-unification-loops.ncl | 0 .../integration/pass/types/typechecking.ncl | 0 .../tests/integration/pass/types/types.ncl | 0 .../tests/integration/pretty.rs | 8 +- .../tests/integration/query.rs | 4 +- .../tests/integration/stdlib_typecheck.rs | 2 +- .../typecheck/fail/contracts_dont_unify.ncl | 0 ...dyn_tail_contract_in_typechecking_mode.ncl | 0 .../typecheck/fail/dynamic_record_field.ncl | 0 ...ic_type_error_with_wildcard_annotation.ncl | 0 .../enum_match_mismatched_branch_types.ncl | 0 .../fail/enum_match_variant_not_covered.ncl | 0 .../fail/enum_variant_not_in_type.ncl | 0 .../fail/locally_different_flat_types.ncl | 0 .../typecheck/fail/mismatch_array_elem_at.ncl | 0 .../typecheck/fail/mismatch_array_entry.ncl | 0 .../typecheck/fail/mismatch_array_map.ncl | 0 .../fail/mismatch_array_multiple_entries.ncl | 0 .../fail/mismatch_array_typed_entry.ncl | 0 .../typecheck/fail/mismatch_contract_type.ncl | 0 ...h_convert_empty_record_to_dynamic_tail.ncl | 0 ...ert_static_record_type_to_dynamic_tail.ncl | 0 .../mismatch_enum_case_in_multiple_types.ncl | 0 .../fail/mismatch_enum_match_fun_type.ncl | 0 .../fail/mismatch_enum_poly_nested.ncl | 0 .../fail/mismatch_enum_poly_row_var.ncl | 0 .../mismatch_forall_var_concrete_type.ncl | 0 .../fail/mismatch_forall_variable.ncl | 0 .../typecheck/fail/mismatch_in_fun_body.ncl | 0 .../typecheck/fail/mismatch_let_inference.ncl | 0 .../fail/mismatch_nested_forall_variable.ncl | 0 .../fail/mismatch_rec_record_field.ncl | 0 .../fail/mismatch_rec_record_inference.ncl | 0 .../fail/mismatch_rec_record_rec_field.ncl | 0 .../fail/mismatch_record_dyn_field.ncl | 0 .../fail/mismatch_record_field_access.ncl | 0 .../fail/mismatch_record_field_name.ncl | 0 .../fail/mismatch_record_field_type.ncl | 0 .../mismatch_record_poly_field_misused.ncl | 0 .../fail/mismatch_record_poly_fields.ncl | 0 .../fail/mismatch_record_poly_row_var.ncl | 0 .../fail/no_implicit_polymorphism.ncl | 0 .../typecheck/fail/piecewise_signature.ncl | 0 .../fail/primitive_mismatch_bool_number.ncl | 0 .../fail/primitive_mismatch_number_bool.ncl | 0 .../fail/primitive_mismatch_string_number.ncl | 0 .../fail/record-typed-field-path.ncl | 0 .../typecheck/fail/recursive_let.ncl | 0 .../typecheck/fail/row_conflict_extend.ncl | 0 .../typecheck/fail/row_conflict_remove.ncl | 0 .../typecheck/fail/shallow_type_inference.ncl | 0 .../fail/unannotated_bindings_type_as_dyn.ncl | 0 .../typecheck/fail/unbound_variable.ncl | 0 .../fail/wildcard_apparent_ty_is_dyn.ncl | 0 .../dynamic_type_error_without_wildcard.ncl | 0 .../tests/integration/typecheck_fail.rs | 12 +- ...row_type_unification_variable_mismatch.ncl | 0 flake.nix | 20 +-- lsp/lsp-harness/Cargo.toml | 20 ++- lsp/lsp-harness/src/jsonrpc.rs | 10 +- lsp/nls/Cargo.toml | 50 +++---- lsp/nls/src/cache.rs | 2 +- lsp/nls/src/files.rs | 2 +- lsp/nls/src/linearization/building.rs | 2 +- lsp/nls/src/linearization/completed.rs | 2 +- lsp/nls/src/linearization/interface.rs | 6 +- lsp/nls/src/linearization/mod.rs | 8 +- lsp/nls/src/requests/completion.rs | 8 +- lsp/nls/src/requests/goto.rs | 2 +- lsp/nls/src/requests/hover.rs | 2 +- lsp/nls/src/server.rs | 4 +- lsp/nls/src/term.rs | 2 +- lsp/nls/tests/main.rs | 2 +- nickel-lang-cli/Cargo.toml | 32 ----- nickel-lang-lib/Cargo.toml | 110 --------------- nickel-wasm-repl/src/lib.rs | 1 - pyckel/Cargo.toml | 6 +- pyckel/src/lib.rs | 2 +- {utilities => utils}/Cargo.toml | 14 +- {utilities => utils}/src/annotated_test.rs | 0 {utilities => utils}/src/bench.rs | 4 +- {utilities => utils}/src/lib.rs | 2 +- {utilities => utils}/src/project_root.rs | 2 +- {utilities => utils}/src/test_program.rs | 2 +- {nickel-wasm-repl => wasm-repl}/Cargo.toml | 7 +- wasm-repl/src/lib.rs | 1 + 463 files changed, 450 insertions(+), 431 deletions(-) create mode 100644 cli/Cargo.toml rename {nickel-lang-cli => cli}/bin/nickel.rs (96%) rename {nickel-lang-cli => cli}/tests/snapshot/README.md (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/docs/function.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/docs/record.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/docs/types.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/annotated_record_pattern_typecheck_fail.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/array_at_empty_array.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/array_at_out_of_bound.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/array_contract_fail.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/array_merge_fail.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/array_range_reversed_indices.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/array_range_step_negative_step.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/blame_custom_message_ansi_escaping.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/caller_contract_violation.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/contract_with_custom_diagnostic.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/dictionary_contract_fail.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/enum_forall_parametricity_violation.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/fun_contract_range_nested.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/fun_contract_range_violation.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/function_contract_domain_violation.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/function_contract_violation.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/interpolate_record_type_field.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/invalid_record_type.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/mismatched_row_record_pattern_fail.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/nested_annotated_record_pattern_typecheck_fail.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/query_non_record.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/record_access.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/record_destructuring_duplicate_ident.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/record_forall_constraints_contract.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/record_forall_constraints_typecheck.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/record_forall_parametricity_violation.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/record_type_repeated_field.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/simple_contract_fail.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/subcontract_nested_custom_diagnostics.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/subcontract_type_path_underline.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/trace_not_saturated.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/typed_field_without_annotation.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/unification_variable_aliasing.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/errors/value_contract_violation.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/eval/escaping.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/eval/records.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/export/nested_record.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/export/not_exported_undefined.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/export/trace.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/pretty/multiline_doc.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/inputs/pretty/simple_record.ncl (100%) rename {nickel-lang-cli => cli}/tests/snapshot/main.rs (97%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__doc_stderr_function.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__doc_stdout_record.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__doc_stdout_types.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_annotated_record_pattern_typecheck_fail.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_array_at_empty_array.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_array_at_out_of_bound.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_array_contract_fail.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_array_merge_fail.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_array_range_reversed_indices.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_array_range_step_negative_step.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_blame_custom_message_ansi_escaping.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_caller_contract_violation.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_contract_with_custom_diagnostic.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_dictionary_contract_fail.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_enum_forall_parametricity_violation.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_fun_contract_range_nested.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_fun_contract_range_violation.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_function_contract_domain_violation.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_function_contract_violation.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_interpolate_record_type_field.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_invalid_record_type.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_mismatched_row_record_pattern_fail.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_nested_annotated_record_pattern_typecheck_fail.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_record_access.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_record_destructuring_duplicate_ident.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_record_forall_constraints_contract.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_record_forall_constraints_typecheck.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_record_forall_parametricity_violation.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_record_type_repeated_field.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_simple_contract_fail.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_subcontract_nested_custom_diagnostics.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_subcontract_type_path_underline.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_trace_not_saturated.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_typed_field_without_annotation.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_unification_variable_aliasing.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stderr_value_contract_violation.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stdout_escaping.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__error_stdout_records.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__export_stderr_trace.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__export_stdout_nested_record.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__export_stdout_not_exported_undefined.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__export_stdout_trace.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__pprint-ast_stdout_multiline_doc.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__pprint-ast_stdout_simple_record.ncl.snap (100%) rename {nickel-lang-cli => cli}/tests/snapshot/snapshots/snapshot__query_stderr_query_non_record.ncl.snap (100%) create mode 100644 core/Cargo.toml rename {nickel-lang-lib => core}/benches/arrays.rs (98%) rename {nickel-lang-lib => core}/benches/arrays/fold.ncl (100%) rename {nickel-lang-lib => core}/benches/arrays/generate.ncl (100%) rename {nickel-lang-lib => core}/benches/arrays/map.ncl (100%) rename {nickel-lang-lib => core}/benches/arrays/pipe.ncl (100%) rename {nickel-lang-lib => core}/benches/arrays/primes.ncl (100%) rename {nickel-lang-lib => core}/benches/arrays/random.ncl (100%) rename {nickel-lang-lib => core}/benches/arrays/sort.ncl (100%) rename {nickel-lang-lib => core}/benches/arrays/sum.ncl (100%) rename {nickel-lang-lib => core}/benches/functions.rs (88%) rename {nickel-lang-lib => core}/benches/functions/church.ncl (100%) rename {nickel-lang-lib => core}/benches/lorem.txt (100%) rename {nickel-lang-lib => core}/benches/mantis.rs (90%) rename {nickel-lang-lib => core}/benches/mantis/README.md (100%) rename {nickel-lang-lib => core}/benches/mantis/deploy-example.ncl (100%) rename {nickel-lang-lib => core}/benches/mantis/deploy.ncl (100%) rename {nickel-lang-lib => core}/benches/mantis/jobs/mantis.ncl (100%) rename {nickel-lang-lib => core}/benches/mantis/lib.ncl (100%) rename {nickel-lang-lib => core}/benches/mantis/run.ncl (100%) rename {nickel-lang-lib => core}/benches/mantis/schemas/nomad/types.ncl (100%) rename {nickel-lang-lib => core}/benches/mantis/tasks/promtail.ncl (100%) rename {nickel-lang-lib => core}/benches/mantis/tasks/telegraf.ncl (100%) rename {nickel-lang-lib => core}/benches/nixpkgs/lists.ncl (100%) rename {nickel-lang-lib => core}/benches/numeric.rs (94%) rename {nickel-lang-lib => core}/benches/numeric/fibonacci.ncl (100%) rename {nickel-lang-lib => core}/benches/numeric/pidigits.ncl (100%) rename {nickel-lang-lib => core}/benches/numeric/reduce.ncl (100%) rename {nickel-lang-lib => core}/benches/numeric/scalar.ncl (100%) rename {nickel-lang-lib => core}/benches/records.rs (90%) rename {nickel-lang-lib => core}/benches/records/countLetters.ncl (100%) rename {nickel-lang-lib => core}/benches/records/merge.ncl (100%) rename {nickel-lang-lib => core}/benches/serialization.rs (89%) rename {nickel-lang-lib => core}/benches/serialization/input.json (100%) rename {nickel-lang-lib => core}/benches/serialization/main.ncl (100%) rename {nickel-lang-lib => core}/benches/stdlib.rs (93%) rename {nickel-lang-lib => core}/benches/strings/interpolation.ncl (100%) rename {nickel-lang-lib => core}/benches/typecheck-nixpkgs-lib.rs (85%) rename {nickel-lang-lib => core}/build.rs (100%) rename {nickel-lang-lib => core}/src/cache.rs (100%) rename {nickel-lang-lib => core}/src/deserialize.rs (99%) rename {nickel-lang-lib => core}/src/destructuring.rs (100%) rename {nickel-lang-lib => core}/src/environment.rs (100%) rename {nickel-lang-lib => core}/src/error.rs (100%) rename {nickel-lang-lib => core}/src/eval/cache/incremental.rs (100%) rename {nickel-lang-lib => core}/src/eval/cache/lazy.rs (100%) rename {nickel-lang-lib => core}/src/eval/cache/mod.rs (100%) rename {nickel-lang-lib => core}/src/eval/cache_old.rs (100%) rename {nickel-lang-lib => core}/src/eval/callstack.rs (100%) rename {nickel-lang-lib => core}/src/eval/fixpoint.rs (100%) rename {nickel-lang-lib => core}/src/eval/merge.rs (100%) rename {nickel-lang-lib => core}/src/eval/mod.rs (100%) rename {nickel-lang-lib => core}/src/eval/operation.rs (100%) rename {nickel-lang-lib => core}/src/eval/stack.rs (100%) rename {nickel-lang-lib => core}/src/eval/tests.rs (100%) rename {nickel-lang-lib => core}/src/identifier.rs (100%) rename {nickel-lang-lib => core}/src/label.rs (100%) rename {nickel-lang-lib => core}/src/lib.rs (100%) rename {nickel-lang-lib => core}/src/parser/error.rs (100%) rename {nickel-lang-lib => core}/src/parser/grammar.lalrpop (100%) rename {nickel-lang-lib => core}/src/parser/lexer.rs (100%) rename {nickel-lang-lib => core}/src/parser/mod.rs (100%) rename {nickel-lang-lib => core}/src/parser/tests.rs (100%) rename {nickel-lang-lib => core}/src/parser/uniterm.rs (100%) rename {nickel-lang-lib => core}/src/parser/utils.rs (100%) rename {nickel-lang-lib => core}/src/position.rs (100%) rename {nickel-lang-lib => core}/src/pretty.rs (100%) rename {nickel-lang-lib => core}/src/program.rs (100%) rename {nickel-lang-lib => core}/src/repl/command.rs (100%) rename {nickel-lang-lib => core}/src/repl/mod.rs (100%) rename {nickel-lang-lib => core}/src/repl/query_print.rs (100%) rename {nickel-lang-lib => core}/src/repl/rustyline_frontend.rs (100%) rename {nickel-lang-lib => core}/src/repl/simple_frontend.rs (100%) rename {nickel-lang-lib => core}/src/repl/wasm_frontend.rs (100%) rename {nickel-lang-lib => core}/src/serialize.rs (100%) rename {nickel-lang-lib => core}/src/stdlib.rs (100%) rename {nickel-lang-lib => core}/src/term/array.rs (100%) rename {nickel-lang-lib => core}/src/term/mod.rs (99%) rename {nickel-lang-lib => core}/src/term/record.rs (100%) rename {nickel-lang-lib => core}/src/term/string.rs (100%) rename {nickel-lang-lib => core}/src/transform/desugar_destructuring.rs (100%) rename {nickel-lang-lib => core}/src/transform/free_vars.rs (100%) rename {nickel-lang-lib => core}/src/transform/gen_pending_contracts.rs (100%) rename {nickel-lang-lib => core}/src/transform/import_resolution.rs (100%) rename {nickel-lang-lib => core}/src/transform/mod.rs (100%) rename {nickel-lang-lib => core}/src/transform/share_normal_form.rs (100%) rename {nickel-lang-lib => core}/src/transform/substitute_wildcards.rs (100%) rename {nickel-lang-lib => core}/src/typecheck/destructuring.rs (100%) rename {nickel-lang-lib => core}/src/typecheck/eq.rs (100%) rename {nickel-lang-lib => core}/src/typecheck/error.rs (100%) rename {nickel-lang-lib => core}/src/typecheck/linearization.rs (100%) rename {nickel-lang-lib => core}/src/typecheck/mk_uniftype.rs (100%) rename {nickel-lang-lib => core}/src/typecheck/mod.rs (100%) rename {nickel-lang-lib => core}/src/typecheck/operation.rs (100%) rename {nickel-lang-lib => core}/src/typecheck/reporting.rs (100%) rename {nickel-lang-lib => core}/src/types.rs (100%) rename {nickel-lang-lib => core}/stdlib/internals.ncl (100%) rename {nickel-lang-lib => core}/stdlib/std.ncl (100%) rename {nickel-lang-lib => core}/tests/README.md (89%) rename {nickel-lang-lib => core}/tests/examples/main.rs (93%) rename {nickel-lang-lib => core}/tests/integration/contract_label_path.rs (89%) rename {nickel-lang-lib => core}/tests/integration/contracts_fail.rs (89%) rename {nickel-lang-lib => core}/tests/integration/destructuring/assign_fail.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/destructuring/closed_fail.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/destructuring/nonexistent_idents.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/destructuring/pass/assign.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/destructuring/pass/atbind.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/destructuring/pass/default.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/destructuring/pass/fun.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/destructuring/pass/mixed.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/destructuring/pass/nested.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/destructuring/pass/nested_duplicated_ident.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/destructuring/pass/open.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/destructuring/pass/preserves_types.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/destructuring/pass/rest.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/destructuring/pass/simple.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/destructuring/pass/type_annotations.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/destructuring/pass/typecontract.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/destructuring/repeated_ident.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/destructuring/repeated_ident_typed.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/destructuring/rest_fail.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/destructuring/type_mismatch_fail.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/destructuring/type_mismatch_field_pattern_fail.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/destructuring/type_mismatch_nested_destructuring_fail.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/destructuring/typecontract_fail.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/arrays/elem_at_empty_array.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/arrays/elem_at_index_out_of_bounds.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/arrays/elem_at_negative_index.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/arrays/elem_at_non_array_arg.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/arrays/elem_at_non_int_index.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/arrays/slice_empty_array.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/arrays/slice_non_array.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/arrays/stdlib_at_non_array_arg_raises_blame.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/arrays/stdlib_at_non_number_arg_raises_blame.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/arrays/stdlib_drop_first_non_array_arg.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/arrays/stdlib_first_non_array_arg.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/and_bool_contract_fail.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/and_number_bool.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/array_contract_bad_element.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/array_contract_fn_is_not_an_array.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/array_contract_num_is_not_an_array.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/basic_custom_contract.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/contract_applies_to_default_value.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/contracts_dont_capture_type_vars.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/dictionary_contract_propagates_through_merge.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/div_by_zero.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/enum_contract_empty_enum.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/enum_contract_missing_variant.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/enum_contract_non_enum_value.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/equating_fns_lhs.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/equating_fns_rhs.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/poly_record_contract_bad_field.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/poly_record_contract_empty_record.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/poly_record_contract_higher_order_fn.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/poly_record_contract_map_sealed_tail.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/poly_record_contract_merge_sealed_tail_lhs.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/poly_record_contract_merge_sealed_tail_rhs.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/poly_record_contract_missing_field.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/poly_record_contract_return_val_without_tail.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/poly_record_contract_return_val_wrong_tail.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/poly_record_contract_sealed_tail_dynamic_access.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/poly_record_contract_sealed_tail_remove_field.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/poly_record_contract_sealed_tail_static_access.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/polymorphic_function_contract.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/record_contract_bad_field.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/record_contract_constraint.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/record_contract_empty_record.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/record_contract_extra_field.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/record_contract_missing_field.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/record_contract_nested_extra_field.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/record_contract_nested_failure.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/record_contract_nested_missing_field.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/type_annot_inline.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/contracts/type_annot_let.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/core/comparison_ge_string_string.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/core/comparison_geq_string_string.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/core/comparison_le_number_bool.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/core/comparison_le_string_number.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/core/comparison_leq_bool_array.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/core/or_string_bool.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/core/string_interpolation_number.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/infinite_loops/mutually_recursive_functions.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/infinite_loops/x_eq_expr_involving_x.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/infinite_loops/x_eq_x.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/infinite_loops/x_eq_y_eq_z_eq_x.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/merging/merge_compose_contract.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/merging/merge_conflict_inside_metavalue.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/merging/merge_contract.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/merging/merge_default_contract.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/parsing/type_var_outside_forall.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/parsing/unbound_record_tail_var.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/parsing/unbound_type_variable.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/parsing/unbound_var_in_contract.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/parsing/unexpected_token/buried.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/parsing/unexpected_token/dollar.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/parsing/unexpected_token/in_record.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/records/cannot_use_dynamic_fields_recursively.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/records/dynamic_field_missing.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/records/merge_different_vals_both_force.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/records/merge_different_vals_default_prio.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/records/merge_different_vals_no_priority.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/records/merge_nested_different_vals_default_prio.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/records/merge_nested_different_vals_no_prio.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/records/merge_nested_different_vals_prio_0.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/records/merge_nested_different_vals_same_priority.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/records/merge_nested_incompatible_types.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/records/missing_field.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/records/missing_field_not_exported.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/records/missing_field_with_contract.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/fail/records/static_access_missing_field.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/free_vars.rs (96%) rename {nickel-lang-lib => core}/tests/integration/imports/circular_imports.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/imports/contract_fail.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/imports/direct_import_loop.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/imports/imported/circular_imports.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/imports/imported/circular_imports1.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/imports/imported/circular_imports2.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/imports/imported/contract_fail.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/imports/imported/direct_import_loop.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/imports/imported/multi_imports.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/imports/imported/nested.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/imports/imported/nested_syntax_error.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/imports/imported/nested_syntax_error1.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/imports/imported/nested_syntax_error2.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/imports/imported/root_path.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/imports/imported/root_path/fourtytwo.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/imports/imported/root_path/import.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/imports/imported/serialize.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/imports/imported/two.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/imports/imported/typecheck_fail.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/imports/imported/unexpected_token.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/imports/imported/unexpected_token_buried.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/imports/imported/unexpected_token_in_record.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/imports/multi_imports.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/imports/nested.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/imports/nested_syntax_error.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/imports/root_path.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/imports/serialize.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/imports/static_typing_fail.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/imports/typecheck_fail.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/imports/unexpected_token_buried.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/imports/unexpected_token_fail.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/imports/unexpected_token_in_record_fail.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/infinite_rec.rs (86%) rename {nickel-lang-lib => core}/tests/integration/main.rs (99%) rename {nickel-lang-lib => core}/tests/integration/pass/contracts/contracts.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/contracts/types_dont_propagate.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/core/arrays.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/core/basics.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/core/builtins.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/core/eq.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/core/fibo.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/core/functions.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/core/import.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/core/records.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/core/recursive_let.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/lib/assert.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/lib/imported.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/lib/typed-import.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/merging/array-merge.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/merging/lazy-propagation.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/merging/metavalues.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/merging/multiple_overrides.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/merging/overriding.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/merging/priorities.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/parsing/annotations.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/parsing/quote_in_identifier.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/records/record_defs.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/serialization/serialize.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/serialization/serialize_package.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/stdlib/string_contains_find_replace.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/stdlib/string_contracts.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/stdlib/string_conversions.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/stdlib/string_primitives.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/stdlib/string_split_join.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/stdlib/string_trim.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/stdlib/string_uppercase_lowercase.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/strings/string_interpolation.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/strings/symbolic_strings.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/types/regression-rrows-unification-loops.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/types/typechecking.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pass/types/types.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/pretty.rs (89%) rename {nickel-lang-lib => core}/tests/integration/query.rs (97%) rename {nickel-lang-lib => core}/tests/integration/stdlib_typecheck.rs (80%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/contracts_dont_unify.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/dyn_tail_contract_in_typechecking_mode.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/dynamic_record_field.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/dynamic_type_error_with_wildcard_annotation.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/enum_match_mismatched_branch_types.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/enum_match_variant_not_covered.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/enum_variant_not_in_type.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/locally_different_flat_types.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/mismatch_array_elem_at.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/mismatch_array_entry.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/mismatch_array_map.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/mismatch_array_multiple_entries.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/mismatch_array_typed_entry.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/mismatch_contract_type.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/mismatch_convert_empty_record_to_dynamic_tail.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/mismatch_convert_static_record_type_to_dynamic_tail.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/mismatch_enum_case_in_multiple_types.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/mismatch_enum_match_fun_type.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/mismatch_enum_poly_nested.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/mismatch_enum_poly_row_var.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/mismatch_forall_var_concrete_type.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/mismatch_forall_variable.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/mismatch_in_fun_body.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/mismatch_let_inference.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/mismatch_nested_forall_variable.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/mismatch_rec_record_field.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/mismatch_rec_record_inference.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/mismatch_rec_record_rec_field.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/mismatch_record_dyn_field.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/mismatch_record_field_access.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/mismatch_record_field_name.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/mismatch_record_field_type.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/mismatch_record_poly_field_misused.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/mismatch_record_poly_fields.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/mismatch_record_poly_row_var.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/no_implicit_polymorphism.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/piecewise_signature.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/primitive_mismatch_bool_number.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/primitive_mismatch_number_bool.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/primitive_mismatch_string_number.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/record-typed-field-path.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/recursive_let.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/row_conflict_extend.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/row_conflict_remove.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/shallow_type_inference.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/unannotated_bindings_type_as_dyn.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/unbound_variable.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/fail/wildcard_apparent_ty_is_dyn.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck/pass/dynamic_type_error_without_wildcard.ncl (100%) rename {nickel-lang-lib => core}/tests/integration/typecheck_fail.rs (62%) rename {nickel-lang-lib => core}/tests/integration/typecheck_fail/row_type_unification_variable_mismatch.ncl (100%) delete mode 100644 nickel-lang-cli/Cargo.toml delete mode 100644 nickel-lang-lib/Cargo.toml delete mode 100644 nickel-wasm-repl/src/lib.rs rename {utilities => utils}/Cargo.toml (59%) rename {utilities => utils}/src/annotated_test.rs (100%) rename {utilities => utils}/src/bench.rs (99%) rename {utilities => utils}/src/lib.rs (76%) rename {utilities => utils}/src/project_root.rs (93%) rename {utilities => utils}/src/test_program.rs (98%) rename {nickel-wasm-repl => wasm-repl}/Cargo.toml (61%) create mode 100644 wasm-repl/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index 1d83adf6..866fcece 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -324,17 +324,6 @@ dependencies = [ "half", ] -[[package]] -name = "clap" -version = "2.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" -dependencies = [ - "bitflags", - "textwrap 0.11.0", - "unicode-width", -] - [[package]] name = "clap" version = "3.2.23" @@ -344,7 +333,7 @@ dependencies = [ "bitflags", "clap_lex 0.2.4", "indexmap", - "textwrap 0.16.0", + "textwrap", ] [[package]] @@ -519,32 +508,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "criterion" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b01d6de93b2b6c65e17c634a26653a29d107b3c98c607c765bf38d041531cd8f" -dependencies = [ - "atty", - "cast", - "clap 2.34.0", - "criterion-plot 0.4.5", - "csv", - "itertools 0.10.5", - "lazy_static", - "num-traits", - "oorandom", - "plotters", - "rayon", - "regex", - "serde", - "serde_cbor", - "serde_derive", - "serde_json", - "tinytemplate", - "walkdir", -] - [[package]] name = "criterion" version = "0.4.0" @@ -556,7 +519,7 @@ dependencies = [ "cast", "ciborium", "clap 3.2.23", - "criterion-plot 0.5.0", + "criterion-plot", "itertools 0.10.5", "lazy_static", "num-traits", @@ -571,16 +534,6 @@ dependencies = [ "walkdir", ] -[[package]] -name = "criterion-plot" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2673cc8207403546f45f5fd319a974b1e6983ad1a3ee7e6041650013be041876" -dependencies = [ - "cast", - "itertools 0.10.5", -] - [[package]] name = "criterion-plot" version = "0.5.0" @@ -890,19 +843,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5320ae4c3782150d900b79807611a59a99fc9a1d61d686faafc24b93fc8d7ca" -[[package]] -name = "env_logger" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", -] - [[package]] name = "env_logger" version = "0.10.0" @@ -1360,12 +1300,16 @@ name = "lsp-harness" version = "0.1.0" dependencies = [ "anyhow", - "env_logger 0.10.0", + "assert_cmd", + "env_logger", + "insta", "log", "lsp-server", "lsp-types", + "nickel-lang-utils", "serde", "serde_json", + "test-generator", ] [[package]] @@ -1529,21 +1473,21 @@ dependencies = [ ] [[package]] -name = "nickel-lang" +name = "nickel-lang-cli" version = "1.0.0" dependencies = [ "clap 4.3.0", "directories", "insta", - "nickel-lang-lib", - "nickel-lang-utilities", + "nickel-lang-core", + "nickel-lang-utils", "serde", "test-generator", ] [[package]] -name = "nickel-lang-lib" -version = "1.0.0" +name = "nickel-lang-core" +version = "0.1.0" dependencies = [ "ansi_term", "assert_matches", @@ -1551,7 +1495,7 @@ dependencies = [ "codespan", "codespan-reporting", "comrak", - "criterion 0.4.0", + "criterion", "indexmap", "indoc 2.0.1", "js-sys", @@ -1561,7 +1505,7 @@ dependencies = [ "malachite", "malachite-q", "md-5", - "nickel-lang-utilities", + "nickel-lang-utils", "once_cell", "pprof", "pretty", @@ -1601,7 +1545,7 @@ dependencies = [ "codespan-reporting", "csv", "derive_more", - "env_logger 0.9.3", + "env_logger", "insta", "lalrpop", "lalrpop-util", @@ -1610,8 +1554,8 @@ dependencies = [ "lsp-harness", "lsp-server", "lsp-types", - "nickel-lang-lib", - "nickel-lang-utilities", + "nickel-lang-core", + "nickel-lang-utils", "pretty_assertions", "regex", "serde", @@ -1620,21 +1564,21 @@ dependencies = [ ] [[package]] -name = "nickel-lang-utilities" -version = "1.0.0" +name = "nickel-lang-utils" +version = "0.1.0" dependencies = [ "codespan", - "criterion 0.3.6", - "nickel-lang-lib", + "criterion", + "nickel-lang-core", "serde", "toml", ] [[package]] -name = "nickel-repl" -version = "1.0.0" +name = "nickel-wasm-repl" +version = "0.1.0" dependencies = [ - "nickel-lang-lib", + "nickel-lang-core", ] [[package]] @@ -1852,7 +1796,7 @@ checksum = "196ded5d4be535690899a4631cc9f18cdc41b7ebf24a79400f46f48e49a11059" dependencies = [ "backtrace", "cfg-if", - "criterion 0.4.0", + "criterion", "findshlibs", "inferno", "libc", @@ -1953,7 +1897,7 @@ name = "pyckel" version = "1.0.0" dependencies = [ "codespan-reporting", - "nickel-lang-lib", + "nickel-lang-core", "pyo3", ] @@ -2309,16 +2253,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "serde_cbor" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" -dependencies = [ - "half", - "serde", -] - [[package]] name = "serde_derive" version = "1.0.164" @@ -2650,9 +2584,9 @@ dependencies = [ [[package]] name = "termimad" -version = "0.23.0" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "749b18b17745261a883ab334d931adffc8c5e07e71c73a861e77124557e7b41f" +checksum = "e7df2ed35b86d796df56633f1bb1f0c15816134e221822d65bbc64d5265ce8d4" dependencies = [ "coolor", "crossbeam", @@ -2690,15 +2624,6 @@ dependencies = [ "syn 0.15.44", ] -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", -] - [[package]] name = "textwrap" version = "0.16.0" diff --git a/Cargo.toml b/Cargo.toml index 6c9b4d2a..d1da85ad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,11 +1,11 @@ [workspace] members = [ - "nickel-lang-lib", - "nickel-lang-cli", + "core", + "cli", "lsp/nls", "lsp/lsp-harness", - "utilities", - "nickel-wasm-repl", + "utils", + "wasm-repl", "pyckel", ] @@ -17,3 +17,66 @@ edition = "2021" keywords = ["configuration", "language", "nix", "nickel"] repository = "https://github.com/tweag/nickel" homepage = "https://nickel-lang.org" +readme = "README.md" + +[workspace.dependencies] +nickel-lang-core = { version = "0.1", path = "./core", default-features = false } +nickel-lang-utils = { version = "0.1", path = "./utils" } +lsp-harness = { version = "0.1", path = "./lsp/lsp-harness" } + +# The `wasm-bindgen` version is pinned (`=`) because it must be a version +# available in Nixpkgs. +wasm-bindgen = "=0.2.83" + +ansi_term = "0.12" +anyhow = "1.0" +assert_cmd = "2.0.11" +assert_matches = "1.5.0" +clap = "4.3" +codespan = "0.11" +codespan-lsp = "0.11" +codespan-reporting = "0.11" +comrak = "0.17.0" +criterion = "0.4" +csv = "1" +derive_more = "0.99" +directories = "4.0.1" +env_logger = "0.10" +indexmap = "1.9.3" +indoc = "2" +insta = "1.29.0" +js-sys = "0.3" +lalrpop = "0.19.9" +lalrpop-util = "0.19.9" +lazy_static = "1" +log = "0.4" +logos = "0.12" +lsp-server = "0.6" +lsp-types = "0.88" +malachite = "0.3.2" +malachite-q = "0.3.2" +md-5 = "0.10.5" +once_cell = "1.17.1" +pprof = "0.11.1" +pretty = "0.11.3" +pretty_assertions = "1.3.0" +pyo3 = "0.17.3" +regex = "1" +rustyline = "11.0" +rustyline-derive = "0.8.0" +serde = "1.0.164" +serde_json = "1.0.96" +serde_repr = "0.1" +serde-wasm-bindgen = "0.5.0" +serde_yaml = "0.9.19" +sha-1 = "0.10.0" +sha2 = "0.10.6" +similar = "2.2.1" +simple-counter = "0.1.0" +strip-ansi-escapes = "0.1.1" +termimad = "0.23.1" +test-generator = "0.3.1" +toml = "0.7.2" +typed-arena = "2.0.2" +unicode-segmentation = "1.10.1" +void = "1" diff --git a/HACKING.md b/HACKING.md index 4312a36c..8c63ec4f 100644 --- a/HACKING.md +++ b/HACKING.md @@ -13,15 +13,21 @@ long. ## Content -The Nickel repository consist of 4 crates: +The Nickel repository consist of various crates: -- `nickel-lang-lib` (path: `nickel-lang-lib`). The main crate containing the interpreter - as a library. -- `nickel-lang` (path: `nickel-lang-cli`). The `nickel` binary. +- `nickel-lang-core` (path: `core`). The main crate containing the interpreter + as a library. +- `nickel-lang-cli` (path: `cli`). The `nickel` binary. - `nickel-lang-lsp` (path: `lsp/nls/`). The Nickel Language Server (NLS), an LSP server for Nickel. -- `nickel-lang-utilities`: (path: `utilities/`). An auxiliary crate regrouping +- `nickel-lang-utils`: (path: `utils/`). An auxiliary crate regrouping helpers for tests and benchmarks. Not required to build `nickel` itself. +- `pyckel` (path: `pyckel`). Python bindings to `nickel-lang-core`. +- `lsp-harness` (path: `lsp/lsp-harness`). A testing harness for the Nickel Language + Server. +- `nickel-repl` (path: `wasm-repl`). An auxiliary crate, re-exporting + `nickel-lang-core` with the right settings for building a WASM repl. Primarily + used on [nickel-lang.org]. Other noteworthy items: @@ -58,16 +64,16 @@ nickel-lang-lsp 0.1.0 ### Nickel -To only build the main crate `nickel-lang-lib`, run: +To only build the main crate `nickel-lang-core`, run: ```console -cargo build -p nickel-lang-lib +cargo build -p nickel-lang-core ``` To build the interpreter CLI, run: ```shell -$ cargo build -p nickel-lang +$ cargo build -p nickel-lang-cli $ ./target/debug/nickel --version nickel-lang 0.1.0 ``` @@ -88,8 +94,8 @@ nickel-lang-lsp 0.1.0 There is a WebAssembly (WASM) version of the REPL, which is used for the online playground on [nickel-lang.org][nickel-lang.org]. To ease the build, we use the -`nickel-repl` located in `nickel-wasm-repl`, which just wraps and re-export -the `nickel-lang-lib` with the right settings for building to WebAssembly. +`nickel-repl` located in `wasm-repl`, which just wraps and re-export +the `nickel-lang-core` crate with the right settings for building to WebAssembly. The Nix flake has also an output to do the whole build, but incremental compilation is not as good as with direct usage of `cargo`. @@ -124,8 +130,8 @@ LICENSE package.json nickel_lang_bg.js nickel_lang_bg.wasm [..] Tests are run via `cargo test`. They are two types of tests: - Unit tests, located directly in the corresponding module. -- Integration tests, located in the dedicated crate `nickel-lang-lib/tests/integration`. -- Snapshot tests, located in `nickel-lang-cli/tests/smapshot`. +- Integration tests, located in the dedicated crate `core/tests/integration`. +- Snapshot tests, located in `cli/tests/smapshot`. ### Test annotations @@ -136,27 +142,27 @@ to mark examples, in the top-level subdirectory `examples`, with an expected failure condition if necessary. Tests for the happy path - i.e., valid Nickel programs which do not raise errors -are generally written in standalone Nickel files in the `nickel-lang-lib/tests/integration/pass` +are generally written in standalone Nickel files in the `core/tests/integration/pass` directory. All `.ncl` files in this directory are automatically converted into Rust integration tests, which run the file and assert that no errors were raised during evaluation. Each of these `.ncl` files is structured as an array of `Bool` expressions, which is ultimately passed to a `check` function defined in -`nickel-lang-lib/tests/integration/pass/lib/assert.ncl`. +`core/tests/integration/pass/lib/assert.ncl`. This function applies an `Assert` contract to each value in the array, which checks that the value it is applied to evaluates to `true`. The benefit of using a contract for this is that if a test fails we can simply run the file directly using Nickel, which gives better error messages than the ones we get by default from `cargo test`. -Tests which are expected to fail may be written in Rust in `nickel-lang-lib/tests/integration`. +Tests which are expected to fail may be written in Rust in `core/tests/integration`. However, simple failure test cases can make use of the test annotation support -and are located in `nickel-lang-lib/tests/integration/fail`. +and are located in `core/tests/integration/fail`. ### Snapshot testing -The project also contains a suite of snapshot tests in the `nickel-lang-cli/tests/snapshot` +The project also contains a suite of snapshot tests in the `cli/tests/snapshot` directory. Here, `.ncl` files written in the subdirectories of the `input` directory are run against the last-built Nickel binary, and their output is compared to the last-known output. diff --git a/README.md b/README.md index 8d45bfbd..ce680d6c 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ Please follow the getting started guide for Nickel users on the [nickel-lang website](https://nickel-lang.org/getting-started). The instructions below are either reproduced for this document to be self-contained or because they are aimed toward hacking on the Nickel interpreter itself (e.g. building -the `nickel-lang-lib` crate documentation). +the `nickel-lang-core` crate documentation). ### Run diff --git a/RELEASING.md b/RELEASING.md index 0a33009b..31982198 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -7,35 +7,53 @@ crates and dependent repositories (such as the website) in a consistent state. ## Steps to make a release +### About the version numbers + +Some of the crates in the Nickel workspace are libraries and not versioned +according to the version number of the language itself. These are + +- `nickel-lang-core` +- `nickel-lang-utils` +- `lsp-harness` +- `nickel-wasm-repl` + +Their version numbers take the form `0.W.U` and their public APIs are not +considered stable. Consequently we bump their versions to `0.(W+1).0` on every +release. + +Other crates carry the version number of the Nickel language. These are + +- `nickel-lang-cli` +- `nickel-lang-lsp` +- `pyckel` + ### Prepare 1. Branch out from `master` to a dedicated branch `X.Y.Z-release`: `git checkout -b X.Y.Z-release` -2. Bump the version number of all the crates of the workspace to `X.Y.Z`: - - Bump the `version` attribute to `X.Y.Z` in `./Cargo.toml`, - `./utilities/Cargo.toml`, `lsp/nls/Cargo.toml` and - `./nickel-wasm-repl/Cargo.toml`. - - Bump the version of the interdependencies of the crates in `nickel-lang-cli`, - `nickel-lang-lib`, `lsp/nls` and `nickel-wasm-repl`. For example, `nickel-lang-lib` - has the following line in `./nickel-lang-lib/Cargo.toml` under `[dev-dependencies]`: +2. Bump the overall version number in `Cargo.toml` to `X.Y.Z`. This will be + automatically propagated to the CLI, the Nickel language server and Pyckel. +3. Bump the version number of the other crates in the workspace: + - `core/Cargo.toml` + - `lsp/lsp-harness/Cargo.toml` + - `utils/Cargo.toml` + - `wasm-repl/Cargo.toml` + Afterwards, also adjust the version numbers in `Cargo.toml`. For example, in - ```toml - nickel-lang-utilities = {path = "../utilities", version = "0.3.0"} - ``` + ```toml + nickel-lang-core = { version = "0.1", path = "./core", default-features = false } + ``` - You have to bump the `version` number to `X.Y.Z` of such dependencies on - `nickel-lang-lib`, `nickel-lang-utilities`, or any other crate of the - workspace as well. + adjust the version `0.1` to reflect the new version number. - Commit and push your changes. -3. Make sure that everything builds: run `nix flake check` at the root of the +4. Make sure that everything builds: run `nix flake check` at the root of the repository. -4. Add the changelog since the last release in RELEASES.md. GitHub is able to +5. Add the changelog since the last release in RELEASES.md. GitHub is able to automatically generate release notes: refer to [this guide](https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes). While the output needs to be reworked, it's a useful starting point. Commit and push your changes. -5. Set the `stable` branch to point to your new `X.Y.Z-release`. Because the +6. Set the `stable` branch to point to your new `X.Y.Z-release`. Because the `stable` branch usually contains specific fixes, or cherry-picked commits, we'll have to force push. We advise to first save the previous state in a local branch: @@ -63,9 +81,9 @@ crates and dependent repositories (such as the website) in a consistent state. ### Release on crates.io -1. Remove references to `nickel-lang-utilities` from the `[dev-dependencies]` - sections of the crates to be published: `./nickel-lang-lib/Cargo.toml` for - `nickel-lang-lib`, `./nickel-lang-cli/Cargo.toml` for `nickel-lang-cli` and +1. Remove references to `nickel-lang-utils` from the `[dev-dependencies]` + sections of the crates to be published: `./core/Cargo.toml` for + `nickel-lang-core`, `./cli/Cargo.toml` for `nickel-lang-cli` and `./lsp/nls/Cargo.toml` for `nickel-lang-lsp` (work-around for [cargo:#4242](https://github.com/rust-lang/cargo/issues/4242). diff --git a/cli/Cargo.toml b/cli/Cargo.toml new file mode 100644 index 00000000..442e8caa --- /dev/null +++ b/cli/Cargo.toml @@ -0,0 +1,32 @@ +[package] +name = "nickel-lang-cli" +description = "The Nickel interpreter CLI" +authors.workspace = true +edition.workspace = true +homepage.workspace = true +keywords.workspace = true +license.workspace = true +repository.workspace = true +version.workspace = true + +[[bin]] +name = "nickel" +path = "bin/nickel.rs" +bench = false + +[features] +default = ["repl", "doc"] +repl = ["nickel-lang-core/repl"] +doc = ["nickel-lang-core/doc"] + +[dependencies] +nickel-lang-core = { workspace = true, features = [ "markdown" ], default-features = false } + +clap = { workspace = true, features = ["derive"] } +serde = { workspace = true, features = ["derive"] } +directories.workspace = true + +[dev-dependencies] +nickel-lang-utils.workspace = true +test-generator.workspace = true +insta = { workspace = true, features = ["filters"] } diff --git a/nickel-lang-cli/bin/nickel.rs b/cli/bin/nickel.rs similarity index 96% rename from nickel-lang-cli/bin/nickel.rs rename to cli/bin/nickel.rs index 48f3499a..f425a572 100644 --- a/nickel-lang-cli/bin/nickel.rs +++ b/cli/bin/nickel.rs @@ -1,13 +1,13 @@ //! Entry point of the program. use core::fmt; -use nickel_lang_lib::error::{Error, IOError}; -use nickel_lang_lib::eval::cache::CacheImpl; -use nickel_lang_lib::program::Program; -use nickel_lang_lib::repl::query_print; +use nickel_lang_core::error::{Error, IOError}; +use nickel_lang_core::eval::cache::CacheImpl; +use nickel_lang_core::program::Program; +use nickel_lang_core::repl::query_print; #[cfg(feature = "repl")] -use nickel_lang_lib::repl::rustyline_frontend; -use nickel_lang_lib::term::RichTerm; -use nickel_lang_lib::{serialize, serialize::ExportFormat}; +use nickel_lang_core::repl::rustyline_frontend; +use nickel_lang_core::term::RichTerm; +use nickel_lang_core::{serialize, serialize::ExportFormat}; use std::path::{Path, PathBuf}; use std::{ fs::{self, File}, diff --git a/nickel-lang-cli/tests/snapshot/README.md b/cli/tests/snapshot/README.md similarity index 100% rename from nickel-lang-cli/tests/snapshot/README.md rename to cli/tests/snapshot/README.md diff --git a/nickel-lang-cli/tests/snapshot/inputs/docs/function.ncl b/cli/tests/snapshot/inputs/docs/function.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/docs/function.ncl rename to cli/tests/snapshot/inputs/docs/function.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/docs/record.ncl b/cli/tests/snapshot/inputs/docs/record.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/docs/record.ncl rename to cli/tests/snapshot/inputs/docs/record.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/docs/types.ncl b/cli/tests/snapshot/inputs/docs/types.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/docs/types.ncl rename to cli/tests/snapshot/inputs/docs/types.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/annotated_record_pattern_typecheck_fail.ncl b/cli/tests/snapshot/inputs/errors/annotated_record_pattern_typecheck_fail.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/annotated_record_pattern_typecheck_fail.ncl rename to cli/tests/snapshot/inputs/errors/annotated_record_pattern_typecheck_fail.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/array_at_empty_array.ncl b/cli/tests/snapshot/inputs/errors/array_at_empty_array.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/array_at_empty_array.ncl rename to cli/tests/snapshot/inputs/errors/array_at_empty_array.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/array_at_out_of_bound.ncl b/cli/tests/snapshot/inputs/errors/array_at_out_of_bound.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/array_at_out_of_bound.ncl rename to cli/tests/snapshot/inputs/errors/array_at_out_of_bound.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/array_contract_fail.ncl b/cli/tests/snapshot/inputs/errors/array_contract_fail.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/array_contract_fail.ncl rename to cli/tests/snapshot/inputs/errors/array_contract_fail.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/array_merge_fail.ncl b/cli/tests/snapshot/inputs/errors/array_merge_fail.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/array_merge_fail.ncl rename to cli/tests/snapshot/inputs/errors/array_merge_fail.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/array_range_reversed_indices.ncl b/cli/tests/snapshot/inputs/errors/array_range_reversed_indices.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/array_range_reversed_indices.ncl rename to cli/tests/snapshot/inputs/errors/array_range_reversed_indices.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/array_range_step_negative_step.ncl b/cli/tests/snapshot/inputs/errors/array_range_step_negative_step.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/array_range_step_negative_step.ncl rename to cli/tests/snapshot/inputs/errors/array_range_step_negative_step.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/blame_custom_message_ansi_escaping.ncl b/cli/tests/snapshot/inputs/errors/blame_custom_message_ansi_escaping.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/blame_custom_message_ansi_escaping.ncl rename to cli/tests/snapshot/inputs/errors/blame_custom_message_ansi_escaping.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/caller_contract_violation.ncl b/cli/tests/snapshot/inputs/errors/caller_contract_violation.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/caller_contract_violation.ncl rename to cli/tests/snapshot/inputs/errors/caller_contract_violation.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/contract_with_custom_diagnostic.ncl b/cli/tests/snapshot/inputs/errors/contract_with_custom_diagnostic.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/contract_with_custom_diagnostic.ncl rename to cli/tests/snapshot/inputs/errors/contract_with_custom_diagnostic.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/dictionary_contract_fail.ncl b/cli/tests/snapshot/inputs/errors/dictionary_contract_fail.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/dictionary_contract_fail.ncl rename to cli/tests/snapshot/inputs/errors/dictionary_contract_fail.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/enum_forall_parametricity_violation.ncl b/cli/tests/snapshot/inputs/errors/enum_forall_parametricity_violation.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/enum_forall_parametricity_violation.ncl rename to cli/tests/snapshot/inputs/errors/enum_forall_parametricity_violation.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/fun_contract_range_nested.ncl b/cli/tests/snapshot/inputs/errors/fun_contract_range_nested.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/fun_contract_range_nested.ncl rename to cli/tests/snapshot/inputs/errors/fun_contract_range_nested.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/fun_contract_range_violation.ncl b/cli/tests/snapshot/inputs/errors/fun_contract_range_violation.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/fun_contract_range_violation.ncl rename to cli/tests/snapshot/inputs/errors/fun_contract_range_violation.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/function_contract_domain_violation.ncl b/cli/tests/snapshot/inputs/errors/function_contract_domain_violation.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/function_contract_domain_violation.ncl rename to cli/tests/snapshot/inputs/errors/function_contract_domain_violation.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/function_contract_violation.ncl b/cli/tests/snapshot/inputs/errors/function_contract_violation.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/function_contract_violation.ncl rename to cli/tests/snapshot/inputs/errors/function_contract_violation.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/interpolate_record_type_field.ncl b/cli/tests/snapshot/inputs/errors/interpolate_record_type_field.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/interpolate_record_type_field.ncl rename to cli/tests/snapshot/inputs/errors/interpolate_record_type_field.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/invalid_record_type.ncl b/cli/tests/snapshot/inputs/errors/invalid_record_type.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/invalid_record_type.ncl rename to cli/tests/snapshot/inputs/errors/invalid_record_type.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/mismatched_row_record_pattern_fail.ncl b/cli/tests/snapshot/inputs/errors/mismatched_row_record_pattern_fail.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/mismatched_row_record_pattern_fail.ncl rename to cli/tests/snapshot/inputs/errors/mismatched_row_record_pattern_fail.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/nested_annotated_record_pattern_typecheck_fail.ncl b/cli/tests/snapshot/inputs/errors/nested_annotated_record_pattern_typecheck_fail.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/nested_annotated_record_pattern_typecheck_fail.ncl rename to cli/tests/snapshot/inputs/errors/nested_annotated_record_pattern_typecheck_fail.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/query_non_record.ncl b/cli/tests/snapshot/inputs/errors/query_non_record.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/query_non_record.ncl rename to cli/tests/snapshot/inputs/errors/query_non_record.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/record_access.ncl b/cli/tests/snapshot/inputs/errors/record_access.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/record_access.ncl rename to cli/tests/snapshot/inputs/errors/record_access.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/record_destructuring_duplicate_ident.ncl b/cli/tests/snapshot/inputs/errors/record_destructuring_duplicate_ident.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/record_destructuring_duplicate_ident.ncl rename to cli/tests/snapshot/inputs/errors/record_destructuring_duplicate_ident.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/record_forall_constraints_contract.ncl b/cli/tests/snapshot/inputs/errors/record_forall_constraints_contract.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/record_forall_constraints_contract.ncl rename to cli/tests/snapshot/inputs/errors/record_forall_constraints_contract.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/record_forall_constraints_typecheck.ncl b/cli/tests/snapshot/inputs/errors/record_forall_constraints_typecheck.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/record_forall_constraints_typecheck.ncl rename to cli/tests/snapshot/inputs/errors/record_forall_constraints_typecheck.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/record_forall_parametricity_violation.ncl b/cli/tests/snapshot/inputs/errors/record_forall_parametricity_violation.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/record_forall_parametricity_violation.ncl rename to cli/tests/snapshot/inputs/errors/record_forall_parametricity_violation.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/record_type_repeated_field.ncl b/cli/tests/snapshot/inputs/errors/record_type_repeated_field.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/record_type_repeated_field.ncl rename to cli/tests/snapshot/inputs/errors/record_type_repeated_field.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/simple_contract_fail.ncl b/cli/tests/snapshot/inputs/errors/simple_contract_fail.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/simple_contract_fail.ncl rename to cli/tests/snapshot/inputs/errors/simple_contract_fail.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/subcontract_nested_custom_diagnostics.ncl b/cli/tests/snapshot/inputs/errors/subcontract_nested_custom_diagnostics.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/subcontract_nested_custom_diagnostics.ncl rename to cli/tests/snapshot/inputs/errors/subcontract_nested_custom_diagnostics.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/subcontract_type_path_underline.ncl b/cli/tests/snapshot/inputs/errors/subcontract_type_path_underline.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/subcontract_type_path_underline.ncl rename to cli/tests/snapshot/inputs/errors/subcontract_type_path_underline.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/trace_not_saturated.ncl b/cli/tests/snapshot/inputs/errors/trace_not_saturated.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/trace_not_saturated.ncl rename to cli/tests/snapshot/inputs/errors/trace_not_saturated.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/typed_field_without_annotation.ncl b/cli/tests/snapshot/inputs/errors/typed_field_without_annotation.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/typed_field_without_annotation.ncl rename to cli/tests/snapshot/inputs/errors/typed_field_without_annotation.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/unification_variable_aliasing.ncl b/cli/tests/snapshot/inputs/errors/unification_variable_aliasing.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/unification_variable_aliasing.ncl rename to cli/tests/snapshot/inputs/errors/unification_variable_aliasing.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/errors/value_contract_violation.ncl b/cli/tests/snapshot/inputs/errors/value_contract_violation.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/errors/value_contract_violation.ncl rename to cli/tests/snapshot/inputs/errors/value_contract_violation.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/eval/escaping.ncl b/cli/tests/snapshot/inputs/eval/escaping.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/eval/escaping.ncl rename to cli/tests/snapshot/inputs/eval/escaping.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/eval/records.ncl b/cli/tests/snapshot/inputs/eval/records.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/eval/records.ncl rename to cli/tests/snapshot/inputs/eval/records.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/export/nested_record.ncl b/cli/tests/snapshot/inputs/export/nested_record.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/export/nested_record.ncl rename to cli/tests/snapshot/inputs/export/nested_record.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/export/not_exported_undefined.ncl b/cli/tests/snapshot/inputs/export/not_exported_undefined.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/export/not_exported_undefined.ncl rename to cli/tests/snapshot/inputs/export/not_exported_undefined.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/export/trace.ncl b/cli/tests/snapshot/inputs/export/trace.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/export/trace.ncl rename to cli/tests/snapshot/inputs/export/trace.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/pretty/multiline_doc.ncl b/cli/tests/snapshot/inputs/pretty/multiline_doc.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/pretty/multiline_doc.ncl rename to cli/tests/snapshot/inputs/pretty/multiline_doc.ncl diff --git a/nickel-lang-cli/tests/snapshot/inputs/pretty/simple_record.ncl b/cli/tests/snapshot/inputs/pretty/simple_record.ncl similarity index 100% rename from nickel-lang-cli/tests/snapshot/inputs/pretty/simple_record.ncl rename to cli/tests/snapshot/inputs/pretty/simple_record.ncl diff --git a/nickel-lang-cli/tests/snapshot/main.rs b/cli/tests/snapshot/main.rs similarity index 97% rename from nickel-lang-cli/tests/snapshot/main.rs rename to cli/tests/snapshot/main.rs index 50cd57b2..2829fe5c 100644 --- a/nickel-lang-cli/tests/snapshot/main.rs +++ b/cli/tests/snapshot/main.rs @@ -1,4 +1,4 @@ -use nickel_lang_utilities::{ +use nickel_lang_utils::{ annotated_test::{read_annotated_test_case, TestCase}, project_root::project_root, }; @@ -24,7 +24,7 @@ macro_rules! assert_snapshot_filtered { } } -#[test_resources("nickel-lang-cli/tests/snapshot/inputs/*/*.ncl")] +#[test_resources("cli/tests/snapshot/inputs/*/*.ncl")] fn check_snapshots(path: &str) { let file = TestFile::from_project_path(path); diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__doc_stderr_function.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__doc_stderr_function.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__doc_stderr_function.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__doc_stderr_function.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__doc_stdout_record.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__doc_stdout_record.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__doc_stdout_record.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__doc_stdout_record.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__doc_stdout_types.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__doc_stdout_types.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__doc_stdout_types.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__doc_stdout_types.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_annotated_record_pattern_typecheck_fail.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_annotated_record_pattern_typecheck_fail.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_annotated_record_pattern_typecheck_fail.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_annotated_record_pattern_typecheck_fail.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_array_at_empty_array.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_array_at_empty_array.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_array_at_empty_array.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_array_at_empty_array.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_array_at_out_of_bound.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_array_at_out_of_bound.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_array_at_out_of_bound.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_array_at_out_of_bound.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_array_contract_fail.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_array_contract_fail.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_array_contract_fail.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_array_contract_fail.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_array_merge_fail.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_array_merge_fail.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_array_merge_fail.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_array_merge_fail.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_array_range_reversed_indices.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_array_range_reversed_indices.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_array_range_reversed_indices.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_array_range_reversed_indices.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_array_range_step_negative_step.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_array_range_step_negative_step.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_array_range_step_negative_step.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_array_range_step_negative_step.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_blame_custom_message_ansi_escaping.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_blame_custom_message_ansi_escaping.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_blame_custom_message_ansi_escaping.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_blame_custom_message_ansi_escaping.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_caller_contract_violation.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_caller_contract_violation.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_caller_contract_violation.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_caller_contract_violation.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_contract_with_custom_diagnostic.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_contract_with_custom_diagnostic.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_contract_with_custom_diagnostic.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_contract_with_custom_diagnostic.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_dictionary_contract_fail.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_dictionary_contract_fail.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_dictionary_contract_fail.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_dictionary_contract_fail.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_enum_forall_parametricity_violation.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_enum_forall_parametricity_violation.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_enum_forall_parametricity_violation.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_enum_forall_parametricity_violation.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_fun_contract_range_nested.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_fun_contract_range_nested.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_fun_contract_range_nested.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_fun_contract_range_nested.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_fun_contract_range_violation.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_fun_contract_range_violation.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_fun_contract_range_violation.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_fun_contract_range_violation.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_function_contract_domain_violation.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_function_contract_domain_violation.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_function_contract_domain_violation.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_function_contract_domain_violation.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_function_contract_violation.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_function_contract_violation.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_function_contract_violation.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_function_contract_violation.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_interpolate_record_type_field.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_interpolate_record_type_field.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_interpolate_record_type_field.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_interpolate_record_type_field.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_invalid_record_type.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_invalid_record_type.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_invalid_record_type.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_invalid_record_type.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_mismatched_row_record_pattern_fail.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_mismatched_row_record_pattern_fail.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_mismatched_row_record_pattern_fail.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_mismatched_row_record_pattern_fail.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_nested_annotated_record_pattern_typecheck_fail.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_nested_annotated_record_pattern_typecheck_fail.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_nested_annotated_record_pattern_typecheck_fail.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_nested_annotated_record_pattern_typecheck_fail.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_record_access.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_record_access.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_record_access.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_record_access.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_record_destructuring_duplicate_ident.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_record_destructuring_duplicate_ident.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_record_destructuring_duplicate_ident.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_record_destructuring_duplicate_ident.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_record_forall_constraints_contract.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_record_forall_constraints_contract.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_record_forall_constraints_contract.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_record_forall_constraints_contract.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_record_forall_constraints_typecheck.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_record_forall_constraints_typecheck.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_record_forall_constraints_typecheck.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_record_forall_constraints_typecheck.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_record_forall_parametricity_violation.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_record_forall_parametricity_violation.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_record_forall_parametricity_violation.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_record_forall_parametricity_violation.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_record_type_repeated_field.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_record_type_repeated_field.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_record_type_repeated_field.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_record_type_repeated_field.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_simple_contract_fail.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_simple_contract_fail.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_simple_contract_fail.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_simple_contract_fail.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_subcontract_nested_custom_diagnostics.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_subcontract_nested_custom_diagnostics.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_subcontract_nested_custom_diagnostics.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_subcontract_nested_custom_diagnostics.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_subcontract_type_path_underline.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_subcontract_type_path_underline.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_subcontract_type_path_underline.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_subcontract_type_path_underline.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_trace_not_saturated.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_trace_not_saturated.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_trace_not_saturated.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_trace_not_saturated.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_typed_field_without_annotation.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_typed_field_without_annotation.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_typed_field_without_annotation.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_typed_field_without_annotation.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_unification_variable_aliasing.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_unification_variable_aliasing.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_unification_variable_aliasing.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_unification_variable_aliasing.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_value_contract_violation.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stderr_value_contract_violation.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stderr_value_contract_violation.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stderr_value_contract_violation.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stdout_escaping.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stdout_escaping.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stdout_escaping.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stdout_escaping.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stdout_records.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__error_stdout_records.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__error_stdout_records.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__error_stdout_records.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__export_stderr_trace.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__export_stderr_trace.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__export_stderr_trace.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__export_stderr_trace.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__export_stdout_nested_record.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__export_stdout_nested_record.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__export_stdout_nested_record.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__export_stdout_nested_record.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__export_stdout_not_exported_undefined.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__export_stdout_not_exported_undefined.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__export_stdout_not_exported_undefined.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__export_stdout_not_exported_undefined.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__export_stdout_trace.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__export_stdout_trace.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__export_stdout_trace.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__export_stdout_trace.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__pprint-ast_stdout_multiline_doc.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__pprint-ast_stdout_multiline_doc.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__pprint-ast_stdout_multiline_doc.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__pprint-ast_stdout_multiline_doc.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__pprint-ast_stdout_simple_record.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__pprint-ast_stdout_simple_record.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__pprint-ast_stdout_simple_record.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__pprint-ast_stdout_simple_record.ncl.snap diff --git a/nickel-lang-cli/tests/snapshot/snapshots/snapshot__query_stderr_query_non_record.ncl.snap b/cli/tests/snapshot/snapshots/snapshot__query_stderr_query_non_record.ncl.snap similarity index 100% rename from nickel-lang-cli/tests/snapshot/snapshots/snapshot__query_stderr_query_non_record.ncl.snap rename to cli/tests/snapshot/snapshots/snapshot__query_stderr_query_non_record.ncl.snap diff --git a/core/Cargo.toml b/core/Cargo.toml new file mode 100644 index 00000000..bb72c4e1 --- /dev/null +++ b/core/Cargo.toml @@ -0,0 +1,108 @@ +[package] +name = "nickel-lang-core" +version = "0.1.0" +description = "Programmable configuration files." +authors.workspace = true +edition.workspace = true +homepage.workspace = true +keywords.workspace = true +license.workspace = true +repository.workspace = true +readme.workspace = true + +[lib] +bench = false + +[features] +default = ["markdown", "repl", "doc"] +markdown = ["termimad"] +repl = ["rustyline", "rustyline-derive", "ansi_term"] +repl-wasm = ["wasm-bindgen", "js-sys", "serde_repr"] +doc = ["comrak"] + +[build-dependencies] +lalrpop.workspace = true + +[dependencies] +lalrpop-util.workspace = true +regex.workspace = true +simple-counter.workspace = true +clap = { workspace = true, features = ["derive"] } +codespan.workspace = true +codespan-reporting.workspace = true +logos.workspace = true +serde = { workspace = true, features = ["derive"] } +serde_json.workspace = true +serde_yaml.workspace = true +toml = { workspace = true, features = ["parse"] } +void.workspace = true +sha-1.workspace = true +sha2.workspace = true +md-5.workspace = true +unicode-segmentation.workspace = true +indoc.workspace = true + +termimad = { workspace = true, optional = true } +ansi_term = { workspace = true, optional = true } + +rustyline = { workspace = true, optional = true} +rustyline-derive = { workspace = true, optional = true } + +wasm-bindgen = { workspace = true, optional = true, features = ["serde-serialize"] } +serde-wasm-bindgen.workspace = true +js-sys = { workspace = true, optional = true } +serde_repr = { workspace = true, optional = true } +pretty.workspace = true + +comrak = { workspace = true, optional = true, features = [] } +once_cell.workspace = true +typed-arena.workspace = true +malachite = { workspace = true, features = ["enable_serde"] } +malachite-q.workspace = true +indexmap = { workspace = true, features = ["serde"] } +strip-ansi-escapes.workspace = true + +[dev-dependencies] +pretty_assertions.workspace = true +assert_matches.workspace = true +criterion.workspace = true +pprof = { workspace = true, features = ["criterion", "flamegraph"] } +nickel-lang-utils.workspace = true +similar.workspace = true +test-generator.workspace = true + +# Enable this to use flamegraphs +# [profile.release] +# debug = true + +[[bench]] +name = "numeric" +harness = false + +[[bench]] +name = "functions" +harness = false + +[[bench]] +name = "arrays" +harness = false + +# [[bench]] +# name = "records" +# harness = false + +[[bench]] +name = "serialization" +harness = false + +[[bench]] +name = "mantis" +harness = false + +[[bench]] +name = "stdlib" +harness = false + +[[bench]] +name = "typecheck-nixpkgs-lib" +harness = false diff --git a/nickel-lang-lib/benches/arrays.rs b/core/benches/arrays.rs similarity index 98% rename from nickel-lang-lib/benches/arrays.rs rename to core/benches/arrays.rs index 6b802537..70d16e8e 100644 --- a/nickel-lang-lib/benches/arrays.rs +++ b/core/benches/arrays.rs @@ -1,11 +1,11 @@ use std::rc::Rc; use criterion::{criterion_main, Criterion}; -use nickel_lang_lib::term::{ +use nickel_lang_core::term::{ array::{Array, ArrayAttrs}, Number, RichTerm, Term, }; -use nickel_lang_utilities::{bench::EvalMode, ncl_bench_group}; +use nickel_lang_utils::{bench::EvalMode, ncl_bench_group}; use pprof::criterion::{Output, PProfProfiler}; use pretty::{BoxAllocator, DocBuilder, Pretty}; diff --git a/nickel-lang-lib/benches/arrays/fold.ncl b/core/benches/arrays/fold.ncl similarity index 100% rename from nickel-lang-lib/benches/arrays/fold.ncl rename to core/benches/arrays/fold.ncl diff --git a/nickel-lang-lib/benches/arrays/generate.ncl b/core/benches/arrays/generate.ncl similarity index 100% rename from nickel-lang-lib/benches/arrays/generate.ncl rename to core/benches/arrays/generate.ncl diff --git a/nickel-lang-lib/benches/arrays/map.ncl b/core/benches/arrays/map.ncl similarity index 100% rename from nickel-lang-lib/benches/arrays/map.ncl rename to core/benches/arrays/map.ncl diff --git a/nickel-lang-lib/benches/arrays/pipe.ncl b/core/benches/arrays/pipe.ncl similarity index 100% rename from nickel-lang-lib/benches/arrays/pipe.ncl rename to core/benches/arrays/pipe.ncl diff --git a/nickel-lang-lib/benches/arrays/primes.ncl b/core/benches/arrays/primes.ncl similarity index 100% rename from nickel-lang-lib/benches/arrays/primes.ncl rename to core/benches/arrays/primes.ncl diff --git a/nickel-lang-lib/benches/arrays/random.ncl b/core/benches/arrays/random.ncl similarity index 100% rename from nickel-lang-lib/benches/arrays/random.ncl rename to core/benches/arrays/random.ncl diff --git a/nickel-lang-lib/benches/arrays/sort.ncl b/core/benches/arrays/sort.ncl similarity index 100% rename from nickel-lang-lib/benches/arrays/sort.ncl rename to core/benches/arrays/sort.ncl diff --git a/nickel-lang-lib/benches/arrays/sum.ncl b/core/benches/arrays/sum.ncl similarity index 100% rename from nickel-lang-lib/benches/arrays/sum.ncl rename to core/benches/arrays/sum.ncl diff --git a/nickel-lang-lib/benches/functions.rs b/core/benches/functions.rs similarity index 88% rename from nickel-lang-lib/benches/functions.rs rename to core/benches/functions.rs index ceb2aca7..28cd5f19 100644 --- a/nickel-lang-lib/benches/functions.rs +++ b/core/benches/functions.rs @@ -1,5 +1,5 @@ use criterion::{criterion_main, Criterion}; -use nickel_lang_utilities::ncl_bench_group; +use nickel_lang_utils::ncl_bench_group; use pprof::criterion::{Output, PProfProfiler}; ncl_bench_group! { diff --git a/nickel-lang-lib/benches/functions/church.ncl b/core/benches/functions/church.ncl similarity index 100% rename from nickel-lang-lib/benches/functions/church.ncl rename to core/benches/functions/church.ncl diff --git a/nickel-lang-lib/benches/lorem.txt b/core/benches/lorem.txt similarity index 100% rename from nickel-lang-lib/benches/lorem.txt rename to core/benches/lorem.txt diff --git a/nickel-lang-lib/benches/mantis.rs b/core/benches/mantis.rs similarity index 90% rename from nickel-lang-lib/benches/mantis.rs rename to core/benches/mantis.rs index 770a23de..1fff0ef2 100644 --- a/nickel-lang-lib/benches/mantis.rs +++ b/core/benches/mantis.rs @@ -1,5 +1,5 @@ use criterion::{criterion_main, Criterion}; -use nickel_lang_utilities::{bench::EvalMode, ncl_bench_group}; +use nickel_lang_utils::{bench::EvalMode, ncl_bench_group}; use pprof::criterion::{Output, PProfProfiler}; ncl_bench_group! { diff --git a/nickel-lang-lib/benches/mantis/README.md b/core/benches/mantis/README.md similarity index 100% rename from nickel-lang-lib/benches/mantis/README.md rename to core/benches/mantis/README.md diff --git a/nickel-lang-lib/benches/mantis/deploy-example.ncl b/core/benches/mantis/deploy-example.ncl similarity index 100% rename from nickel-lang-lib/benches/mantis/deploy-example.ncl rename to core/benches/mantis/deploy-example.ncl diff --git a/nickel-lang-lib/benches/mantis/deploy.ncl b/core/benches/mantis/deploy.ncl similarity index 100% rename from nickel-lang-lib/benches/mantis/deploy.ncl rename to core/benches/mantis/deploy.ncl diff --git a/nickel-lang-lib/benches/mantis/jobs/mantis.ncl b/core/benches/mantis/jobs/mantis.ncl similarity index 100% rename from nickel-lang-lib/benches/mantis/jobs/mantis.ncl rename to core/benches/mantis/jobs/mantis.ncl diff --git a/nickel-lang-lib/benches/mantis/lib.ncl b/core/benches/mantis/lib.ncl similarity index 100% rename from nickel-lang-lib/benches/mantis/lib.ncl rename to core/benches/mantis/lib.ncl diff --git a/nickel-lang-lib/benches/mantis/run.ncl b/core/benches/mantis/run.ncl similarity index 100% rename from nickel-lang-lib/benches/mantis/run.ncl rename to core/benches/mantis/run.ncl diff --git a/nickel-lang-lib/benches/mantis/schemas/nomad/types.ncl b/core/benches/mantis/schemas/nomad/types.ncl similarity index 100% rename from nickel-lang-lib/benches/mantis/schemas/nomad/types.ncl rename to core/benches/mantis/schemas/nomad/types.ncl diff --git a/nickel-lang-lib/benches/mantis/tasks/promtail.ncl b/core/benches/mantis/tasks/promtail.ncl similarity index 100% rename from nickel-lang-lib/benches/mantis/tasks/promtail.ncl rename to core/benches/mantis/tasks/promtail.ncl diff --git a/nickel-lang-lib/benches/mantis/tasks/telegraf.ncl b/core/benches/mantis/tasks/telegraf.ncl similarity index 100% rename from nickel-lang-lib/benches/mantis/tasks/telegraf.ncl rename to core/benches/mantis/tasks/telegraf.ncl diff --git a/nickel-lang-lib/benches/nixpkgs/lists.ncl b/core/benches/nixpkgs/lists.ncl similarity index 100% rename from nickel-lang-lib/benches/nixpkgs/lists.ncl rename to core/benches/nixpkgs/lists.ncl diff --git a/nickel-lang-lib/benches/numeric.rs b/core/benches/numeric.rs similarity index 94% rename from nickel-lang-lib/benches/numeric.rs rename to core/benches/numeric.rs index 15b4f695..d413c95e 100644 --- a/nickel-lang-lib/benches/numeric.rs +++ b/core/benches/numeric.rs @@ -1,5 +1,5 @@ use criterion::{criterion_main, Criterion}; -use nickel_lang_utilities::ncl_bench_group; +use nickel_lang_utils::ncl_bench_group; use pprof::criterion::{Output, PProfProfiler}; ncl_bench_group! { diff --git a/nickel-lang-lib/benches/numeric/fibonacci.ncl b/core/benches/numeric/fibonacci.ncl similarity index 100% rename from nickel-lang-lib/benches/numeric/fibonacci.ncl rename to core/benches/numeric/fibonacci.ncl diff --git a/nickel-lang-lib/benches/numeric/pidigits.ncl b/core/benches/numeric/pidigits.ncl similarity index 100% rename from nickel-lang-lib/benches/numeric/pidigits.ncl rename to core/benches/numeric/pidigits.ncl diff --git a/nickel-lang-lib/benches/numeric/reduce.ncl b/core/benches/numeric/reduce.ncl similarity index 100% rename from nickel-lang-lib/benches/numeric/reduce.ncl rename to core/benches/numeric/reduce.ncl diff --git a/nickel-lang-lib/benches/numeric/scalar.ncl b/core/benches/numeric/scalar.ncl similarity index 100% rename from nickel-lang-lib/benches/numeric/scalar.ncl rename to core/benches/numeric/scalar.ncl diff --git a/nickel-lang-lib/benches/records.rs b/core/benches/records.rs similarity index 90% rename from nickel-lang-lib/benches/records.rs rename to core/benches/records.rs index 08c301a0..d3157d9c 100644 --- a/nickel-lang-lib/benches/records.rs +++ b/core/benches/records.rs @@ -1,5 +1,5 @@ use criterion::{criterion_main, Criterion}; -use nickel_lang_utilities::{bench::EvalMode, ncl_bench_group}; +use nickel_lang_utils::{bench::EvalMode, ncl_bench_group}; use pprof::criterion::{Output, PProfProfiler}; ncl_bench_group! { diff --git a/nickel-lang-lib/benches/records/countLetters.ncl b/core/benches/records/countLetters.ncl similarity index 100% rename from nickel-lang-lib/benches/records/countLetters.ncl rename to core/benches/records/countLetters.ncl diff --git a/nickel-lang-lib/benches/records/merge.ncl b/core/benches/records/merge.ncl similarity index 100% rename from nickel-lang-lib/benches/records/merge.ncl rename to core/benches/records/merge.ncl diff --git a/nickel-lang-lib/benches/serialization.rs b/core/benches/serialization.rs similarity index 89% rename from nickel-lang-lib/benches/serialization.rs rename to core/benches/serialization.rs index ab0e99c5..d823b9fa 100644 --- a/nickel-lang-lib/benches/serialization.rs +++ b/core/benches/serialization.rs @@ -1,5 +1,5 @@ use criterion::{criterion_main, Criterion}; -use nickel_lang_utilities::ncl_bench_group; +use nickel_lang_utils::ncl_bench_group; use pprof::criterion::{Output, PProfProfiler}; ncl_bench_group! { diff --git a/nickel-lang-lib/benches/serialization/input.json b/core/benches/serialization/input.json similarity index 100% rename from nickel-lang-lib/benches/serialization/input.json rename to core/benches/serialization/input.json diff --git a/nickel-lang-lib/benches/serialization/main.ncl b/core/benches/serialization/main.ncl similarity index 100% rename from nickel-lang-lib/benches/serialization/main.ncl rename to core/benches/serialization/main.ncl diff --git a/nickel-lang-lib/benches/stdlib.rs b/core/benches/stdlib.rs similarity index 93% rename from nickel-lang-lib/benches/stdlib.rs rename to core/benches/stdlib.rs index 834fd575..e442199f 100644 --- a/nickel-lang-lib/benches/stdlib.rs +++ b/core/benches/stdlib.rs @@ -1,7 +1,7 @@ use criterion::{criterion_group, criterion_main, Criterion}; use pprof::criterion::{Output, PProfProfiler}; -use nickel_lang_lib::cache::{Cache, ErrorTolerance}; +use nickel_lang_core::cache::{Cache, ErrorTolerance}; pub fn typecheck_stdlib(c: &mut Criterion) { let mut cache = Cache::new(ErrorTolerance::Strict); diff --git a/nickel-lang-lib/benches/strings/interpolation.ncl b/core/benches/strings/interpolation.ncl similarity index 100% rename from nickel-lang-lib/benches/strings/interpolation.ncl rename to core/benches/strings/interpolation.ncl diff --git a/nickel-lang-lib/benches/typecheck-nixpkgs-lib.rs b/core/benches/typecheck-nixpkgs-lib.rs similarity index 85% rename from nickel-lang-lib/benches/typecheck-nixpkgs-lib.rs rename to core/benches/typecheck-nixpkgs-lib.rs index 7df87518..ea282109 100644 --- a/nickel-lang-lib/benches/typecheck-nixpkgs-lib.rs +++ b/core/benches/typecheck-nixpkgs-lib.rs @@ -1,5 +1,5 @@ use criterion::{criterion_main, Criterion}; -use nickel_lang_utilities::{bench::EvalMode, ncl_bench_group}; +use nickel_lang_utils::{bench::EvalMode, ncl_bench_group}; use pprof::criterion::{Output, PProfProfiler}; ncl_bench_group! { diff --git a/nickel-lang-lib/build.rs b/core/build.rs similarity index 100% rename from nickel-lang-lib/build.rs rename to core/build.rs diff --git a/nickel-lang-lib/src/cache.rs b/core/src/cache.rs similarity index 100% rename from nickel-lang-lib/src/cache.rs rename to core/src/cache.rs diff --git a/nickel-lang-lib/src/deserialize.rs b/core/src/deserialize.rs similarity index 99% rename from nickel-lang-lib/src/deserialize.rs rename to core/src/deserialize.rs index 7c9abcf3..ce660427 100644 --- a/nickel-lang-lib/src/deserialize.rs +++ b/core/src/deserialize.rs @@ -584,8 +584,8 @@ impl serde::de::Error for RustDeserializationError { mod tests { use std::io::Cursor; - use nickel_lang_utilities::{ - nickel_lang_lib::{deserialize::RustDeserializationError, term::RichTerm}, + use nickel_lang_utils::{ + nickel_lang_core::{deserialize::RustDeserializationError, term::RichTerm}, test_program::TestProgram, }; use serde::Deserialize; diff --git a/nickel-lang-lib/src/destructuring.rs b/core/src/destructuring.rs similarity index 100% rename from nickel-lang-lib/src/destructuring.rs rename to core/src/destructuring.rs diff --git a/nickel-lang-lib/src/environment.rs b/core/src/environment.rs similarity index 100% rename from nickel-lang-lib/src/environment.rs rename to core/src/environment.rs diff --git a/nickel-lang-lib/src/error.rs b/core/src/error.rs similarity index 100% rename from nickel-lang-lib/src/error.rs rename to core/src/error.rs diff --git a/nickel-lang-lib/src/eval/cache/incremental.rs b/core/src/eval/cache/incremental.rs similarity index 100% rename from nickel-lang-lib/src/eval/cache/incremental.rs rename to core/src/eval/cache/incremental.rs diff --git a/nickel-lang-lib/src/eval/cache/lazy.rs b/core/src/eval/cache/lazy.rs similarity index 100% rename from nickel-lang-lib/src/eval/cache/lazy.rs rename to core/src/eval/cache/lazy.rs diff --git a/nickel-lang-lib/src/eval/cache/mod.rs b/core/src/eval/cache/mod.rs similarity index 100% rename from nickel-lang-lib/src/eval/cache/mod.rs rename to core/src/eval/cache/mod.rs diff --git a/nickel-lang-lib/src/eval/cache_old.rs b/core/src/eval/cache_old.rs similarity index 100% rename from nickel-lang-lib/src/eval/cache_old.rs rename to core/src/eval/cache_old.rs diff --git a/nickel-lang-lib/src/eval/callstack.rs b/core/src/eval/callstack.rs similarity index 100% rename from nickel-lang-lib/src/eval/callstack.rs rename to core/src/eval/callstack.rs diff --git a/nickel-lang-lib/src/eval/fixpoint.rs b/core/src/eval/fixpoint.rs similarity index 100% rename from nickel-lang-lib/src/eval/fixpoint.rs rename to core/src/eval/fixpoint.rs diff --git a/nickel-lang-lib/src/eval/merge.rs b/core/src/eval/merge.rs similarity index 100% rename from nickel-lang-lib/src/eval/merge.rs rename to core/src/eval/merge.rs diff --git a/nickel-lang-lib/src/eval/mod.rs b/core/src/eval/mod.rs similarity index 100% rename from nickel-lang-lib/src/eval/mod.rs rename to core/src/eval/mod.rs diff --git a/nickel-lang-lib/src/eval/operation.rs b/core/src/eval/operation.rs similarity index 100% rename from nickel-lang-lib/src/eval/operation.rs rename to core/src/eval/operation.rs diff --git a/nickel-lang-lib/src/eval/stack.rs b/core/src/eval/stack.rs similarity index 100% rename from nickel-lang-lib/src/eval/stack.rs rename to core/src/eval/stack.rs diff --git a/nickel-lang-lib/src/eval/tests.rs b/core/src/eval/tests.rs similarity index 100% rename from nickel-lang-lib/src/eval/tests.rs rename to core/src/eval/tests.rs diff --git a/nickel-lang-lib/src/identifier.rs b/core/src/identifier.rs similarity index 100% rename from nickel-lang-lib/src/identifier.rs rename to core/src/identifier.rs diff --git a/nickel-lang-lib/src/label.rs b/core/src/label.rs similarity index 100% rename from nickel-lang-lib/src/label.rs rename to core/src/label.rs diff --git a/nickel-lang-lib/src/lib.rs b/core/src/lib.rs similarity index 100% rename from nickel-lang-lib/src/lib.rs rename to core/src/lib.rs diff --git a/nickel-lang-lib/src/parser/error.rs b/core/src/parser/error.rs similarity index 100% rename from nickel-lang-lib/src/parser/error.rs rename to core/src/parser/error.rs diff --git a/nickel-lang-lib/src/parser/grammar.lalrpop b/core/src/parser/grammar.lalrpop similarity index 100% rename from nickel-lang-lib/src/parser/grammar.lalrpop rename to core/src/parser/grammar.lalrpop diff --git a/nickel-lang-lib/src/parser/lexer.rs b/core/src/parser/lexer.rs similarity index 100% rename from nickel-lang-lib/src/parser/lexer.rs rename to core/src/parser/lexer.rs diff --git a/nickel-lang-lib/src/parser/mod.rs b/core/src/parser/mod.rs similarity index 100% rename from nickel-lang-lib/src/parser/mod.rs rename to core/src/parser/mod.rs diff --git a/nickel-lang-lib/src/parser/tests.rs b/core/src/parser/tests.rs similarity index 100% rename from nickel-lang-lib/src/parser/tests.rs rename to core/src/parser/tests.rs diff --git a/nickel-lang-lib/src/parser/uniterm.rs b/core/src/parser/uniterm.rs similarity index 100% rename from nickel-lang-lib/src/parser/uniterm.rs rename to core/src/parser/uniterm.rs diff --git a/nickel-lang-lib/src/parser/utils.rs b/core/src/parser/utils.rs similarity index 100% rename from nickel-lang-lib/src/parser/utils.rs rename to core/src/parser/utils.rs diff --git a/nickel-lang-lib/src/position.rs b/core/src/position.rs similarity index 100% rename from nickel-lang-lib/src/position.rs rename to core/src/position.rs diff --git a/nickel-lang-lib/src/pretty.rs b/core/src/pretty.rs similarity index 100% rename from nickel-lang-lib/src/pretty.rs rename to core/src/pretty.rs diff --git a/nickel-lang-lib/src/program.rs b/core/src/program.rs similarity index 100% rename from nickel-lang-lib/src/program.rs rename to core/src/program.rs diff --git a/nickel-lang-lib/src/repl/command.rs b/core/src/repl/command.rs similarity index 100% rename from nickel-lang-lib/src/repl/command.rs rename to core/src/repl/command.rs diff --git a/nickel-lang-lib/src/repl/mod.rs b/core/src/repl/mod.rs similarity index 100% rename from nickel-lang-lib/src/repl/mod.rs rename to core/src/repl/mod.rs diff --git a/nickel-lang-lib/src/repl/query_print.rs b/core/src/repl/query_print.rs similarity index 100% rename from nickel-lang-lib/src/repl/query_print.rs rename to core/src/repl/query_print.rs diff --git a/nickel-lang-lib/src/repl/rustyline_frontend.rs b/core/src/repl/rustyline_frontend.rs similarity index 100% rename from nickel-lang-lib/src/repl/rustyline_frontend.rs rename to core/src/repl/rustyline_frontend.rs diff --git a/nickel-lang-lib/src/repl/simple_frontend.rs b/core/src/repl/simple_frontend.rs similarity index 100% rename from nickel-lang-lib/src/repl/simple_frontend.rs rename to core/src/repl/simple_frontend.rs diff --git a/nickel-lang-lib/src/repl/wasm_frontend.rs b/core/src/repl/wasm_frontend.rs similarity index 100% rename from nickel-lang-lib/src/repl/wasm_frontend.rs rename to core/src/repl/wasm_frontend.rs diff --git a/nickel-lang-lib/src/serialize.rs b/core/src/serialize.rs similarity index 100% rename from nickel-lang-lib/src/serialize.rs rename to core/src/serialize.rs diff --git a/nickel-lang-lib/src/stdlib.rs b/core/src/stdlib.rs similarity index 100% rename from nickel-lang-lib/src/stdlib.rs rename to core/src/stdlib.rs diff --git a/nickel-lang-lib/src/term/array.rs b/core/src/term/array.rs similarity index 100% rename from nickel-lang-lib/src/term/array.rs rename to core/src/term/array.rs diff --git a/nickel-lang-lib/src/term/mod.rs b/core/src/term/mod.rs similarity index 99% rename from nickel-lang-lib/src/term/mod.rs rename to core/src/term/mod.rs index 3227f551..e26e7f80 100644 --- a/nickel-lang-lib/src/term/mod.rs +++ b/core/src/term/mod.rs @@ -1705,7 +1705,7 @@ impl std::fmt::Display for RichTerm { /// /// It is used somehow as a match statement, going from /// ``` -/// # use nickel_lang_lib::term::{RichTerm, Term}; +/// # use nickel_lang_core::term::{RichTerm, Term}; /// let rt = RichTerm::from(Term::Bool(true)); /// /// match rt.term.into_owned() { @@ -1716,8 +1716,8 @@ impl std::fmt::Display for RichTerm { /// ``` /// to /// ``` -/// # use nickel_lang_lib::term::{RichTerm, Term}; -/// # use nickel_lang_lib::match_sharedterm; +/// # use nickel_lang_core::term::{RichTerm, Term}; +/// # use nickel_lang_core::match_sharedterm; /// let rt = RichTerm::from(Term::Bool(true)); /// /// match_sharedterm!{rt.term, with { diff --git a/nickel-lang-lib/src/term/record.rs b/core/src/term/record.rs similarity index 100% rename from nickel-lang-lib/src/term/record.rs rename to core/src/term/record.rs diff --git a/nickel-lang-lib/src/term/string.rs b/core/src/term/string.rs similarity index 100% rename from nickel-lang-lib/src/term/string.rs rename to core/src/term/string.rs diff --git a/nickel-lang-lib/src/transform/desugar_destructuring.rs b/core/src/transform/desugar_destructuring.rs similarity index 100% rename from nickel-lang-lib/src/transform/desugar_destructuring.rs rename to core/src/transform/desugar_destructuring.rs diff --git a/nickel-lang-lib/src/transform/free_vars.rs b/core/src/transform/free_vars.rs similarity index 100% rename from nickel-lang-lib/src/transform/free_vars.rs rename to core/src/transform/free_vars.rs diff --git a/nickel-lang-lib/src/transform/gen_pending_contracts.rs b/core/src/transform/gen_pending_contracts.rs similarity index 100% rename from nickel-lang-lib/src/transform/gen_pending_contracts.rs rename to core/src/transform/gen_pending_contracts.rs diff --git a/nickel-lang-lib/src/transform/import_resolution.rs b/core/src/transform/import_resolution.rs similarity index 100% rename from nickel-lang-lib/src/transform/import_resolution.rs rename to core/src/transform/import_resolution.rs diff --git a/nickel-lang-lib/src/transform/mod.rs b/core/src/transform/mod.rs similarity index 100% rename from nickel-lang-lib/src/transform/mod.rs rename to core/src/transform/mod.rs diff --git a/nickel-lang-lib/src/transform/share_normal_form.rs b/core/src/transform/share_normal_form.rs similarity index 100% rename from nickel-lang-lib/src/transform/share_normal_form.rs rename to core/src/transform/share_normal_form.rs diff --git a/nickel-lang-lib/src/transform/substitute_wildcards.rs b/core/src/transform/substitute_wildcards.rs similarity index 100% rename from nickel-lang-lib/src/transform/substitute_wildcards.rs rename to core/src/transform/substitute_wildcards.rs diff --git a/nickel-lang-lib/src/typecheck/destructuring.rs b/core/src/typecheck/destructuring.rs similarity index 100% rename from nickel-lang-lib/src/typecheck/destructuring.rs rename to core/src/typecheck/destructuring.rs diff --git a/nickel-lang-lib/src/typecheck/eq.rs b/core/src/typecheck/eq.rs similarity index 100% rename from nickel-lang-lib/src/typecheck/eq.rs rename to core/src/typecheck/eq.rs diff --git a/nickel-lang-lib/src/typecheck/error.rs b/core/src/typecheck/error.rs similarity index 100% rename from nickel-lang-lib/src/typecheck/error.rs rename to core/src/typecheck/error.rs diff --git a/nickel-lang-lib/src/typecheck/linearization.rs b/core/src/typecheck/linearization.rs similarity index 100% rename from nickel-lang-lib/src/typecheck/linearization.rs rename to core/src/typecheck/linearization.rs diff --git a/nickel-lang-lib/src/typecheck/mk_uniftype.rs b/core/src/typecheck/mk_uniftype.rs similarity index 100% rename from nickel-lang-lib/src/typecheck/mk_uniftype.rs rename to core/src/typecheck/mk_uniftype.rs diff --git a/nickel-lang-lib/src/typecheck/mod.rs b/core/src/typecheck/mod.rs similarity index 100% rename from nickel-lang-lib/src/typecheck/mod.rs rename to core/src/typecheck/mod.rs diff --git a/nickel-lang-lib/src/typecheck/operation.rs b/core/src/typecheck/operation.rs similarity index 100% rename from nickel-lang-lib/src/typecheck/operation.rs rename to core/src/typecheck/operation.rs diff --git a/nickel-lang-lib/src/typecheck/reporting.rs b/core/src/typecheck/reporting.rs similarity index 100% rename from nickel-lang-lib/src/typecheck/reporting.rs rename to core/src/typecheck/reporting.rs diff --git a/nickel-lang-lib/src/types.rs b/core/src/types.rs similarity index 100% rename from nickel-lang-lib/src/types.rs rename to core/src/types.rs diff --git a/nickel-lang-lib/stdlib/internals.ncl b/core/stdlib/internals.ncl similarity index 100% rename from nickel-lang-lib/stdlib/internals.ncl rename to core/stdlib/internals.ncl diff --git a/nickel-lang-lib/stdlib/std.ncl b/core/stdlib/std.ncl similarity index 100% rename from nickel-lang-lib/stdlib/std.ncl rename to core/stdlib/std.ncl diff --git a/nickel-lang-lib/tests/README.md b/core/tests/README.md similarity index 89% rename from nickel-lang-lib/tests/README.md rename to core/tests/README.md index fa8122cc..8a0a2fb9 100644 --- a/nickel-lang-lib/tests/README.md +++ b/core/tests/README.md @@ -30,6 +30,6 @@ for more information. ## Where are the snapshot tests? Our current implementation of snapshot tests relies on the Nickel interpreter -binary. Because of this they were moved to the `nickel-lang` CLI crate when it -was split out from the core `nickel-lang-lib` crate. Eventually, it would be -nice to reintegrate snapshot tests for error messages into `nickel-lang`. +binary. Because of this they were moved to the `nickel-lang-cli` CLI crate when it +was split out from the core `nickel-lang-core` crate. Eventually, it would be +nice to reintegrate snapshot tests for error messages into `nickel-lang-core`. diff --git a/nickel-lang-lib/tests/examples/main.rs b/core/tests/examples/main.rs similarity index 93% rename from nickel-lang-lib/tests/examples/main.rs rename to core/tests/examples/main.rs index f7cf29df..05e863dd 100644 --- a/nickel-lang-lib/tests/examples/main.rs +++ b/core/tests/examples/main.rs @@ -1,6 +1,6 @@ use assert_matches::assert_matches; -use nickel_lang_lib::error::{Error, EvalError}; -use nickel_lang_utilities::{ +use nickel_lang_core::error::{Error, EvalError}; +use nickel_lang_utils::{ annotated_test::{read_annotated_test_case, TestCase}, project_root::project_root, test_program::TestProgram, diff --git a/nickel-lang-lib/tests/integration/contract_label_path.rs b/core/tests/integration/contract_label_path.rs similarity index 89% rename from nickel-lang-lib/tests/integration/contract_label_path.rs rename to core/tests/integration/contract_label_path.rs index 45a75f92..ec809a4e 100644 --- a/nickel-lang-lib/tests/integration/contract_label_path.rs +++ b/core/tests/integration/contract_label_path.rs @@ -1,12 +1,12 @@ use assert_matches::assert_matches; use codespan::Files; -use nickel_lang_lib::error::{Error, EvalError, IntoDiagnostics}; +use nickel_lang_core::error::{Error, EvalError, IntoDiagnostics}; -use nickel_lang_utilities::test_program::eval; +use nickel_lang_utils::test_program::eval; #[test] fn array_contracts_label_path_is_set_correctly() { - use nickel_lang_lib::label::ty_path::Elem; + use nickel_lang_core::label::ty_path::Elem; let res = eval("%force% ([{a = [1]}] | Array {a: Array String}) false"); match &res { @@ -42,7 +42,7 @@ fn array_contracts_label_path_is_set_correctly() { #[test] fn dictionary_contracts_label_path_is_set_correctly() { - use nickel_lang_lib::label::ty_path::Elem; + use nickel_lang_core::label::ty_path::Elem; let res = eval("%force% ({foo = 1} | {_ | String}) false"); match &res { diff --git a/nickel-lang-lib/tests/integration/contracts_fail.rs b/core/tests/integration/contracts_fail.rs similarity index 89% rename from nickel-lang-lib/tests/integration/contracts_fail.rs rename to core/tests/integration/contracts_fail.rs index 9e628c6a..63982ed0 100644 --- a/nickel-lang-lib/tests/integration/contracts_fail.rs +++ b/core/tests/integration/contracts_fail.rs @@ -1,12 +1,12 @@ use assert_matches::assert_matches; use codespan::Files; -use nickel_lang_lib::error::{Error, EvalError, IntoDiagnostics}; +use nickel_lang_core::error::{Error, EvalError, IntoDiagnostics}; -use nickel_lang_utilities::test_program::eval; +use nickel_lang_utils::test_program::eval; #[test] fn array() { - use nickel_lang_lib::label::ty_path::Elem; + use nickel_lang_core::label::ty_path::Elem; let res = eval("%force% ([{a = [1]}] | Array {a: Array String}) false"); match &res { @@ -42,7 +42,7 @@ fn array() { #[test] fn dictionary() { - use nickel_lang_lib::label::ty_path::Elem; + use nickel_lang_core::label::ty_path::Elem; let res = eval("%force% ({foo = 1} | {_ | String}) false"); match &res { diff --git a/nickel-lang-lib/tests/integration/destructuring/assign_fail.ncl b/core/tests/integration/destructuring/assign_fail.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/destructuring/assign_fail.ncl rename to core/tests/integration/destructuring/assign_fail.ncl diff --git a/nickel-lang-lib/tests/integration/destructuring/closed_fail.ncl b/core/tests/integration/destructuring/closed_fail.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/destructuring/closed_fail.ncl rename to core/tests/integration/destructuring/closed_fail.ncl diff --git a/nickel-lang-lib/tests/integration/destructuring/nonexistent_idents.ncl b/core/tests/integration/destructuring/nonexistent_idents.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/destructuring/nonexistent_idents.ncl rename to core/tests/integration/destructuring/nonexistent_idents.ncl diff --git a/nickel-lang-lib/tests/integration/destructuring/pass/assign.ncl b/core/tests/integration/destructuring/pass/assign.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/destructuring/pass/assign.ncl rename to core/tests/integration/destructuring/pass/assign.ncl diff --git a/nickel-lang-lib/tests/integration/destructuring/pass/atbind.ncl b/core/tests/integration/destructuring/pass/atbind.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/destructuring/pass/atbind.ncl rename to core/tests/integration/destructuring/pass/atbind.ncl diff --git a/nickel-lang-lib/tests/integration/destructuring/pass/default.ncl b/core/tests/integration/destructuring/pass/default.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/destructuring/pass/default.ncl rename to core/tests/integration/destructuring/pass/default.ncl diff --git a/nickel-lang-lib/tests/integration/destructuring/pass/fun.ncl b/core/tests/integration/destructuring/pass/fun.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/destructuring/pass/fun.ncl rename to core/tests/integration/destructuring/pass/fun.ncl diff --git a/nickel-lang-lib/tests/integration/destructuring/pass/mixed.ncl b/core/tests/integration/destructuring/pass/mixed.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/destructuring/pass/mixed.ncl rename to core/tests/integration/destructuring/pass/mixed.ncl diff --git a/nickel-lang-lib/tests/integration/destructuring/pass/nested.ncl b/core/tests/integration/destructuring/pass/nested.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/destructuring/pass/nested.ncl rename to core/tests/integration/destructuring/pass/nested.ncl diff --git a/nickel-lang-lib/tests/integration/destructuring/pass/nested_duplicated_ident.ncl b/core/tests/integration/destructuring/pass/nested_duplicated_ident.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/destructuring/pass/nested_duplicated_ident.ncl rename to core/tests/integration/destructuring/pass/nested_duplicated_ident.ncl diff --git a/nickel-lang-lib/tests/integration/destructuring/pass/open.ncl b/core/tests/integration/destructuring/pass/open.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/destructuring/pass/open.ncl rename to core/tests/integration/destructuring/pass/open.ncl diff --git a/nickel-lang-lib/tests/integration/destructuring/pass/preserves_types.ncl b/core/tests/integration/destructuring/pass/preserves_types.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/destructuring/pass/preserves_types.ncl rename to core/tests/integration/destructuring/pass/preserves_types.ncl diff --git a/nickel-lang-lib/tests/integration/destructuring/pass/rest.ncl b/core/tests/integration/destructuring/pass/rest.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/destructuring/pass/rest.ncl rename to core/tests/integration/destructuring/pass/rest.ncl diff --git a/nickel-lang-lib/tests/integration/destructuring/pass/simple.ncl b/core/tests/integration/destructuring/pass/simple.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/destructuring/pass/simple.ncl rename to core/tests/integration/destructuring/pass/simple.ncl diff --git a/nickel-lang-lib/tests/integration/destructuring/pass/type_annotations.ncl b/core/tests/integration/destructuring/pass/type_annotations.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/destructuring/pass/type_annotations.ncl rename to core/tests/integration/destructuring/pass/type_annotations.ncl diff --git a/nickel-lang-lib/tests/integration/destructuring/pass/typecontract.ncl b/core/tests/integration/destructuring/pass/typecontract.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/destructuring/pass/typecontract.ncl rename to core/tests/integration/destructuring/pass/typecontract.ncl diff --git a/nickel-lang-lib/tests/integration/destructuring/repeated_ident.ncl b/core/tests/integration/destructuring/repeated_ident.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/destructuring/repeated_ident.ncl rename to core/tests/integration/destructuring/repeated_ident.ncl diff --git a/nickel-lang-lib/tests/integration/destructuring/repeated_ident_typed.ncl b/core/tests/integration/destructuring/repeated_ident_typed.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/destructuring/repeated_ident_typed.ncl rename to core/tests/integration/destructuring/repeated_ident_typed.ncl diff --git a/nickel-lang-lib/tests/integration/destructuring/rest_fail.ncl b/core/tests/integration/destructuring/rest_fail.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/destructuring/rest_fail.ncl rename to core/tests/integration/destructuring/rest_fail.ncl diff --git a/nickel-lang-lib/tests/integration/destructuring/type_mismatch_fail.ncl b/core/tests/integration/destructuring/type_mismatch_fail.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/destructuring/type_mismatch_fail.ncl rename to core/tests/integration/destructuring/type_mismatch_fail.ncl diff --git a/nickel-lang-lib/tests/integration/destructuring/type_mismatch_field_pattern_fail.ncl b/core/tests/integration/destructuring/type_mismatch_field_pattern_fail.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/destructuring/type_mismatch_field_pattern_fail.ncl rename to core/tests/integration/destructuring/type_mismatch_field_pattern_fail.ncl diff --git a/nickel-lang-lib/tests/integration/destructuring/type_mismatch_nested_destructuring_fail.ncl b/core/tests/integration/destructuring/type_mismatch_nested_destructuring_fail.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/destructuring/type_mismatch_nested_destructuring_fail.ncl rename to core/tests/integration/destructuring/type_mismatch_nested_destructuring_fail.ncl diff --git a/nickel-lang-lib/tests/integration/destructuring/typecontract_fail.ncl b/core/tests/integration/destructuring/typecontract_fail.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/destructuring/typecontract_fail.ncl rename to core/tests/integration/destructuring/typecontract_fail.ncl diff --git a/nickel-lang-lib/tests/integration/fail/arrays/elem_at_empty_array.ncl b/core/tests/integration/fail/arrays/elem_at_empty_array.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/arrays/elem_at_empty_array.ncl rename to core/tests/integration/fail/arrays/elem_at_empty_array.ncl diff --git a/nickel-lang-lib/tests/integration/fail/arrays/elem_at_index_out_of_bounds.ncl b/core/tests/integration/fail/arrays/elem_at_index_out_of_bounds.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/arrays/elem_at_index_out_of_bounds.ncl rename to core/tests/integration/fail/arrays/elem_at_index_out_of_bounds.ncl diff --git a/nickel-lang-lib/tests/integration/fail/arrays/elem_at_negative_index.ncl b/core/tests/integration/fail/arrays/elem_at_negative_index.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/arrays/elem_at_negative_index.ncl rename to core/tests/integration/fail/arrays/elem_at_negative_index.ncl diff --git a/nickel-lang-lib/tests/integration/fail/arrays/elem_at_non_array_arg.ncl b/core/tests/integration/fail/arrays/elem_at_non_array_arg.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/arrays/elem_at_non_array_arg.ncl rename to core/tests/integration/fail/arrays/elem_at_non_array_arg.ncl diff --git a/nickel-lang-lib/tests/integration/fail/arrays/elem_at_non_int_index.ncl b/core/tests/integration/fail/arrays/elem_at_non_int_index.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/arrays/elem_at_non_int_index.ncl rename to core/tests/integration/fail/arrays/elem_at_non_int_index.ncl diff --git a/nickel-lang-lib/tests/integration/fail/arrays/slice_empty_array.ncl b/core/tests/integration/fail/arrays/slice_empty_array.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/arrays/slice_empty_array.ncl rename to core/tests/integration/fail/arrays/slice_empty_array.ncl diff --git a/nickel-lang-lib/tests/integration/fail/arrays/slice_non_array.ncl b/core/tests/integration/fail/arrays/slice_non_array.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/arrays/slice_non_array.ncl rename to core/tests/integration/fail/arrays/slice_non_array.ncl diff --git a/nickel-lang-lib/tests/integration/fail/arrays/stdlib_at_non_array_arg_raises_blame.ncl b/core/tests/integration/fail/arrays/stdlib_at_non_array_arg_raises_blame.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/arrays/stdlib_at_non_array_arg_raises_blame.ncl rename to core/tests/integration/fail/arrays/stdlib_at_non_array_arg_raises_blame.ncl diff --git a/nickel-lang-lib/tests/integration/fail/arrays/stdlib_at_non_number_arg_raises_blame.ncl b/core/tests/integration/fail/arrays/stdlib_at_non_number_arg_raises_blame.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/arrays/stdlib_at_non_number_arg_raises_blame.ncl rename to core/tests/integration/fail/arrays/stdlib_at_non_number_arg_raises_blame.ncl diff --git a/nickel-lang-lib/tests/integration/fail/arrays/stdlib_drop_first_non_array_arg.ncl b/core/tests/integration/fail/arrays/stdlib_drop_first_non_array_arg.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/arrays/stdlib_drop_first_non_array_arg.ncl rename to core/tests/integration/fail/arrays/stdlib_drop_first_non_array_arg.ncl diff --git a/nickel-lang-lib/tests/integration/fail/arrays/stdlib_first_non_array_arg.ncl b/core/tests/integration/fail/arrays/stdlib_first_non_array_arg.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/arrays/stdlib_first_non_array_arg.ncl rename to core/tests/integration/fail/arrays/stdlib_first_non_array_arg.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/and_bool_contract_fail.ncl b/core/tests/integration/fail/contracts/and_bool_contract_fail.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/and_bool_contract_fail.ncl rename to core/tests/integration/fail/contracts/and_bool_contract_fail.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/and_number_bool.ncl b/core/tests/integration/fail/contracts/and_number_bool.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/and_number_bool.ncl rename to core/tests/integration/fail/contracts/and_number_bool.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/array_contract_bad_element.ncl b/core/tests/integration/fail/contracts/array_contract_bad_element.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/array_contract_bad_element.ncl rename to core/tests/integration/fail/contracts/array_contract_bad_element.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/array_contract_fn_is_not_an_array.ncl b/core/tests/integration/fail/contracts/array_contract_fn_is_not_an_array.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/array_contract_fn_is_not_an_array.ncl rename to core/tests/integration/fail/contracts/array_contract_fn_is_not_an_array.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/array_contract_num_is_not_an_array.ncl b/core/tests/integration/fail/contracts/array_contract_num_is_not_an_array.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/array_contract_num_is_not_an_array.ncl rename to core/tests/integration/fail/contracts/array_contract_num_is_not_an_array.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/basic_custom_contract.ncl b/core/tests/integration/fail/contracts/basic_custom_contract.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/basic_custom_contract.ncl rename to core/tests/integration/fail/contracts/basic_custom_contract.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/contract_applies_to_default_value.ncl b/core/tests/integration/fail/contracts/contract_applies_to_default_value.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/contract_applies_to_default_value.ncl rename to core/tests/integration/fail/contracts/contract_applies_to_default_value.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/contracts_dont_capture_type_vars.ncl b/core/tests/integration/fail/contracts/contracts_dont_capture_type_vars.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/contracts_dont_capture_type_vars.ncl rename to core/tests/integration/fail/contracts/contracts_dont_capture_type_vars.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/dictionary_contract_propagates_through_merge.ncl b/core/tests/integration/fail/contracts/dictionary_contract_propagates_through_merge.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/dictionary_contract_propagates_through_merge.ncl rename to core/tests/integration/fail/contracts/dictionary_contract_propagates_through_merge.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/div_by_zero.ncl b/core/tests/integration/fail/contracts/div_by_zero.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/div_by_zero.ncl rename to core/tests/integration/fail/contracts/div_by_zero.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/enum_contract_empty_enum.ncl b/core/tests/integration/fail/contracts/enum_contract_empty_enum.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/enum_contract_empty_enum.ncl rename to core/tests/integration/fail/contracts/enum_contract_empty_enum.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/enum_contract_missing_variant.ncl b/core/tests/integration/fail/contracts/enum_contract_missing_variant.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/enum_contract_missing_variant.ncl rename to core/tests/integration/fail/contracts/enum_contract_missing_variant.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/enum_contract_non_enum_value.ncl b/core/tests/integration/fail/contracts/enum_contract_non_enum_value.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/enum_contract_non_enum_value.ncl rename to core/tests/integration/fail/contracts/enum_contract_non_enum_value.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/equating_fns_lhs.ncl b/core/tests/integration/fail/contracts/equating_fns_lhs.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/equating_fns_lhs.ncl rename to core/tests/integration/fail/contracts/equating_fns_lhs.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/equating_fns_rhs.ncl b/core/tests/integration/fail/contracts/equating_fns_rhs.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/equating_fns_rhs.ncl rename to core/tests/integration/fail/contracts/equating_fns_rhs.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/poly_record_contract_bad_field.ncl b/core/tests/integration/fail/contracts/poly_record_contract_bad_field.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/poly_record_contract_bad_field.ncl rename to core/tests/integration/fail/contracts/poly_record_contract_bad_field.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/poly_record_contract_empty_record.ncl b/core/tests/integration/fail/contracts/poly_record_contract_empty_record.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/poly_record_contract_empty_record.ncl rename to core/tests/integration/fail/contracts/poly_record_contract_empty_record.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/poly_record_contract_higher_order_fn.ncl b/core/tests/integration/fail/contracts/poly_record_contract_higher_order_fn.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/poly_record_contract_higher_order_fn.ncl rename to core/tests/integration/fail/contracts/poly_record_contract_higher_order_fn.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/poly_record_contract_map_sealed_tail.ncl b/core/tests/integration/fail/contracts/poly_record_contract_map_sealed_tail.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/poly_record_contract_map_sealed_tail.ncl rename to core/tests/integration/fail/contracts/poly_record_contract_map_sealed_tail.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/poly_record_contract_merge_sealed_tail_lhs.ncl b/core/tests/integration/fail/contracts/poly_record_contract_merge_sealed_tail_lhs.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/poly_record_contract_merge_sealed_tail_lhs.ncl rename to core/tests/integration/fail/contracts/poly_record_contract_merge_sealed_tail_lhs.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/poly_record_contract_merge_sealed_tail_rhs.ncl b/core/tests/integration/fail/contracts/poly_record_contract_merge_sealed_tail_rhs.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/poly_record_contract_merge_sealed_tail_rhs.ncl rename to core/tests/integration/fail/contracts/poly_record_contract_merge_sealed_tail_rhs.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/poly_record_contract_missing_field.ncl b/core/tests/integration/fail/contracts/poly_record_contract_missing_field.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/poly_record_contract_missing_field.ncl rename to core/tests/integration/fail/contracts/poly_record_contract_missing_field.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/poly_record_contract_return_val_without_tail.ncl b/core/tests/integration/fail/contracts/poly_record_contract_return_val_without_tail.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/poly_record_contract_return_val_without_tail.ncl rename to core/tests/integration/fail/contracts/poly_record_contract_return_val_without_tail.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/poly_record_contract_return_val_wrong_tail.ncl b/core/tests/integration/fail/contracts/poly_record_contract_return_val_wrong_tail.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/poly_record_contract_return_val_wrong_tail.ncl rename to core/tests/integration/fail/contracts/poly_record_contract_return_val_wrong_tail.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/poly_record_contract_sealed_tail_dynamic_access.ncl b/core/tests/integration/fail/contracts/poly_record_contract_sealed_tail_dynamic_access.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/poly_record_contract_sealed_tail_dynamic_access.ncl rename to core/tests/integration/fail/contracts/poly_record_contract_sealed_tail_dynamic_access.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/poly_record_contract_sealed_tail_remove_field.ncl b/core/tests/integration/fail/contracts/poly_record_contract_sealed_tail_remove_field.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/poly_record_contract_sealed_tail_remove_field.ncl rename to core/tests/integration/fail/contracts/poly_record_contract_sealed_tail_remove_field.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/poly_record_contract_sealed_tail_static_access.ncl b/core/tests/integration/fail/contracts/poly_record_contract_sealed_tail_static_access.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/poly_record_contract_sealed_tail_static_access.ncl rename to core/tests/integration/fail/contracts/poly_record_contract_sealed_tail_static_access.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/polymorphic_function_contract.ncl b/core/tests/integration/fail/contracts/polymorphic_function_contract.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/polymorphic_function_contract.ncl rename to core/tests/integration/fail/contracts/polymorphic_function_contract.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/record_contract_bad_field.ncl b/core/tests/integration/fail/contracts/record_contract_bad_field.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/record_contract_bad_field.ncl rename to core/tests/integration/fail/contracts/record_contract_bad_field.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/record_contract_constraint.ncl b/core/tests/integration/fail/contracts/record_contract_constraint.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/record_contract_constraint.ncl rename to core/tests/integration/fail/contracts/record_contract_constraint.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/record_contract_empty_record.ncl b/core/tests/integration/fail/contracts/record_contract_empty_record.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/record_contract_empty_record.ncl rename to core/tests/integration/fail/contracts/record_contract_empty_record.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/record_contract_extra_field.ncl b/core/tests/integration/fail/contracts/record_contract_extra_field.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/record_contract_extra_field.ncl rename to core/tests/integration/fail/contracts/record_contract_extra_field.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/record_contract_missing_field.ncl b/core/tests/integration/fail/contracts/record_contract_missing_field.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/record_contract_missing_field.ncl rename to core/tests/integration/fail/contracts/record_contract_missing_field.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/record_contract_nested_extra_field.ncl b/core/tests/integration/fail/contracts/record_contract_nested_extra_field.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/record_contract_nested_extra_field.ncl rename to core/tests/integration/fail/contracts/record_contract_nested_extra_field.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/record_contract_nested_failure.ncl b/core/tests/integration/fail/contracts/record_contract_nested_failure.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/record_contract_nested_failure.ncl rename to core/tests/integration/fail/contracts/record_contract_nested_failure.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/record_contract_nested_missing_field.ncl b/core/tests/integration/fail/contracts/record_contract_nested_missing_field.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/record_contract_nested_missing_field.ncl rename to core/tests/integration/fail/contracts/record_contract_nested_missing_field.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/type_annot_inline.ncl b/core/tests/integration/fail/contracts/type_annot_inline.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/type_annot_inline.ncl rename to core/tests/integration/fail/contracts/type_annot_inline.ncl diff --git a/nickel-lang-lib/tests/integration/fail/contracts/type_annot_let.ncl b/core/tests/integration/fail/contracts/type_annot_let.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/contracts/type_annot_let.ncl rename to core/tests/integration/fail/contracts/type_annot_let.ncl diff --git a/nickel-lang-lib/tests/integration/fail/core/comparison_ge_string_string.ncl b/core/tests/integration/fail/core/comparison_ge_string_string.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/core/comparison_ge_string_string.ncl rename to core/tests/integration/fail/core/comparison_ge_string_string.ncl diff --git a/nickel-lang-lib/tests/integration/fail/core/comparison_geq_string_string.ncl b/core/tests/integration/fail/core/comparison_geq_string_string.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/core/comparison_geq_string_string.ncl rename to core/tests/integration/fail/core/comparison_geq_string_string.ncl diff --git a/nickel-lang-lib/tests/integration/fail/core/comparison_le_number_bool.ncl b/core/tests/integration/fail/core/comparison_le_number_bool.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/core/comparison_le_number_bool.ncl rename to core/tests/integration/fail/core/comparison_le_number_bool.ncl diff --git a/nickel-lang-lib/tests/integration/fail/core/comparison_le_string_number.ncl b/core/tests/integration/fail/core/comparison_le_string_number.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/core/comparison_le_string_number.ncl rename to core/tests/integration/fail/core/comparison_le_string_number.ncl diff --git a/nickel-lang-lib/tests/integration/fail/core/comparison_leq_bool_array.ncl b/core/tests/integration/fail/core/comparison_leq_bool_array.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/core/comparison_leq_bool_array.ncl rename to core/tests/integration/fail/core/comparison_leq_bool_array.ncl diff --git a/nickel-lang-lib/tests/integration/fail/core/or_string_bool.ncl b/core/tests/integration/fail/core/or_string_bool.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/core/or_string_bool.ncl rename to core/tests/integration/fail/core/or_string_bool.ncl diff --git a/nickel-lang-lib/tests/integration/fail/core/string_interpolation_number.ncl b/core/tests/integration/fail/core/string_interpolation_number.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/core/string_interpolation_number.ncl rename to core/tests/integration/fail/core/string_interpolation_number.ncl diff --git a/nickel-lang-lib/tests/integration/fail/infinite_loops/mutually_recursive_functions.ncl b/core/tests/integration/fail/infinite_loops/mutually_recursive_functions.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/infinite_loops/mutually_recursive_functions.ncl rename to core/tests/integration/fail/infinite_loops/mutually_recursive_functions.ncl diff --git a/nickel-lang-lib/tests/integration/fail/infinite_loops/x_eq_expr_involving_x.ncl b/core/tests/integration/fail/infinite_loops/x_eq_expr_involving_x.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/infinite_loops/x_eq_expr_involving_x.ncl rename to core/tests/integration/fail/infinite_loops/x_eq_expr_involving_x.ncl diff --git a/nickel-lang-lib/tests/integration/fail/infinite_loops/x_eq_x.ncl b/core/tests/integration/fail/infinite_loops/x_eq_x.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/infinite_loops/x_eq_x.ncl rename to core/tests/integration/fail/infinite_loops/x_eq_x.ncl diff --git a/nickel-lang-lib/tests/integration/fail/infinite_loops/x_eq_y_eq_z_eq_x.ncl b/core/tests/integration/fail/infinite_loops/x_eq_y_eq_z_eq_x.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/infinite_loops/x_eq_y_eq_z_eq_x.ncl rename to core/tests/integration/fail/infinite_loops/x_eq_y_eq_z_eq_x.ncl diff --git a/nickel-lang-lib/tests/integration/fail/merging/merge_compose_contract.ncl b/core/tests/integration/fail/merging/merge_compose_contract.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/merging/merge_compose_contract.ncl rename to core/tests/integration/fail/merging/merge_compose_contract.ncl diff --git a/nickel-lang-lib/tests/integration/fail/merging/merge_conflict_inside_metavalue.ncl b/core/tests/integration/fail/merging/merge_conflict_inside_metavalue.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/merging/merge_conflict_inside_metavalue.ncl rename to core/tests/integration/fail/merging/merge_conflict_inside_metavalue.ncl diff --git a/nickel-lang-lib/tests/integration/fail/merging/merge_contract.ncl b/core/tests/integration/fail/merging/merge_contract.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/merging/merge_contract.ncl rename to core/tests/integration/fail/merging/merge_contract.ncl diff --git a/nickel-lang-lib/tests/integration/fail/merging/merge_default_contract.ncl b/core/tests/integration/fail/merging/merge_default_contract.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/merging/merge_default_contract.ncl rename to core/tests/integration/fail/merging/merge_default_contract.ncl diff --git a/nickel-lang-lib/tests/integration/fail/parsing/type_var_outside_forall.ncl b/core/tests/integration/fail/parsing/type_var_outside_forall.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/parsing/type_var_outside_forall.ncl rename to core/tests/integration/fail/parsing/type_var_outside_forall.ncl diff --git a/nickel-lang-lib/tests/integration/fail/parsing/unbound_record_tail_var.ncl b/core/tests/integration/fail/parsing/unbound_record_tail_var.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/parsing/unbound_record_tail_var.ncl rename to core/tests/integration/fail/parsing/unbound_record_tail_var.ncl diff --git a/nickel-lang-lib/tests/integration/fail/parsing/unbound_type_variable.ncl b/core/tests/integration/fail/parsing/unbound_type_variable.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/parsing/unbound_type_variable.ncl rename to core/tests/integration/fail/parsing/unbound_type_variable.ncl diff --git a/nickel-lang-lib/tests/integration/fail/parsing/unbound_var_in_contract.ncl b/core/tests/integration/fail/parsing/unbound_var_in_contract.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/parsing/unbound_var_in_contract.ncl rename to core/tests/integration/fail/parsing/unbound_var_in_contract.ncl diff --git a/nickel-lang-lib/tests/integration/fail/parsing/unexpected_token/buried.ncl b/core/tests/integration/fail/parsing/unexpected_token/buried.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/parsing/unexpected_token/buried.ncl rename to core/tests/integration/fail/parsing/unexpected_token/buried.ncl diff --git a/nickel-lang-lib/tests/integration/fail/parsing/unexpected_token/dollar.ncl b/core/tests/integration/fail/parsing/unexpected_token/dollar.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/parsing/unexpected_token/dollar.ncl rename to core/tests/integration/fail/parsing/unexpected_token/dollar.ncl diff --git a/nickel-lang-lib/tests/integration/fail/parsing/unexpected_token/in_record.ncl b/core/tests/integration/fail/parsing/unexpected_token/in_record.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/parsing/unexpected_token/in_record.ncl rename to core/tests/integration/fail/parsing/unexpected_token/in_record.ncl diff --git a/nickel-lang-lib/tests/integration/fail/records/cannot_use_dynamic_fields_recursively.ncl b/core/tests/integration/fail/records/cannot_use_dynamic_fields_recursively.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/records/cannot_use_dynamic_fields_recursively.ncl rename to core/tests/integration/fail/records/cannot_use_dynamic_fields_recursively.ncl diff --git a/nickel-lang-lib/tests/integration/fail/records/dynamic_field_missing.ncl b/core/tests/integration/fail/records/dynamic_field_missing.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/records/dynamic_field_missing.ncl rename to core/tests/integration/fail/records/dynamic_field_missing.ncl diff --git a/nickel-lang-lib/tests/integration/fail/records/merge_different_vals_both_force.ncl b/core/tests/integration/fail/records/merge_different_vals_both_force.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/records/merge_different_vals_both_force.ncl rename to core/tests/integration/fail/records/merge_different_vals_both_force.ncl diff --git a/nickel-lang-lib/tests/integration/fail/records/merge_different_vals_default_prio.ncl b/core/tests/integration/fail/records/merge_different_vals_default_prio.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/records/merge_different_vals_default_prio.ncl rename to core/tests/integration/fail/records/merge_different_vals_default_prio.ncl diff --git a/nickel-lang-lib/tests/integration/fail/records/merge_different_vals_no_priority.ncl b/core/tests/integration/fail/records/merge_different_vals_no_priority.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/records/merge_different_vals_no_priority.ncl rename to core/tests/integration/fail/records/merge_different_vals_no_priority.ncl diff --git a/nickel-lang-lib/tests/integration/fail/records/merge_nested_different_vals_default_prio.ncl b/core/tests/integration/fail/records/merge_nested_different_vals_default_prio.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/records/merge_nested_different_vals_default_prio.ncl rename to core/tests/integration/fail/records/merge_nested_different_vals_default_prio.ncl diff --git a/nickel-lang-lib/tests/integration/fail/records/merge_nested_different_vals_no_prio.ncl b/core/tests/integration/fail/records/merge_nested_different_vals_no_prio.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/records/merge_nested_different_vals_no_prio.ncl rename to core/tests/integration/fail/records/merge_nested_different_vals_no_prio.ncl diff --git a/nickel-lang-lib/tests/integration/fail/records/merge_nested_different_vals_prio_0.ncl b/core/tests/integration/fail/records/merge_nested_different_vals_prio_0.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/records/merge_nested_different_vals_prio_0.ncl rename to core/tests/integration/fail/records/merge_nested_different_vals_prio_0.ncl diff --git a/nickel-lang-lib/tests/integration/fail/records/merge_nested_different_vals_same_priority.ncl b/core/tests/integration/fail/records/merge_nested_different_vals_same_priority.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/records/merge_nested_different_vals_same_priority.ncl rename to core/tests/integration/fail/records/merge_nested_different_vals_same_priority.ncl diff --git a/nickel-lang-lib/tests/integration/fail/records/merge_nested_incompatible_types.ncl b/core/tests/integration/fail/records/merge_nested_incompatible_types.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/records/merge_nested_incompatible_types.ncl rename to core/tests/integration/fail/records/merge_nested_incompatible_types.ncl diff --git a/nickel-lang-lib/tests/integration/fail/records/missing_field.ncl b/core/tests/integration/fail/records/missing_field.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/records/missing_field.ncl rename to core/tests/integration/fail/records/missing_field.ncl diff --git a/nickel-lang-lib/tests/integration/fail/records/missing_field_not_exported.ncl b/core/tests/integration/fail/records/missing_field_not_exported.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/records/missing_field_not_exported.ncl rename to core/tests/integration/fail/records/missing_field_not_exported.ncl diff --git a/nickel-lang-lib/tests/integration/fail/records/missing_field_with_contract.ncl b/core/tests/integration/fail/records/missing_field_with_contract.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/records/missing_field_with_contract.ncl rename to core/tests/integration/fail/records/missing_field_with_contract.ncl diff --git a/nickel-lang-lib/tests/integration/fail/records/static_access_missing_field.ncl b/core/tests/integration/fail/records/static_access_missing_field.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/fail/records/static_access_missing_field.ncl rename to core/tests/integration/fail/records/static_access_missing_field.ncl diff --git a/nickel-lang-lib/tests/integration/free_vars.rs b/core/tests/integration/free_vars.rs similarity index 96% rename from nickel-lang-lib/tests/integration/free_vars.rs rename to core/tests/integration/free_vars.rs index 9dd34654..207b3b6f 100644 --- a/nickel-lang-lib/tests/integration/free_vars.rs +++ b/core/tests/integration/free_vars.rs @@ -1,11 +1,11 @@ -use nickel_lang_lib::term::{record::FieldDeps, IndexMap}; -use nickel_lang_lib::{identifier::Ident, term::Term, transform::free_vars}; +use nickel_lang_core::term::{record::FieldDeps, IndexMap}; +use nickel_lang_core::{identifier::Ident, term::Term, transform::free_vars}; use std::collections::HashSet; use std::iter::IntoIterator; use std::rc::Rc; -use nickel_lang_utilities::test_program::parse; +use nickel_lang_utils::test_program::parse; fn free_vars_eq(free_vars: &FieldDeps, expected: Vec<&str>) -> bool { let expected_set: HashSet = expected.into_iter().map(Ident::from).collect(); diff --git a/nickel-lang-lib/tests/integration/imports/circular_imports.ncl b/core/tests/integration/imports/circular_imports.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/imports/circular_imports.ncl rename to core/tests/integration/imports/circular_imports.ncl diff --git a/nickel-lang-lib/tests/integration/imports/contract_fail.ncl b/core/tests/integration/imports/contract_fail.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/imports/contract_fail.ncl rename to core/tests/integration/imports/contract_fail.ncl diff --git a/nickel-lang-lib/tests/integration/imports/direct_import_loop.ncl b/core/tests/integration/imports/direct_import_loop.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/imports/direct_import_loop.ncl rename to core/tests/integration/imports/direct_import_loop.ncl diff --git a/nickel-lang-lib/tests/integration/imports/imported/circular_imports.ncl b/core/tests/integration/imports/imported/circular_imports.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/imports/imported/circular_imports.ncl rename to core/tests/integration/imports/imported/circular_imports.ncl diff --git a/nickel-lang-lib/tests/integration/imports/imported/circular_imports1.ncl b/core/tests/integration/imports/imported/circular_imports1.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/imports/imported/circular_imports1.ncl rename to core/tests/integration/imports/imported/circular_imports1.ncl diff --git a/nickel-lang-lib/tests/integration/imports/imported/circular_imports2.ncl b/core/tests/integration/imports/imported/circular_imports2.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/imports/imported/circular_imports2.ncl rename to core/tests/integration/imports/imported/circular_imports2.ncl diff --git a/nickel-lang-lib/tests/integration/imports/imported/contract_fail.ncl b/core/tests/integration/imports/imported/contract_fail.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/imports/imported/contract_fail.ncl rename to core/tests/integration/imports/imported/contract_fail.ncl diff --git a/nickel-lang-lib/tests/integration/imports/imported/direct_import_loop.ncl b/core/tests/integration/imports/imported/direct_import_loop.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/imports/imported/direct_import_loop.ncl rename to core/tests/integration/imports/imported/direct_import_loop.ncl diff --git a/nickel-lang-lib/tests/integration/imports/imported/multi_imports.ncl b/core/tests/integration/imports/imported/multi_imports.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/imports/imported/multi_imports.ncl rename to core/tests/integration/imports/imported/multi_imports.ncl diff --git a/nickel-lang-lib/tests/integration/imports/imported/nested.ncl b/core/tests/integration/imports/imported/nested.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/imports/imported/nested.ncl rename to core/tests/integration/imports/imported/nested.ncl diff --git a/nickel-lang-lib/tests/integration/imports/imported/nested_syntax_error.ncl b/core/tests/integration/imports/imported/nested_syntax_error.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/imports/imported/nested_syntax_error.ncl rename to core/tests/integration/imports/imported/nested_syntax_error.ncl diff --git a/nickel-lang-lib/tests/integration/imports/imported/nested_syntax_error1.ncl b/core/tests/integration/imports/imported/nested_syntax_error1.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/imports/imported/nested_syntax_error1.ncl rename to core/tests/integration/imports/imported/nested_syntax_error1.ncl diff --git a/nickel-lang-lib/tests/integration/imports/imported/nested_syntax_error2.ncl b/core/tests/integration/imports/imported/nested_syntax_error2.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/imports/imported/nested_syntax_error2.ncl rename to core/tests/integration/imports/imported/nested_syntax_error2.ncl diff --git a/nickel-lang-lib/tests/integration/imports/imported/root_path.ncl b/core/tests/integration/imports/imported/root_path.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/imports/imported/root_path.ncl rename to core/tests/integration/imports/imported/root_path.ncl diff --git a/nickel-lang-lib/tests/integration/imports/imported/root_path/fourtytwo.ncl b/core/tests/integration/imports/imported/root_path/fourtytwo.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/imports/imported/root_path/fourtytwo.ncl rename to core/tests/integration/imports/imported/root_path/fourtytwo.ncl diff --git a/nickel-lang-lib/tests/integration/imports/imported/root_path/import.ncl b/core/tests/integration/imports/imported/root_path/import.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/imports/imported/root_path/import.ncl rename to core/tests/integration/imports/imported/root_path/import.ncl diff --git a/nickel-lang-lib/tests/integration/imports/imported/serialize.ncl b/core/tests/integration/imports/imported/serialize.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/imports/imported/serialize.ncl rename to core/tests/integration/imports/imported/serialize.ncl diff --git a/nickel-lang-lib/tests/integration/imports/imported/two.ncl b/core/tests/integration/imports/imported/two.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/imports/imported/two.ncl rename to core/tests/integration/imports/imported/two.ncl diff --git a/nickel-lang-lib/tests/integration/imports/imported/typecheck_fail.ncl b/core/tests/integration/imports/imported/typecheck_fail.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/imports/imported/typecheck_fail.ncl rename to core/tests/integration/imports/imported/typecheck_fail.ncl diff --git a/nickel-lang-lib/tests/integration/imports/imported/unexpected_token.ncl b/core/tests/integration/imports/imported/unexpected_token.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/imports/imported/unexpected_token.ncl rename to core/tests/integration/imports/imported/unexpected_token.ncl diff --git a/nickel-lang-lib/tests/integration/imports/imported/unexpected_token_buried.ncl b/core/tests/integration/imports/imported/unexpected_token_buried.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/imports/imported/unexpected_token_buried.ncl rename to core/tests/integration/imports/imported/unexpected_token_buried.ncl diff --git a/nickel-lang-lib/tests/integration/imports/imported/unexpected_token_in_record.ncl b/core/tests/integration/imports/imported/unexpected_token_in_record.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/imports/imported/unexpected_token_in_record.ncl rename to core/tests/integration/imports/imported/unexpected_token_in_record.ncl diff --git a/nickel-lang-lib/tests/integration/imports/multi_imports.ncl b/core/tests/integration/imports/multi_imports.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/imports/multi_imports.ncl rename to core/tests/integration/imports/multi_imports.ncl diff --git a/nickel-lang-lib/tests/integration/imports/nested.ncl b/core/tests/integration/imports/nested.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/imports/nested.ncl rename to core/tests/integration/imports/nested.ncl diff --git a/nickel-lang-lib/tests/integration/imports/nested_syntax_error.ncl b/core/tests/integration/imports/nested_syntax_error.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/imports/nested_syntax_error.ncl rename to core/tests/integration/imports/nested_syntax_error.ncl diff --git a/nickel-lang-lib/tests/integration/imports/root_path.ncl b/core/tests/integration/imports/root_path.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/imports/root_path.ncl rename to core/tests/integration/imports/root_path.ncl diff --git a/nickel-lang-lib/tests/integration/imports/serialize.ncl b/core/tests/integration/imports/serialize.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/imports/serialize.ncl rename to core/tests/integration/imports/serialize.ncl diff --git a/nickel-lang-lib/tests/integration/imports/static_typing_fail.ncl b/core/tests/integration/imports/static_typing_fail.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/imports/static_typing_fail.ncl rename to core/tests/integration/imports/static_typing_fail.ncl diff --git a/nickel-lang-lib/tests/integration/imports/typecheck_fail.ncl b/core/tests/integration/imports/typecheck_fail.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/imports/typecheck_fail.ncl rename to core/tests/integration/imports/typecheck_fail.ncl diff --git a/nickel-lang-lib/tests/integration/imports/unexpected_token_buried.ncl b/core/tests/integration/imports/unexpected_token_buried.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/imports/unexpected_token_buried.ncl rename to core/tests/integration/imports/unexpected_token_buried.ncl diff --git a/nickel-lang-lib/tests/integration/imports/unexpected_token_fail.ncl b/core/tests/integration/imports/unexpected_token_fail.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/imports/unexpected_token_fail.ncl rename to core/tests/integration/imports/unexpected_token_fail.ncl diff --git a/nickel-lang-lib/tests/integration/imports/unexpected_token_in_record_fail.ncl b/core/tests/integration/imports/unexpected_token_in_record_fail.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/imports/unexpected_token_in_record_fail.ncl rename to core/tests/integration/imports/unexpected_token_in_record_fail.ncl diff --git a/nickel-lang-lib/tests/integration/infinite_rec.rs b/core/tests/integration/infinite_rec.rs similarity index 86% rename from nickel-lang-lib/tests/integration/infinite_rec.rs rename to core/tests/integration/infinite_rec.rs index e94a6018..83dffe60 100644 --- a/nickel-lang-lib/tests/integration/infinite_rec.rs +++ b/core/tests/integration/infinite_rec.rs @@ -1,7 +1,7 @@ use assert_matches::assert_matches; -use nickel_lang_lib::error::{Error, EvalError}; +use nickel_lang_core::error::{Error, EvalError}; -use nickel_lang_utilities::test_program::eval; +use nickel_lang_utils::test_program::eval; #[test] fn infinite_loops() { diff --git a/nickel-lang-lib/tests/integration/main.rs b/core/tests/integration/main.rs similarity index 99% rename from nickel-lang-lib/tests/integration/main.rs rename to core/tests/integration/main.rs index b743b30f..ab5d6138 100644 --- a/nickel-lang-lib/tests/integration/main.rs +++ b/core/tests/integration/main.rs @@ -1,10 +1,10 @@ use std::{io::Cursor, thread}; -use nickel_lang_lib::{ +use nickel_lang_core::{ error::{Error, EvalError, ImportError, ParseError, TypecheckError}, term::Term, }; -use nickel_lang_utilities::{ +use nickel_lang_utils::{ annotated_test::{read_annotated_test_case, TestCase}, project_root::project_root, test_program::TestProgram, @@ -18,7 +18,7 @@ mod pretty; mod query; mod stdlib_typecheck; -#[test_resources("nickel-lang-lib/tests/integration/**/*.ncl")] +#[test_resources("core/tests/integration/**/*.ncl")] fn check_annotated_nickel_file(path: &str) { let test: TestCase = read_annotated_test_case(path).expect("Failed to parse annotated program"); diff --git a/nickel-lang-lib/tests/integration/pass/contracts/contracts.ncl b/core/tests/integration/pass/contracts/contracts.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/contracts/contracts.ncl rename to core/tests/integration/pass/contracts/contracts.ncl diff --git a/nickel-lang-lib/tests/integration/pass/contracts/types_dont_propagate.ncl b/core/tests/integration/pass/contracts/types_dont_propagate.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/contracts/types_dont_propagate.ncl rename to core/tests/integration/pass/contracts/types_dont_propagate.ncl diff --git a/nickel-lang-lib/tests/integration/pass/core/arrays.ncl b/core/tests/integration/pass/core/arrays.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/core/arrays.ncl rename to core/tests/integration/pass/core/arrays.ncl diff --git a/nickel-lang-lib/tests/integration/pass/core/basics.ncl b/core/tests/integration/pass/core/basics.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/core/basics.ncl rename to core/tests/integration/pass/core/basics.ncl diff --git a/nickel-lang-lib/tests/integration/pass/core/builtins.ncl b/core/tests/integration/pass/core/builtins.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/core/builtins.ncl rename to core/tests/integration/pass/core/builtins.ncl diff --git a/nickel-lang-lib/tests/integration/pass/core/eq.ncl b/core/tests/integration/pass/core/eq.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/core/eq.ncl rename to core/tests/integration/pass/core/eq.ncl diff --git a/nickel-lang-lib/tests/integration/pass/core/fibo.ncl b/core/tests/integration/pass/core/fibo.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/core/fibo.ncl rename to core/tests/integration/pass/core/fibo.ncl diff --git a/nickel-lang-lib/tests/integration/pass/core/functions.ncl b/core/tests/integration/pass/core/functions.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/core/functions.ncl rename to core/tests/integration/pass/core/functions.ncl diff --git a/nickel-lang-lib/tests/integration/pass/core/import.ncl b/core/tests/integration/pass/core/import.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/core/import.ncl rename to core/tests/integration/pass/core/import.ncl diff --git a/nickel-lang-lib/tests/integration/pass/core/records.ncl b/core/tests/integration/pass/core/records.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/core/records.ncl rename to core/tests/integration/pass/core/records.ncl diff --git a/nickel-lang-lib/tests/integration/pass/core/recursive_let.ncl b/core/tests/integration/pass/core/recursive_let.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/core/recursive_let.ncl rename to core/tests/integration/pass/core/recursive_let.ncl diff --git a/nickel-lang-lib/tests/integration/pass/lib/assert.ncl b/core/tests/integration/pass/lib/assert.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/lib/assert.ncl rename to core/tests/integration/pass/lib/assert.ncl diff --git a/nickel-lang-lib/tests/integration/pass/lib/imported.ncl b/core/tests/integration/pass/lib/imported.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/lib/imported.ncl rename to core/tests/integration/pass/lib/imported.ncl diff --git a/nickel-lang-lib/tests/integration/pass/lib/typed-import.ncl b/core/tests/integration/pass/lib/typed-import.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/lib/typed-import.ncl rename to core/tests/integration/pass/lib/typed-import.ncl diff --git a/nickel-lang-lib/tests/integration/pass/merging/array-merge.ncl b/core/tests/integration/pass/merging/array-merge.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/merging/array-merge.ncl rename to core/tests/integration/pass/merging/array-merge.ncl diff --git a/nickel-lang-lib/tests/integration/pass/merging/lazy-propagation.ncl b/core/tests/integration/pass/merging/lazy-propagation.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/merging/lazy-propagation.ncl rename to core/tests/integration/pass/merging/lazy-propagation.ncl diff --git a/nickel-lang-lib/tests/integration/pass/merging/metavalues.ncl b/core/tests/integration/pass/merging/metavalues.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/merging/metavalues.ncl rename to core/tests/integration/pass/merging/metavalues.ncl diff --git a/nickel-lang-lib/tests/integration/pass/merging/multiple_overrides.ncl b/core/tests/integration/pass/merging/multiple_overrides.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/merging/multiple_overrides.ncl rename to core/tests/integration/pass/merging/multiple_overrides.ncl diff --git a/nickel-lang-lib/tests/integration/pass/merging/overriding.ncl b/core/tests/integration/pass/merging/overriding.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/merging/overriding.ncl rename to core/tests/integration/pass/merging/overriding.ncl diff --git a/nickel-lang-lib/tests/integration/pass/merging/priorities.ncl b/core/tests/integration/pass/merging/priorities.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/merging/priorities.ncl rename to core/tests/integration/pass/merging/priorities.ncl diff --git a/nickel-lang-lib/tests/integration/pass/parsing/annotations.ncl b/core/tests/integration/pass/parsing/annotations.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/parsing/annotations.ncl rename to core/tests/integration/pass/parsing/annotations.ncl diff --git a/nickel-lang-lib/tests/integration/pass/parsing/quote_in_identifier.ncl b/core/tests/integration/pass/parsing/quote_in_identifier.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/parsing/quote_in_identifier.ncl rename to core/tests/integration/pass/parsing/quote_in_identifier.ncl diff --git a/nickel-lang-lib/tests/integration/pass/records/record_defs.ncl b/core/tests/integration/pass/records/record_defs.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/records/record_defs.ncl rename to core/tests/integration/pass/records/record_defs.ncl diff --git a/nickel-lang-lib/tests/integration/pass/serialization/serialize.ncl b/core/tests/integration/pass/serialization/serialize.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/serialization/serialize.ncl rename to core/tests/integration/pass/serialization/serialize.ncl diff --git a/nickel-lang-lib/tests/integration/pass/serialization/serialize_package.ncl b/core/tests/integration/pass/serialization/serialize_package.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/serialization/serialize_package.ncl rename to core/tests/integration/pass/serialization/serialize_package.ncl diff --git a/nickel-lang-lib/tests/integration/pass/stdlib/string_contains_find_replace.ncl b/core/tests/integration/pass/stdlib/string_contains_find_replace.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/stdlib/string_contains_find_replace.ncl rename to core/tests/integration/pass/stdlib/string_contains_find_replace.ncl diff --git a/nickel-lang-lib/tests/integration/pass/stdlib/string_contracts.ncl b/core/tests/integration/pass/stdlib/string_contracts.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/stdlib/string_contracts.ncl rename to core/tests/integration/pass/stdlib/string_contracts.ncl diff --git a/nickel-lang-lib/tests/integration/pass/stdlib/string_conversions.ncl b/core/tests/integration/pass/stdlib/string_conversions.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/stdlib/string_conversions.ncl rename to core/tests/integration/pass/stdlib/string_conversions.ncl diff --git a/nickel-lang-lib/tests/integration/pass/stdlib/string_primitives.ncl b/core/tests/integration/pass/stdlib/string_primitives.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/stdlib/string_primitives.ncl rename to core/tests/integration/pass/stdlib/string_primitives.ncl diff --git a/nickel-lang-lib/tests/integration/pass/stdlib/string_split_join.ncl b/core/tests/integration/pass/stdlib/string_split_join.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/stdlib/string_split_join.ncl rename to core/tests/integration/pass/stdlib/string_split_join.ncl diff --git a/nickel-lang-lib/tests/integration/pass/stdlib/string_trim.ncl b/core/tests/integration/pass/stdlib/string_trim.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/stdlib/string_trim.ncl rename to core/tests/integration/pass/stdlib/string_trim.ncl diff --git a/nickel-lang-lib/tests/integration/pass/stdlib/string_uppercase_lowercase.ncl b/core/tests/integration/pass/stdlib/string_uppercase_lowercase.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/stdlib/string_uppercase_lowercase.ncl rename to core/tests/integration/pass/stdlib/string_uppercase_lowercase.ncl diff --git a/nickel-lang-lib/tests/integration/pass/strings/string_interpolation.ncl b/core/tests/integration/pass/strings/string_interpolation.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/strings/string_interpolation.ncl rename to core/tests/integration/pass/strings/string_interpolation.ncl diff --git a/nickel-lang-lib/tests/integration/pass/strings/symbolic_strings.ncl b/core/tests/integration/pass/strings/symbolic_strings.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/strings/symbolic_strings.ncl rename to core/tests/integration/pass/strings/symbolic_strings.ncl diff --git a/nickel-lang-lib/tests/integration/pass/types/regression-rrows-unification-loops.ncl b/core/tests/integration/pass/types/regression-rrows-unification-loops.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/types/regression-rrows-unification-loops.ncl rename to core/tests/integration/pass/types/regression-rrows-unification-loops.ncl diff --git a/nickel-lang-lib/tests/integration/pass/types/typechecking.ncl b/core/tests/integration/pass/types/typechecking.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/types/typechecking.ncl rename to core/tests/integration/pass/types/typechecking.ncl diff --git a/nickel-lang-lib/tests/integration/pass/types/types.ncl b/core/tests/integration/pass/types/types.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/pass/types/types.ncl rename to core/tests/integration/pass/types/types.ncl diff --git a/nickel-lang-lib/tests/integration/pretty.rs b/core/tests/integration/pretty.rs similarity index 89% rename from nickel-lang-lib/tests/integration/pretty.rs rename to core/tests/integration/pretty.rs index 4ce07fa6..266b857c 100644 --- a/nickel-lang-lib/tests/integration/pretty.rs +++ b/core/tests/integration/pretty.rs @@ -1,6 +1,6 @@ -use nickel_lang_lib::pretty::*; -use nickel_lang_lib::term::{RichTerm, StrChunk, Term}; -use nickel_lang_utilities::{project_root::project_root, test_program::parse}; +use nickel_lang_core::pretty::*; +use nickel_lang_core::term::{RichTerm, StrChunk, Term}; +use nickel_lang_utils::{project_root::project_root, test_program::parse}; use pretty::BoxAllocator; use std::io::{Cursor, Read}; @@ -34,7 +34,7 @@ fn diff(s1: &str, s2: &str) { assert!(nb_diff == 0); } -#[test_resources("nickel-lang-lib/tests/integration/pass/**/*.ncl")] +#[test_resources("core/tests/integration/pass/**/*.ncl")] fn check_idempotent(path: &str) { if EXCLUDE_LIST.iter().any(|suffix| path.ends_with(suffix)) { return; diff --git a/nickel-lang-lib/tests/integration/query.rs b/core/tests/integration/query.rs similarity index 97% rename from nickel-lang-lib/tests/integration/query.rs rename to core/tests/integration/query.rs index 41bee59e..bb3d359c 100644 --- a/nickel-lang-lib/tests/integration/query.rs +++ b/core/tests/integration/query.rs @@ -1,9 +1,9 @@ -use nickel_lang_lib::term::{ +use nickel_lang_core::term::{ make as mk_term, record::{Field, FieldMetadata}, TypeAnnotation, }; -use nickel_lang_utilities::test_program::TestProgram; +use nickel_lang_utils::test_program::TestProgram; #[test] pub fn test_query_metadata_basic() { diff --git a/nickel-lang-lib/tests/integration/stdlib_typecheck.rs b/core/tests/integration/stdlib_typecheck.rs similarity index 80% rename from nickel-lang-lib/tests/integration/stdlib_typecheck.rs rename to core/tests/integration/stdlib_typecheck.rs index e6735d60..8301a9cd 100644 --- a/nickel-lang-lib/tests/integration/stdlib_typecheck.rs +++ b/core/tests/integration/stdlib_typecheck.rs @@ -1,5 +1,5 @@ use assert_matches::assert_matches; -use nickel_lang_lib::cache::{Cache, ErrorTolerance}; +use nickel_lang_core::cache::{Cache, ErrorTolerance}; #[test] fn stdlib_typecheck() { diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/contracts_dont_unify.ncl b/core/tests/integration/typecheck/fail/contracts_dont_unify.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/contracts_dont_unify.ncl rename to core/tests/integration/typecheck/fail/contracts_dont_unify.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/dyn_tail_contract_in_typechecking_mode.ncl b/core/tests/integration/typecheck/fail/dyn_tail_contract_in_typechecking_mode.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/dyn_tail_contract_in_typechecking_mode.ncl rename to core/tests/integration/typecheck/fail/dyn_tail_contract_in_typechecking_mode.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/dynamic_record_field.ncl b/core/tests/integration/typecheck/fail/dynamic_record_field.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/dynamic_record_field.ncl rename to core/tests/integration/typecheck/fail/dynamic_record_field.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/dynamic_type_error_with_wildcard_annotation.ncl b/core/tests/integration/typecheck/fail/dynamic_type_error_with_wildcard_annotation.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/dynamic_type_error_with_wildcard_annotation.ncl rename to core/tests/integration/typecheck/fail/dynamic_type_error_with_wildcard_annotation.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/enum_match_mismatched_branch_types.ncl b/core/tests/integration/typecheck/fail/enum_match_mismatched_branch_types.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/enum_match_mismatched_branch_types.ncl rename to core/tests/integration/typecheck/fail/enum_match_mismatched_branch_types.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/enum_match_variant_not_covered.ncl b/core/tests/integration/typecheck/fail/enum_match_variant_not_covered.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/enum_match_variant_not_covered.ncl rename to core/tests/integration/typecheck/fail/enum_match_variant_not_covered.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/enum_variant_not_in_type.ncl b/core/tests/integration/typecheck/fail/enum_variant_not_in_type.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/enum_variant_not_in_type.ncl rename to core/tests/integration/typecheck/fail/enum_variant_not_in_type.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/locally_different_flat_types.ncl b/core/tests/integration/typecheck/fail/locally_different_flat_types.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/locally_different_flat_types.ncl rename to core/tests/integration/typecheck/fail/locally_different_flat_types.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/mismatch_array_elem_at.ncl b/core/tests/integration/typecheck/fail/mismatch_array_elem_at.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/mismatch_array_elem_at.ncl rename to core/tests/integration/typecheck/fail/mismatch_array_elem_at.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/mismatch_array_entry.ncl b/core/tests/integration/typecheck/fail/mismatch_array_entry.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/mismatch_array_entry.ncl rename to core/tests/integration/typecheck/fail/mismatch_array_entry.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/mismatch_array_map.ncl b/core/tests/integration/typecheck/fail/mismatch_array_map.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/mismatch_array_map.ncl rename to core/tests/integration/typecheck/fail/mismatch_array_map.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/mismatch_array_multiple_entries.ncl b/core/tests/integration/typecheck/fail/mismatch_array_multiple_entries.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/mismatch_array_multiple_entries.ncl rename to core/tests/integration/typecheck/fail/mismatch_array_multiple_entries.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/mismatch_array_typed_entry.ncl b/core/tests/integration/typecheck/fail/mismatch_array_typed_entry.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/mismatch_array_typed_entry.ncl rename to core/tests/integration/typecheck/fail/mismatch_array_typed_entry.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/mismatch_contract_type.ncl b/core/tests/integration/typecheck/fail/mismatch_contract_type.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/mismatch_contract_type.ncl rename to core/tests/integration/typecheck/fail/mismatch_contract_type.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/mismatch_convert_empty_record_to_dynamic_tail.ncl b/core/tests/integration/typecheck/fail/mismatch_convert_empty_record_to_dynamic_tail.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/mismatch_convert_empty_record_to_dynamic_tail.ncl rename to core/tests/integration/typecheck/fail/mismatch_convert_empty_record_to_dynamic_tail.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/mismatch_convert_static_record_type_to_dynamic_tail.ncl b/core/tests/integration/typecheck/fail/mismatch_convert_static_record_type_to_dynamic_tail.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/mismatch_convert_static_record_type_to_dynamic_tail.ncl rename to core/tests/integration/typecheck/fail/mismatch_convert_static_record_type_to_dynamic_tail.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/mismatch_enum_case_in_multiple_types.ncl b/core/tests/integration/typecheck/fail/mismatch_enum_case_in_multiple_types.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/mismatch_enum_case_in_multiple_types.ncl rename to core/tests/integration/typecheck/fail/mismatch_enum_case_in_multiple_types.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/mismatch_enum_match_fun_type.ncl b/core/tests/integration/typecheck/fail/mismatch_enum_match_fun_type.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/mismatch_enum_match_fun_type.ncl rename to core/tests/integration/typecheck/fail/mismatch_enum_match_fun_type.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/mismatch_enum_poly_nested.ncl b/core/tests/integration/typecheck/fail/mismatch_enum_poly_nested.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/mismatch_enum_poly_nested.ncl rename to core/tests/integration/typecheck/fail/mismatch_enum_poly_nested.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/mismatch_enum_poly_row_var.ncl b/core/tests/integration/typecheck/fail/mismatch_enum_poly_row_var.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/mismatch_enum_poly_row_var.ncl rename to core/tests/integration/typecheck/fail/mismatch_enum_poly_row_var.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/mismatch_forall_var_concrete_type.ncl b/core/tests/integration/typecheck/fail/mismatch_forall_var_concrete_type.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/mismatch_forall_var_concrete_type.ncl rename to core/tests/integration/typecheck/fail/mismatch_forall_var_concrete_type.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/mismatch_forall_variable.ncl b/core/tests/integration/typecheck/fail/mismatch_forall_variable.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/mismatch_forall_variable.ncl rename to core/tests/integration/typecheck/fail/mismatch_forall_variable.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/mismatch_in_fun_body.ncl b/core/tests/integration/typecheck/fail/mismatch_in_fun_body.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/mismatch_in_fun_body.ncl rename to core/tests/integration/typecheck/fail/mismatch_in_fun_body.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/mismatch_let_inference.ncl b/core/tests/integration/typecheck/fail/mismatch_let_inference.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/mismatch_let_inference.ncl rename to core/tests/integration/typecheck/fail/mismatch_let_inference.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/mismatch_nested_forall_variable.ncl b/core/tests/integration/typecheck/fail/mismatch_nested_forall_variable.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/mismatch_nested_forall_variable.ncl rename to core/tests/integration/typecheck/fail/mismatch_nested_forall_variable.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/mismatch_rec_record_field.ncl b/core/tests/integration/typecheck/fail/mismatch_rec_record_field.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/mismatch_rec_record_field.ncl rename to core/tests/integration/typecheck/fail/mismatch_rec_record_field.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/mismatch_rec_record_inference.ncl b/core/tests/integration/typecheck/fail/mismatch_rec_record_inference.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/mismatch_rec_record_inference.ncl rename to core/tests/integration/typecheck/fail/mismatch_rec_record_inference.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/mismatch_rec_record_rec_field.ncl b/core/tests/integration/typecheck/fail/mismatch_rec_record_rec_field.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/mismatch_rec_record_rec_field.ncl rename to core/tests/integration/typecheck/fail/mismatch_rec_record_rec_field.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/mismatch_record_dyn_field.ncl b/core/tests/integration/typecheck/fail/mismatch_record_dyn_field.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/mismatch_record_dyn_field.ncl rename to core/tests/integration/typecheck/fail/mismatch_record_dyn_field.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/mismatch_record_field_access.ncl b/core/tests/integration/typecheck/fail/mismatch_record_field_access.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/mismatch_record_field_access.ncl rename to core/tests/integration/typecheck/fail/mismatch_record_field_access.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/mismatch_record_field_name.ncl b/core/tests/integration/typecheck/fail/mismatch_record_field_name.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/mismatch_record_field_name.ncl rename to core/tests/integration/typecheck/fail/mismatch_record_field_name.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/mismatch_record_field_type.ncl b/core/tests/integration/typecheck/fail/mismatch_record_field_type.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/mismatch_record_field_type.ncl rename to core/tests/integration/typecheck/fail/mismatch_record_field_type.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/mismatch_record_poly_field_misused.ncl b/core/tests/integration/typecheck/fail/mismatch_record_poly_field_misused.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/mismatch_record_poly_field_misused.ncl rename to core/tests/integration/typecheck/fail/mismatch_record_poly_field_misused.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/mismatch_record_poly_fields.ncl b/core/tests/integration/typecheck/fail/mismatch_record_poly_fields.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/mismatch_record_poly_fields.ncl rename to core/tests/integration/typecheck/fail/mismatch_record_poly_fields.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/mismatch_record_poly_row_var.ncl b/core/tests/integration/typecheck/fail/mismatch_record_poly_row_var.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/mismatch_record_poly_row_var.ncl rename to core/tests/integration/typecheck/fail/mismatch_record_poly_row_var.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/no_implicit_polymorphism.ncl b/core/tests/integration/typecheck/fail/no_implicit_polymorphism.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/no_implicit_polymorphism.ncl rename to core/tests/integration/typecheck/fail/no_implicit_polymorphism.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/piecewise_signature.ncl b/core/tests/integration/typecheck/fail/piecewise_signature.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/piecewise_signature.ncl rename to core/tests/integration/typecheck/fail/piecewise_signature.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/primitive_mismatch_bool_number.ncl b/core/tests/integration/typecheck/fail/primitive_mismatch_bool_number.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/primitive_mismatch_bool_number.ncl rename to core/tests/integration/typecheck/fail/primitive_mismatch_bool_number.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/primitive_mismatch_number_bool.ncl b/core/tests/integration/typecheck/fail/primitive_mismatch_number_bool.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/primitive_mismatch_number_bool.ncl rename to core/tests/integration/typecheck/fail/primitive_mismatch_number_bool.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/primitive_mismatch_string_number.ncl b/core/tests/integration/typecheck/fail/primitive_mismatch_string_number.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/primitive_mismatch_string_number.ncl rename to core/tests/integration/typecheck/fail/primitive_mismatch_string_number.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/record-typed-field-path.ncl b/core/tests/integration/typecheck/fail/record-typed-field-path.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/record-typed-field-path.ncl rename to core/tests/integration/typecheck/fail/record-typed-field-path.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/recursive_let.ncl b/core/tests/integration/typecheck/fail/recursive_let.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/recursive_let.ncl rename to core/tests/integration/typecheck/fail/recursive_let.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/row_conflict_extend.ncl b/core/tests/integration/typecheck/fail/row_conflict_extend.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/row_conflict_extend.ncl rename to core/tests/integration/typecheck/fail/row_conflict_extend.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/row_conflict_remove.ncl b/core/tests/integration/typecheck/fail/row_conflict_remove.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/row_conflict_remove.ncl rename to core/tests/integration/typecheck/fail/row_conflict_remove.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/shallow_type_inference.ncl b/core/tests/integration/typecheck/fail/shallow_type_inference.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/shallow_type_inference.ncl rename to core/tests/integration/typecheck/fail/shallow_type_inference.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/unannotated_bindings_type_as_dyn.ncl b/core/tests/integration/typecheck/fail/unannotated_bindings_type_as_dyn.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/unannotated_bindings_type_as_dyn.ncl rename to core/tests/integration/typecheck/fail/unannotated_bindings_type_as_dyn.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/unbound_variable.ncl b/core/tests/integration/typecheck/fail/unbound_variable.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/unbound_variable.ncl rename to core/tests/integration/typecheck/fail/unbound_variable.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/fail/wildcard_apparent_ty_is_dyn.ncl b/core/tests/integration/typecheck/fail/wildcard_apparent_ty_is_dyn.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/fail/wildcard_apparent_ty_is_dyn.ncl rename to core/tests/integration/typecheck/fail/wildcard_apparent_ty_is_dyn.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck/pass/dynamic_type_error_without_wildcard.ncl b/core/tests/integration/typecheck/pass/dynamic_type_error_without_wildcard.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck/pass/dynamic_type_error_without_wildcard.ncl rename to core/tests/integration/typecheck/pass/dynamic_type_error_without_wildcard.ncl diff --git a/nickel-lang-lib/tests/integration/typecheck_fail.rs b/core/tests/integration/typecheck_fail.rs similarity index 62% rename from nickel-lang-lib/tests/integration/typecheck_fail.rs rename to core/tests/integration/typecheck_fail.rs index 9437428d..692b012b 100644 --- a/nickel-lang-lib/tests/integration/typecheck_fail.rs +++ b/core/tests/integration/typecheck_fail.rs @@ -1,11 +1,11 @@ use assert_matches::assert_matches; use codespan::Files; -use nickel_lang_lib::cache::resolvers::DummyResolver; -use nickel_lang_lib::error::TypecheckError; -use nickel_lang_lib::parser::{grammar, lexer, ErrorTolerantParser}; -use nickel_lang_lib::term::RichTerm; -use nickel_lang_lib::types::{TypeF, Types}; -use nickel_lang_lib::{typecheck, typecheck::Context}; +use nickel_lang_core::cache::resolvers::DummyResolver; +use nickel_lang_core::error::TypecheckError; +use nickel_lang_core::parser::{grammar, lexer, ErrorTolerantParser}; +use nickel_lang_core::term::RichTerm; +use nickel_lang_core::types::{TypeF, Types}; +use nickel_lang_core::{typecheck, typecheck::Context}; fn type_check(rt: &RichTerm) -> Result<(), TypecheckError> { typecheck::type_check(rt, Context::new(), &DummyResolver {}).map(|_| ()) diff --git a/nickel-lang-lib/tests/integration/typecheck_fail/row_type_unification_variable_mismatch.ncl b/core/tests/integration/typecheck_fail/row_type_unification_variable_mismatch.ncl similarity index 100% rename from nickel-lang-lib/tests/integration/typecheck_fail/row_type_unification_variable_mismatch.ncl rename to core/tests/integration/typecheck_fail/row_type_unification_variable_mismatch.ncl diff --git a/flake.nix b/flake.nix index 8e1a2703..3474f412 100644 --- a/flake.nix +++ b/flake.nix @@ -239,8 +239,8 @@ in rec { inherit cargoArtifacts; - nickel-lang-lib = buildPackage { pname = "nickel-lang-lib"; }; - nickel-lang-cli = buildPackage { pname = "nickel-lang"; }; + nickel-lang-core = buildPackage { pname = "nickel-lang-core"; }; + nickel-lang-cli = buildPackage { pname = "nickel-lang-cli"; }; lsp-nls = buildPackage { pname = "nickel-lang-lsp"; }; nickel-static = @@ -248,7 +248,7 @@ then nickel-lang-cli else buildPackage { - pname = "nickel-lang"; + pname = "nickel-lang-cli"; extraArgs = { CARGO_BUILD_TARGET = pkgs.rust.toRustTarget pkgs.pkgsMusl.stdenv.hostPlatform; CARGO_BUILD_RUSTFLAGS = "-C target-feature=+crt-static"; @@ -261,7 +261,7 @@ pname = "nickel-lang-bench"; buildPhaseCargoCommand = '' - cargo bench -p nickel-lang-lib ${pkgs.lib.optionalString noRunBench "--no-run"} + cargo bench -p nickel-lang-core ${pkgs.lib.optionalString noRunBench "--no-run"} ''; doInstallCargoArtifacts = false; @@ -346,7 +346,7 @@ # Customize source filtering as Nickel uses non-standard-Rust files like `*.lalrpop`. src = filterNickelSrc craneLib.filterCargoSources; - cargoExtraArgs = "-p nickel-repl --target wasm32-unknown-unknown --frozen --offline"; + cargoExtraArgs = "-p nickel-wasm-repl --target wasm32-unknown-unknown --frozen --offline"; # * --mode no-install prevents wasm-pack from trying to download and # vendor tools like wasm-bindgen, wasm-opt, etc. but use the one # provided by Nix @@ -371,15 +371,15 @@ inherit cargoArtifacts src; buildPhaseCargoCommand = '' - WASM_PACK_CACHE=.wasm-pack-cache wasm-pack build nickel-wasm-repl ${wasmPackExtraArgs} + WASM_PACK_CACHE=.wasm-pack-cache wasm-pack build wasm-repl ${wasmPackExtraArgs} ''; # nickel-lang.org expects an interface `nickel-repl.wasm`, hence the # `ln` installPhaseCommand = '' mkdir -p $out - cp -r nickel-wasm-repl/pkg $out/nickel-repl - ln -s $out/nickel-repl/nickel_repl_bg.wasm $out/nickel-repl/nickel_repl.wasm + cp -r wasm-repl/pkg $out/nickel-repl + ln -s $out/nickel-repl/nickel_wasm_repl_bg.wasm $out/nickel-repl/nickel_repl.wasm ''; nativeBuildInputs = [ @@ -441,7 +441,7 @@ in pkgs.stdenv.mkDerivation { name = "nickel-stdlib-doc-${format}-${version}"; - src = ./nickel-lang-lib/stdlib; + src = ./core/stdlib; installPhase = '' mkdir -p $out for file in $(ls *.ncl | grep -v 'internals.ncl') @@ -495,7 +495,7 @@ checkRustDoc lsp-nls nickel-lang-cli - nickel-lang-lib + nickel-lang-core rustfmt; # An optimizing release build is long: eschew optimizations in checks by # building a dev profile diff --git a/lsp/lsp-harness/Cargo.toml b/lsp/lsp-harness/Cargo.toml index 90306895..b314ac36 100644 --- a/lsp/lsp-harness/Cargo.toml +++ b/lsp/lsp-harness/Cargo.toml @@ -4,10 +4,16 @@ version = "0.1.0" edition = "2021" [dependencies] -anyhow = "1.0.71" -env_logger = "0.10.0" -log = "0.4.19" -lsp-server = "0.6" -lsp-types = "0.88.0" -serde = { version = "1.0.164", features = ["derive"] } -serde_json = "1.0.96" +anyhow.workspace = true +env_logger.workspace = true +log.workspace = true +lsp-types.workspace = true +lsp-server.workspace = true +serde = { workspace = true, features = ["derive"] } +serde_json.workspace = true + +[dev-dependencies] +assert_cmd.workspace = true +insta.workspace = true +test-generator.workspace = true +nickel-lang-utils.workspace = true diff --git a/lsp/lsp-harness/src/jsonrpc.rs b/lsp/lsp-harness/src/jsonrpc.rs index d295b02b..1e62cc2c 100644 --- a/lsp/lsp-harness/src/jsonrpc.rs +++ b/lsp/lsp-harness/src/jsonrpc.rs @@ -8,8 +8,9 @@ use lsp_server::ResponseError; use lsp_types::{ notification::{DidOpenTextDocument, Exit, Initialized, Notification as LspNotification}, request::{GotoDefinition, Initialize, Request as LspRequest, Shutdown}, - DidOpenTextDocumentParams, GotoDefinitionParams, GotoDefinitionResponse, InitializeParams, - InitializedParams, Position, TextDocumentIdentifier, TextDocumentPositionParams, Url, + ClientCapabilities, DidOpenTextDocumentParams, GotoDefinitionParams, GotoDefinitionResponse, + InitializeParams, InitializedParams, Position, TextDocumentIdentifier, + TextDocumentPositionParams, Url, }; use std::{ io::{BufRead, BufReader, Read, Write}, @@ -135,13 +136,16 @@ impl Server { } fn initialize(&mut self) -> Result<()> { + // `root_path` is deprecated, but we need ot initialize the struct + // somehow. There is no `Default` implementation for `InitilizeParams` + // in versions of `lsp-types` compatible with `codespan-lsp` #[allow(deprecated)] self.send_request::(InitializeParams { process_id: None, root_path: None, root_uri: None, initialization_options: None, - capabilities: Default::default(), + capabilities: ClientCapabilities::default(), trace: None, workspace_folders: None, client_info: None, diff --git a/lsp/nls/Cargo.toml b/lsp/nls/Cargo.toml index 6fa9e8a7..5a08c830 100644 --- a/lsp/nls/Cargo.toml +++ b/lsp/nls/Cargo.toml @@ -15,33 +15,33 @@ name = "nls" path = "src/main.rs" [build-dependencies] -lalrpop = "0.19.6" +lalrpop.workspace = true [dependencies] -lalrpop-util = "0.19.6" -clap = { version = "4.3", features = ["derive"] } -codespan = "0.11" -codespan-reporting = "0.11" -codespan-lsp = "0.11" -serde = { version = "1.0.154", features = ["derive"] } -serde_json = "1.0.94" -regex = "1" +lalrpop-util.workspace = true +clap = { workspace = true, features = ["derive"] } +codespan.workspace = true +codespan-reporting.workspace = true +codespan-lsp.workspace = true +serde = { workspace = true, features = ["derive"] } +serde_json.workspace = true +regex.workspace = true -lsp-server = "0.6" -lsp-types = "0.88.0" -log = "0.4" -env_logger = "0.9" -anyhow = "1.0" -nickel-lang-lib = {path = "../../nickel-lang-lib", version = "1.0.0"} -derive_more = "0.99" -lazy_static = "1" -csv = "1" +nickel-lang-core.workspace = true +lsp-server.workspace = true +lsp-types.workspace = true +log.workspace = true +env_logger.workspace = true +anyhow.workspace = true +derive_more.workspace = true +lazy_static.workspace = true +csv.workspace = true [dev-dependencies] -assert_cmd = "2.0.11" -assert_matches = "1.5.0" -insta = "1.29.0" -lsp-harness = { path = "../lsp-harness" } -nickel-lang-utilities = {path = "../../utilities"} -pretty_assertions = "1.3.0" -test-generator = "0.3.1" +assert_cmd.workspace = true +assert_matches.workspace = true +insta.workspace = true +lsp-harness.workspace = true +nickel-lang-utils.workspace = true +pretty_assertions.workspace = true +test-generator.workspace = true diff --git a/lsp/nls/src/cache.rs b/lsp/nls/src/cache.rs index 947d67ab..7dfbe9d4 100644 --- a/lsp/nls/src/cache.rs +++ b/lsp/nls/src/cache.rs @@ -1,7 +1,7 @@ use std::collections::HashMap; use codespan::FileId; -use nickel_lang_lib::{ +use nickel_lang_core::{ cache::{Cache, CacheError, CacheOp, EntryState, TermEntry}, error::{Error, ImportError}, typecheck::{self, linearization::Linearization}, diff --git a/lsp/nls/src/files.rs b/lsp/nls/src/files.rs index 96dc6338..fc8b2e9f 100644 --- a/lsp/nls/src/files.rs +++ b/lsp/nls/src/files.rs @@ -7,7 +7,7 @@ use lsp_types::{ notification::{DidOpenTextDocument, Notification}, DidChangeTextDocumentParams, DidOpenTextDocumentParams, PublishDiagnosticsParams, Url, }; -use nickel_lang_lib::{ +use nickel_lang_core::{ cache::{CacheError, CacheOp}, error::IntoDiagnostics, }; diff --git a/lsp/nls/src/linearization/building.rs b/lsp/nls/src/linearization/building.rs index 72896702..a2745308 100644 --- a/lsp/nls/src/linearization/building.rs +++ b/lsp/nls/src/linearization/building.rs @@ -2,7 +2,7 @@ use std::{collections::HashMap, mem}; use codespan::FileId; use log::debug; -use nickel_lang_lib::{ +use nickel_lang_core::{ cache::Cache, identifier::Ident, position::TermPos, diff --git a/lsp/nls/src/linearization/completed.rs b/lsp/nls/src/linearization/completed.rs index 743494ab..75361799 100644 --- a/lsp/nls/src/linearization/completed.rs +++ b/lsp/nls/src/linearization/completed.rs @@ -1,7 +1,7 @@ use std::collections::HashMap; use codespan::{ByteIndex, FileId}; -use nickel_lang_lib::{ +use nickel_lang_core::{ position::TermPos, term::record::FieldMetadata, typecheck::linearization::LinearizationState, }; diff --git a/lsp/nls/src/linearization/interface.rs b/lsp/nls/src/linearization/interface.rs index 6c96dde6..96fb44ec 100644 --- a/lsp/nls/src/linearization/interface.rs +++ b/lsp/nls/src/linearization/interface.rs @@ -1,12 +1,12 @@ use std::collections::HashMap; -use nickel_lang_lib::{identifier::Ident, typecheck::UnifType, types::Types}; +use nickel_lang_core::{identifier::Ident, typecheck::UnifType, types::Types}; use super::ItemId; pub trait ResolutionState {} -/// Types are available as [nickel_lang_lib::typecheck::UnifType] only during recording. They are -/// resolved after typechecking as [nickel_lang_lib::types::Types] +/// Types are available as [nickel_lang_core::typecheck::UnifType] only during recording. They are +/// resolved after typechecking as [nickel_lang_core::types::Types] pub type Unresolved = UnifType; impl ResolutionState for Unresolved {} diff --git a/lsp/nls/src/linearization/mod.rs b/lsp/nls/src/linearization/mod.rs index d53c9d6d..5ed87453 100644 --- a/lsp/nls/src/linearization/mod.rs +++ b/lsp/nls/src/linearization/mod.rs @@ -2,7 +2,7 @@ use std::{collections::HashMap, marker::PhantomData}; use codespan::FileId; use log::debug; -use nickel_lang_lib::{ +use nickel_lang_core::{ identifier::Ident, position::TermPos, term::{ @@ -27,7 +27,7 @@ pub mod building; pub mod completed; pub mod interface; -pub type Environment = nickel_lang_lib::environment::Environment; +pub type Environment = nickel_lang_core::environment::Environment; /// A registry mapping file ids to their corresponding linearization. The registry stores the /// linearization of every file that has been imported and analyzed, including the main open @@ -118,8 +118,8 @@ impl<'a> AnalysisHost<'a> { } } -use nickel_lang_lib::typecheck::Extra; -use nickel_lang_lib::types::Types; +use nickel_lang_core::typecheck::Extra; +use nickel_lang_core::types::Types; impl<'a> Linearizer for AnalysisHost<'a> { type Building = Building<'a>; type Completed = Completed; diff --git a/lsp/nls/src/requests/completion.rs b/lsp/nls/src/requests/completion.rs index 14e71030..5c237b25 100644 --- a/lsp/nls/src/requests/completion.rs +++ b/lsp/nls/src/requests/completion.rs @@ -6,7 +6,7 @@ use lsp_server::{RequestId, Response, ResponseError}; use lsp_types::{ CompletionItem, CompletionItemKind, CompletionParams, Documentation, MarkupContent, MarkupKind, }; -use nickel_lang_lib::{ +use nickel_lang_core::{ identifier::Ident, term::{ record::{Field, FieldMetadata}, @@ -364,7 +364,7 @@ fn find_fields_from_term( lazy_static! { // unwraps are safe here because we know these are correct regexes. - // This regexp must be the same as the regex for identifiers in the lexer (nickel_lang_lib::parser::lexer) + // This regexp must be the same as the regex for identifiers in the lexer (nickel_lang_core::parser::lexer) static ref RE_IDENTIFIER: regex::Regex = regex::Regex::new(r"_?[a-zA-Z][_a-zA-Z0-9-']*").unwrap(); static ref RE_SPACE: regex::Regex = regex::Regex::new(r"\s+").unwrap(); } @@ -724,7 +724,7 @@ mod tests { use super::*; use crate::linearization::Environment; use codespan::Files; - use nickel_lang_lib::{position::TermPos, term::MergePriority}; + use nickel_lang_core::{position::TermPos, term::MergePriority}; use std::collections::{HashMap, HashSet}; fn make_lin_item( @@ -826,7 +826,7 @@ mod tests { #[test] fn test_extract_ident_with_path() { - use nickel_lang_lib::{mk_uty_record, mk_uty_row}; + use nickel_lang_core::{mk_uty_record, mk_uty_row}; use std::convert::TryInto; // Representing the type: {a: {b : {c1 : Num, c2: Num}}} diff --git a/lsp/nls/src/requests/goto.rs b/lsp/nls/src/requests/goto.rs index d97a0e8c..809cb4e2 100644 --- a/lsp/nls/src/requests/goto.rs +++ b/lsp/nls/src/requests/goto.rs @@ -5,7 +5,7 @@ use lsp_server::{ErrorCode, RequestId, Response, ResponseError}; use lsp_types::{ GotoDefinitionParams, GotoDefinitionResponse, Location, Range, ReferenceParams, Url, }; -use nickel_lang_lib::position::RawSpan; +use nickel_lang_core::position::RawSpan; use serde_json::Value; use crate::{ diff --git a/lsp/nls/src/requests/hover.rs b/lsp/nls/src/requests/hover.rs index 63de876f..d3376f47 100644 --- a/lsp/nls/src/requests/hover.rs +++ b/lsp/nls/src/requests/hover.rs @@ -3,7 +3,7 @@ use codespan_lsp::position_to_byte_index; use log::debug; use lsp_server::{RequestId, Response, ResponseError}; use lsp_types::{Hover, HoverContents, HoverParams, LanguageString, MarkedString, Range}; -use nickel_lang_lib::position::TermPos; +use nickel_lang_core::position::TermPos; use serde_json::Value; use crate::{ diff --git a/lsp/nls/src/server.rs b/lsp/nls/src/server.rs index caffc3ed..100e3bb2 100644 --- a/lsp/nls/src/server.rs +++ b/lsp/nls/src/server.rs @@ -15,12 +15,12 @@ use lsp_types::{ WorkDoneProgressOptions, }; -use nickel_lang_lib::{ +use nickel_lang_core::{ cache::{Cache, ErrorTolerance}, identifier::Ident, stdlib::StdlibModule, }; -use nickel_lang_lib::{stdlib, typecheck::Context}; +use nickel_lang_core::{stdlib, typecheck::Context}; use crate::{ cache::CacheExt, diff --git a/lsp/nls/src/term.rs b/lsp/nls/src/term.rs index af0d932a..6d6e3898 100644 --- a/lsp/nls/src/term.rs +++ b/lsp/nls/src/term.rs @@ -1,7 +1,7 @@ use std::ops::Range; use codespan::FileId; -use nickel_lang_lib::position::RawSpan; +use nickel_lang_core::position::RawSpan; pub trait RawSpanExt { fn to_range(self) -> (FileId, Range); diff --git a/lsp/nls/tests/main.rs b/lsp/nls/tests/main.rs index cb28395d..6427bf96 100644 --- a/lsp/nls/tests/main.rs +++ b/lsp/nls/tests/main.rs @@ -1,6 +1,6 @@ use assert_cmd::cargo::CommandCargoExt; use lsp_types::request::{GotoDefinition, Request as LspRequest}; -use nickel_lang_utilities::project_root::project_root; +use nickel_lang_utils::project_root::project_root; use test_generator::test_resources; use lsp_harness::{LspDebug, Request, Server, TestFixture}; diff --git a/nickel-lang-cli/Cargo.toml b/nickel-lang-cli/Cargo.toml deleted file mode 100644 index e709d1c9..00000000 --- a/nickel-lang-cli/Cargo.toml +++ /dev/null @@ -1,32 +0,0 @@ -[package] -name = "nickel-lang" -description = "The Nickel interpreter CLI" -authors.workspace = true -edition.workspace = true -homepage.workspace = true -keywords.workspace = true -license.workspace = true -repository.workspace = true -version.workspace = true - -[[bin]] -name = "nickel" -path = "bin/nickel.rs" -bench = false - -[features] -default = ["repl", "doc"] -repl = ["nickel-lang-lib/repl"] -doc = ["nickel-lang-lib/doc"] - -[dependencies] -nickel-lang-lib = { version = "1.0.0", path = "../nickel-lang-lib", features = [ "markdown" ], default-features = false } -clap = { version = "4.3", features = ["derive"] } -serde = { version = "1.0.154", features = ["derive"] } - -directories = "4.0.1" - -[dev-dependencies] -nickel-lang-utilities = { version = "1.0.0", path = "../utilities" } -test-generator = "0.3.1" -insta = { version = "1.28.0", features = ["filters"] } diff --git a/nickel-lang-lib/Cargo.toml b/nickel-lang-lib/Cargo.toml deleted file mode 100644 index b8e387a3..00000000 --- a/nickel-lang-lib/Cargo.toml +++ /dev/null @@ -1,110 +0,0 @@ -[package] -name = "nickel-lang-lib" -readme = "README.md" -description = "Programmable configuration files." -authors.workspace = true -edition.workspace = true -homepage.workspace = true -keywords.workspace = true -license.workspace = true -repository.workspace = true -version.workspace = true - -[lib] -bench = false - -[features] -default = ["markdown", "repl", "doc"] -markdown = ["termimad"] -repl = ["rustyline", "rustyline-derive", "ansi_term"] -repl-wasm = ["wasm-bindgen", "js-sys", "serde_repr"] -doc = ["comrak"] - -[build-dependencies] -lalrpop = "0.19.9" - -[dependencies] -lalrpop-util = "0.19.9" -regex = "1" -simple-counter = "0.1.0" -clap = { version = "4.3", features = ["derive"] } -codespan = "0.11" -codespan-reporting = "0.11" -logos = "0.12" -serde = { version = "1.0.154", features = ["derive"] } -serde_json = "1.0.94" -serde_yaml = "0.9.19" -toml = { version = "0.7.2", features = ["parse"] } -void = "1" -sha-1 = "0.10.0" -sha2 = "0.10.6" -md-5 = "0.10.5" -unicode-segmentation = "1.10.1" -indoc = "2" - -termimad = { version = "0.23.0", optional = true } -ansi_term = { version = "0.12", optional = true } - -rustyline = { version = "11.0", optional = true} -rustyline-derive = { version = "0.8.0", optional = true } - -# The `wasm-bindgen` version is pinned (`=`) because it must be a version -# available in Nixpkgs. -wasm-bindgen = { version = "=0.2.83", optional = true, features = ["serde-serialize"] } -serde-wasm-bindgen = "0.5.0" -js-sys = { version = "0.3", optional = true } -serde_repr = { version = "0.1", optional = true } -pretty = "0.11.3" - -comrak = { version = "0.17.0", optional = true, features = [] } -once_cell = "1.17.1" -typed-arena = "2.0.2" -malachite = {version = "0.3.2", features = ["enable_serde"] } -malachite-q = "0.3.2" -indexmap = {version = "1.9.3", features = ["serde"] } -strip-ansi-escapes = "0.1.1" - -[dev-dependencies] -pretty_assertions = "1.3.0" -assert_matches = "1.5.0" -criterion = "0.4" -pprof = { version = "0.11.1", features = ["criterion", "flamegraph"] } -nickel-lang-utilities = {path = "../utilities", version = "1.0.0"} -similar = "2.2.1" -test-generator = "0.3.1" - -# Enable this to use flamegraphs -# [profile.release] -# debug = true - -[[bench]] -name = "numeric" -harness = false - -[[bench]] -name = "functions" -harness = false - -[[bench]] -name = "arrays" -harness = false - -# [[bench]] -# name = "records" -# harness = false - -[[bench]] -name = "serialization" -harness = false - -[[bench]] -name = "mantis" -harness = false - -[[bench]] -name = "stdlib" -harness = false - -[[bench]] -name = "typecheck-nixpkgs-lib" -harness = false diff --git a/nickel-wasm-repl/src/lib.rs b/nickel-wasm-repl/src/lib.rs deleted file mode 100644 index 3140f684..00000000 --- a/nickel-wasm-repl/src/lib.rs +++ /dev/null @@ -1 +0,0 @@ -pub use nickel_lang_lib::*; diff --git a/pyckel/Cargo.toml b/pyckel/Cargo.toml index 0968b70e..5fa01c2f 100644 --- a/pyckel/Cargo.toml +++ b/pyckel/Cargo.toml @@ -11,9 +11,9 @@ repository.workspace = true version.workspace = true [dependencies] -nickel-lang-lib = {default-features = false, path = "../nickel-lang-lib", version = "1.0.0" } -pyo3 = { version = "0.17.3", features = ["extension-module"] } -codespan-reporting = "0.11" +nickel-lang-core = { workspace = true, default-features = false } +pyo3 = { workspace = true, features = ["extension-module"] } +codespan-reporting.workspace = true [lib] crate-type = ["cdylib", "rlib"] diff --git a/pyckel/src/lib.rs b/pyckel/src/lib.rs index 77498273..de85ea17 100644 --- a/pyckel/src/lib.rs +++ b/pyckel/src/lib.rs @@ -1,6 +1,6 @@ use std::io::Cursor; -use nickel_lang_lib::{ +use nickel_lang_core::{ error::Error, eval::cache::{Cache, CacheImpl}, program::Program, diff --git a/utilities/Cargo.toml b/utils/Cargo.toml similarity index 59% rename from utilities/Cargo.toml rename to utils/Cargo.toml index f26ace7a..299881dd 100644 --- a/utilities/Cargo.toml +++ b/utils/Cargo.toml @@ -1,5 +1,6 @@ [package] -name = "nickel-lang-utilities" +name = "nickel-lang-utils" +version = "0.1.0" description = "Common helper functions for the tests and benchmarks of the nickel-lang crate." authors.workspace = true edition.workspace = true @@ -7,15 +8,14 @@ homepage.workspace = true keywords.workspace = true license.workspace = true repository.workspace = true -version.workspace = true [lib] bench = false # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -nickel-lang-lib = {path = "../nickel-lang-lib", version = "1.0.0"} -criterion = "0.3" -codespan = "0.11" -serde = { version = "1.0.154", features = ["derive"] } -toml = { version = "0.7.2", features = ["parse"] } +nickel-lang-core.workspace = true +criterion.workspace = true +codespan.workspace = true +serde = { workspace = true, features = ["derive"] } +toml = { workspace = true, features = ["parse"] } diff --git a/utilities/src/annotated_test.rs b/utils/src/annotated_test.rs similarity index 100% rename from utilities/src/annotated_test.rs rename to utils/src/annotated_test.rs diff --git a/utilities/src/bench.rs b/utils/src/bench.rs similarity index 99% rename from utilities/src/bench.rs rename to utils/src/bench.rs index f11ffe6a..9cb954a7 100644 --- a/utilities/src/bench.rs +++ b/utils/src/bench.rs @@ -1,5 +1,5 @@ use criterion::Criterion; -use nickel_lang_lib::{ +use nickel_lang_core::{ cache::{Cache, Envs, ErrorTolerance}, eval::{ cache::{Cache as EvalCache, CacheImpl}, @@ -168,7 +168,7 @@ macro_rules! ncl_bench { macro_rules! ncl_bench_group { (name = $group_name:ident; config = $config:expr; $($b:tt),+ $(,)*) => { pub fn $group_name() { - use nickel_lang_lib::{ + use nickel_lang_core::{ cache::{Envs, Cache, ErrorTolerance, ImportResolver}, eval::{VirtualMachine, cache::{CacheImpl, Cache as EvalCache}}, transform::import_resolution::strict::resolve_imports, diff --git a/utilities/src/lib.rs b/utils/src/lib.rs similarity index 76% rename from utilities/src/lib.rs rename to utils/src/lib.rs index 040c1390..9e741374 100644 --- a/utilities/src/lib.rs +++ b/utils/src/lib.rs @@ -3,4 +3,4 @@ pub mod bench; pub mod project_root; pub mod test_program; -pub use nickel_lang_lib; +pub use nickel_lang_core; diff --git a/utilities/src/project_root.rs b/utils/src/project_root.rs similarity index 93% rename from utilities/src/project_root.rs rename to utils/src/project_root.rs index d7051243..9e28e401 100644 --- a/utilities/src/project_root.rs +++ b/utils/src/project_root.rs @@ -2,7 +2,7 @@ use std::path::PathBuf; /// Return a [`PathBuf`] pointing to the workspace root of Nickel repository. For example, use /// ```rust -/// # use nickel_lang_utilities::project_root::project_root; +/// # use nickel_lang_utils::project_root::project_root; /// # use std::path::PathBuf; /// let readme = project_root().join("README.md"); /// # assert_eq!(readme, PathBuf::from(&concat!(env!("CARGO_MANIFEST_DIR"), "/../README.md"))) diff --git a/utilities/src/test_program.rs b/utils/src/test_program.rs similarity index 98% rename from utilities/src/test_program.rs rename to utils/src/test_program.rs index 93d46b92..28adc772 100644 --- a/utilities/src/test_program.rs +++ b/utils/src/test_program.rs @@ -1,6 +1,6 @@ use codespan::Files; -use nickel_lang_lib::{ +use nickel_lang_core::{ error::{Error, ParseError}, eval::cache::CacheImpl, parser::{grammar, lexer, ErrorTolerantParser}, diff --git a/nickel-wasm-repl/Cargo.toml b/wasm-repl/Cargo.toml similarity index 61% rename from nickel-wasm-repl/Cargo.toml rename to wasm-repl/Cargo.toml index af57bf89..4f96523e 100644 --- a/nickel-wasm-repl/Cargo.toml +++ b/wasm-repl/Cargo.toml @@ -1,6 +1,6 @@ [package] -name = "nickel-repl" -readme = "README.md" +name = "nickel-wasm-repl" +version = "0.1.0" description = "WebAssembly REPL for the Nickel programming language." authors.workspace = true edition.workspace = true @@ -8,10 +8,9 @@ homepage.workspace = true keywords.workspace = true license.workspace = true repository.workspace = true -version.workspace = true [dependencies] -nickel-lang-lib = {default-features = false, path = "../nickel-lang-lib", version = "1.0.0", features=["repl-wasm"]} +nickel-lang-core = { workspace = true, default-features = false, features = ["repl-wasm"] } [lib] crate-type = ["cdylib", "rlib"] diff --git a/wasm-repl/src/lib.rs b/wasm-repl/src/lib.rs new file mode 100644 index 00000000..4ef8e84a --- /dev/null +++ b/wasm-repl/src/lib.rs @@ -0,0 +1 @@ +pub use nickel_lang_core::*;