diff --git a/CHANGELOG.md b/CHANGELOG.md index e1651485..30c0b067 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## Unreleased +## [0.4.1] - 2019-11-13 +### Fixed +- Fixed Roblox standard library not including Lua 5.1 globals the first time you ran selene. + ## [0.4.0] - 2019-11-13 ### Added - A Roblox standard library can now be generated by simply having `std = "roblox"` in your configuration and running selene. If it does not exist, it will create one. This can also be initiated manually with `selene generate-roblox-std`. diff --git a/Cargo.lock b/Cargo.lock index 6ee57f24..25ee62ae 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1157,7 +1157,7 @@ dependencies = [ [[package]] name = "selene" -version = "0.4.0" +version = "0.4.1" dependencies = [ "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", "codespan 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/selene/Cargo.toml b/selene/Cargo.toml index aee4aeaf..da6cdf2b 100644 --- a/selene/Cargo.toml +++ b/selene/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "selene" -version = "0.4.0" +version = "0.4.1" license = "MPL-2.0" authors = ["Kampfkarren "] description = "A blazing-fast modern Lua linter written in Rust" diff --git a/selene/src/main.rs b/selene/src/main.rs index 6fc5cd6e..564d9209 100644 --- a/selene/src/main.rs +++ b/selene/src/main.rs @@ -258,13 +258,8 @@ fn read(checker: &Checker, filename: &Path, mut rea }, ); - codespan_reporting::term::emit( - &mut stdout, - &config, - &files, - &diagnostic, - ) - .expect("couldn't emit to codespan"); + codespan_reporting::term::emit(&mut stdout, &config, &files, &diagnostic) + .expect("couldn't emit to codespan"); } } } diff --git a/selene/src/roblox.rs b/selene/src/roblox.rs index d8cf93c2..d680b22e 100644 --- a/selene/src/roblox.rs +++ b/selene/src/roblox.rs @@ -64,6 +64,11 @@ impl RobloxGenerator { ) .map_err(GenerateError::Io)?; + self.std.extend( + StandardLibrary::from_name(&self.std.meta.as_ref().unwrap().base.as_ref().unwrap()) + .unwrap(), + ); + Ok((bytes, self.std)) }