Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
- Remove `packagesFromDirectory` because
  `lib.packagesFromDirectoryRecursive` is upstreamed now
- Update Nix and Rust dependencies
- Add GHC 9.8 to the test suite
  • Loading branch information
9999years committed Jan 8, 2024
1 parent 3743355 commit c6f0a43
Show file tree
Hide file tree
Showing 12 changed files with 260 additions and 322 deletions.
384 changes: 225 additions & 159 deletions Cargo.lock

Large diffs are not rendered by default.

101 changes: 19 additions & 82 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
nixpkgs.url = "github:NixOS/nixpkgs";
crane = {
url = "github:ipetkov/crane";
inputs.flake-compat.follows = "flake-compat";
inputs.nixpkgs.follows = "nixpkgs";
};
systems.url = "github:nix-systems/default";
Expand Down Expand Up @@ -78,6 +77,7 @@
"ghc92"
"ghc94"
"ghc96"
"ghc98"
];
in {
packages = eachSystem (
Expand Down
11 changes: 5 additions & 6 deletions nix/makePackages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
inputs,
}:
lib.makeScope newScope (
self: let
packagesFromDirectory = (import ./packagesFromDirectory.nix) {
inherit lib;
self:
{inherit inputs;}
// (lib.packagesFromDirectoryRecursive {
inherit (self) callPackage;
};
in
{inherit inputs;} // (packagesFromDirectory ./packages)
directory = ./packages;
})
)
65 changes: 0 additions & 65 deletions nix/packagesFromDirectory.nix

This file was deleted.

1 change: 0 additions & 1 deletion src/ghci/parse/ghc_message/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use winnow::combinator::fold_repeat;
use winnow::prelude::*;

mod position;
pub use position::Position;
pub use position::PositionRange;

mod severity;
Expand Down
4 changes: 2 additions & 2 deletions src/ghci/parse/ghc_message/path_colon.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
use camino::Utf8Path;
use winnow::combinator::terminated;
use winnow::token::take_till1;
use winnow::token::take_till;
use winnow::PResult;
use winnow::Parser;

/// A filename, followed by a `:`.
pub fn path_colon<'i>(input: &mut &'i str) -> PResult<&'i Utf8Path> {
// TODO: Support Windows drive letters.
terminated(take_till1((':', '\n')), ":")
terminated(take_till(1.., (':', '\n')), ":")
.parse_next(input)
.map(Utf8Path::new)
}
Expand Down
2 changes: 0 additions & 2 deletions src/ghci/parse/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ pub use ghc_message::CompilationResult;
pub use ghc_message::CompilationSummary;
pub use ghc_message::GhcDiagnostic;
pub use ghc_message::GhcMessage;
pub use ghc_message::Position;
pub use ghc_message::PositionRange;
pub use ghc_message::Severity;
pub use module_and_files::Module;
pub use module_set::ModuleSet;
Expand Down
4 changes: 2 additions & 2 deletions src/ghci/parse/module_and_files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use winnow::error::ContextError;
use winnow::error::ErrMode;
use winnow::error::StrContext;
use winnow::error::StrContextValue;
use winnow::token::take_till1;
use winnow::token::take_till;
use winnow::token::take_until1;
use winnow::PResult;
use winnow::Parser;
Expand Down Expand Up @@ -58,7 +58,7 @@ pub fn module_and_files(input: &mut &str) -> PResult<Module> {

// Parse this bit: `( Foo.hs, Foo.o, interpreted )`
let _ = "( ".parse_next(input)?;
let mut paths: Vec<_> = repeat(0.., (take_till1((',', '\n')), ", ")).parse_next(input)?;
let mut paths: Vec<_> = repeat(0.., (take_till(1.., (',', '\n')), ", ")).parse_next(input)?;
let final_path = (take_until1(" )"), " )").parse_next(input)?;
paths.push(final_path);

Expand Down
5 changes: 4 additions & 1 deletion test-harness/src/ghc_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ pub enum GhcVersion {
Ghc94,
/// GHC 9.6
Ghc96,
/// GHC 9.8
Ghc98,
}

fn ghc_version_re() -> &'static Regex {
Expand All @@ -63,8 +65,9 @@ impl FromStr for GhcVersion {
("9", "2") => Ok(Self::Ghc92),
("9", "4") => Ok(Self::Ghc94),
("9", "6") => Ok(Self::Ghc96),
("9", "8") => Ok(Self::Ghc98),
(_, _) => Err(miette!(
"Only GHC versions 9.0, 9.2, 9.4, and 9.6 are supported"
"Only GHC versions 9.0, 9.2, 9.4, 9.6, and 9.8 are supported"
)),
}
}
Expand Down
1 change: 1 addition & 0 deletions test-harness/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ mod matcher;
pub use matcher::BaseMatcher;
pub use matcher::IntoMatcher;
pub use matcher::Matcher;
pub use matcher::OptionMatcher;
pub use matcher::OrMatcher;

mod fs;
Expand Down
2 changes: 1 addition & 1 deletion tests/error_log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ async fn can_write_error_log_compilation_errors() {
3 | myIdent = "Uh oh!"
| ^^^^^^^^
"#]],
Ghc96 => expect![[r#"
Ghc96 | Ghc98 => expect![[r#"
src/My/Module.hs:3:11: error: [GHC-83865]
* Couldn't match type `[Char]' with `()'
Expected: ()
Expand Down

0 comments on commit c6f0a43

Please sign in to comment.