Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: release 0.6 #51

Merged
merged 10 commits into from
Aug 19, 2024
File renamed without changes.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
fetch-depth: 0

- uses: cocogitto/cocogitto-action@v3.5
- uses: cocogitto/cocogitto-action@v3.8
with:
check-latest-tag-only: true
git-user: glsl-lang
Expand Down Expand Up @@ -155,7 +155,7 @@ jobs:
&& cargo-workspaces -V
)

- uses: cocogitto/cocogitto-action@v3.5
- uses: cocogitto/cocogitto-action@v3.8
id: release
# Set to true because the action fails if there's nothing to release
continue-on-error: true
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ on:
jobs:
release-docs:
name: Build docs

runs-on: ubuntu-latest

permissions:
contents: write

steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
Expand Down
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,33 @@
## [Unreleased]

- - -
## v0.6.0-beta.1 - 2024-08-19
#### Bug Fixes
- **(deps)** update rust crate derive_more to v1 - (0315528) - renovate[bot]
- **(deps)** update all non-major dependencies - (65b144f) - renovate[bot]
- **(glsl-lang-quote)** correctly parse #(ident) at line start - (c47f7fc) - *alixinne*
- update github profile information - (2beea1f) - Alix Tavernier
#### Build system
- set resolver to 2 - (73544c2) - alixinne
#### Features
- rename lang_util(as) to lang_util(parser) - (1902047) - alixinne
#### Miscellaneous Chores
- **(cog)** allow releases on next branch - (8a47fde) - *alixinne*
- **(deps)** update softprops/action-gh-release action to v2 - (2c27d68) - renovate[bot]
- **(deps)** update peaceiris/actions-gh-pages action to v4 - (37d2da5) - renovate[bot]
- **(deps)** update rust crate glsl to v7 - (e8782ee) - renovate[bot]
- **(deps)** update actions/cache action to v4 - (76c7bd2) - renovate[bot]
- **(deps)** update actions/checkout action to v4 - (be49ea6) - renovate[bot]
- **(deps)** update actions/cache action to v3 - (b159bfb) - renovate[bot]
- **(version)** v0.5.3 [skip ci] - (ef30eef) - glsl-lang
- **(version)** v0.5.2 [skip ci] - (c0ada55) - glsl-lang
- fix script headers - (d746dcf) - alixinne
- fix clippy warnings - (b0ccc3f) - alixinne
- fix clippy warnings - (c28f583) - alixinne
- bump rust version to 1.74.0 - (23a3c9b) - alixinne

- - -

## v0.5.3 - 2024-07-23
#### Bug Fixes
- **(glsl-lang-quote)** correctly parse #(ident) at line start - (c47f7fc) - *alixinne*
Expand Down
2 changes: 1 addition & 1 deletion ci/bumpver.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -eux

Expand Down
2 changes: 1 addition & 1 deletion ci/readme.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

CHECK_MODE=0

Expand Down
2 changes: 1 addition & 1 deletion ci/release.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -e

Expand Down
1 change: 1 addition & 0 deletions cog.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ignore_merge_commits = true
branch_whitelist = [
"master",
"next",
]
pre_bump_hooks = [
"./ci/bumpver.sh {{version}}",
Expand Down
2 changes: 1 addition & 1 deletion data/validate-shaders.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# This script validates shaders (if successfully compiled) using spirv-val.
# It is not meant to preclude the possible addition of the validator to
Expand Down
2 changes: 1 addition & 1 deletion fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ path = "src/bin/lang_test.rs"
[dependencies]
glsl-lang-pp = "*"
glsl-lang = "*"
afl = "0.11"
afl = "0.15"
argh = "0.1.5"
2 changes: 1 addition & 1 deletion fuzz/fuzz.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -euo pipefail

Expand Down
8 changes: 4 additions & 4 deletions lang-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "glsl-lang-cli"
version = "0.5.3"
version = "0.6.0-beta.1"
authors = ["Alixinne <alixinne@pm.me>"]
edition = "2021"
license = "BSD-3-Clause"
Expand All @@ -13,9 +13,9 @@ keywords = ["glsl", "language", "parser", "ast", "cli"]
categories = ["command-line-interface", "parser-implementations", "rendering"]

[dependencies]
glsl-lang = { version = "=0.5.3", features = ["lexer-v2-full"] }
glsl-lang-pp = { version = "=0.5.3" }
lang-util = "=0.5.3"
glsl-lang = { version = "=0.6.0-beta.1", features = ["lexer-v2-full"] }
glsl-lang-pp = { version = "=0.6.0-beta.1" }
lang-util = "=0.6.0-beta.1"
argh = "0.1"

serde_json = { version = "1.0", optional = true }
Expand Down
8 changes: 4 additions & 4 deletions lang-lexer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "glsl-lang-lexer"
version = "0.5.3"
version = "0.6.0-beta.1"
authors = ["Alixinne <alixinne@pm.me>"]
edition = "2021"
license = "BSD-3-Clause"
Expand All @@ -13,8 +13,8 @@ keywords = ["glsl", "language", "parser"]
categories = ["parser-implementations", "rendering"]

[dependencies]
glsl-lang-types = "=0.5.3"
lang-util = { version = "=0.5.3", features = ["lalrpop"] }
glsl-lang-types = "=0.6.0-beta.1"
lang-util = { version = "=0.6.0-beta.1", features = ["lalrpop"] }

thiserror = "1.0"

Expand All @@ -24,7 +24,7 @@ rserde = { version = "1.0", optional = true, features = ["derive"], package = "s
logos = { version = "0.12", optional = true }

# v2 lexer dependencies
glsl-lang-pp = { version = "=0.5.3", optional = true }
glsl-lang-pp = { version = "=0.6.0-beta.1", optional = true }
lalrpop-util = { version = "0.20.0", default-features = false, optional = true }

[features]
Expand Down
4 changes: 4 additions & 0 deletions lang-lexer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ use lang_util::position::LexerPosition;
pub use token::*;

#[cfg(feature = "v1")]
#[deprecated(
since = "0.6.0",
note = "the v1 lexer is not spec-compliant and relies on outdated dependencies. It will be removed in glsl-lang 0.7.0"
)]
pub mod v1;

#[cfg(any(feature = "v2-min", feature = "v2-full"))]
Expand Down
74 changes: 39 additions & 35 deletions lang-lexer/src/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -766,9 +766,9 @@ pub enum Token {
feature = "v1",
regex("#\\s*\\(\\s*[a-zA-Z_][a-zA-Z_0-9]*\\s*\\)", parse_rs_ident)
)]
#[lang_util(as = "ident", kind = "identifier")]
#[lang_util(parser = "ident", kind = "identifier")]
Identifier(SmolStr),
#[lang_util(as = "ty_name", kind = "type name")]
#[lang_util(parser = "ty_name", kind = "type name")]
TypeName(SmolStr), // Cast from Identifier depending on known type names
#[cfg_attr(
feature = "v1",
Expand All @@ -778,21 +778,21 @@ pub enum Token {
)
)]
#[cfg_attr(feature = "v1", regex(r"[0-9]+[eE][+-]?[0-9]+(f|F)?", parse_f32))]
#[lang_util(as = "float_constant", kind = "literal")]
#[lang_util(parser = "float_constant", kind = "literal")]
FloatConstant(f32),
#[cfg_attr(feature = "v1", regex(r"0[0-7]*", |lex| parse_int(lex, 8)))]
#[cfg_attr(feature = "v1", regex(r"[1-9][0-9]*", |lex| parse_int(lex, 10)))]
#[cfg_attr(feature = "v1", regex(r"0[xX][0-9A-Fa-f]+", |lex| parse_int(lex, 16)))]
#[lang_util(as = "int_constant", kind = "literal")]
#[lang_util(parser = "int_constant", kind = "literal")]
IntConstant(i32),
#[cfg_attr(feature = "v1", regex(r"0[0-7]*[uU]", |lex| parse_uint(lex, 8)))]
#[cfg_attr(feature = "v1", regex(r"[1-9][0-9]*[uU]", |lex| parse_uint(lex, 10)))]
#[cfg_attr(feature = "v1", regex(r"0[xX][0-9A-Fa-f]+[uU]", |lex| parse_uint(lex, 16)))]
#[lang_util(as = "uint_constant", kind = "literal")]
#[lang_util(parser = "uint_constant", kind = "literal")]
UIntConstant(u32),
#[cfg_attr(feature = "v1", token("true", |_| true))]
#[cfg_attr(feature = "v1", token("false", |_| false))]
#[lang_util(as = "bool_constant", kind = "literal")]
#[lang_util(parser = "bool_constant", kind = "literal")]
BoolConstant(bool),
#[cfg_attr(
feature = "v1",
Expand All @@ -802,7 +802,7 @@ pub enum Token {
)
)]
#[cfg_attr(feature = "v1", regex(r"[0-9]+[eE][+-]?[0-9]+(lf|LF)", parse_f64))]
#[lang_util(as = "double_constant", kind = "literal")]
#[lang_util(parser = "double_constant", kind = "literal")]
DoubleConstant(f64),
#[cfg_attr(feature = "v1", token("<<"))]
#[lang_util(token = "<<", kind = "binary operator", kind = "operator")]
Expand Down Expand Up @@ -974,89 +974,93 @@ pub enum Token {

// TODO: Line continuation can happen inside tokens
#[cfg_attr(feature = "v1", regex("([ \t\r\n]|\\\\\r?\n)+", logos::skip))]
#[lang_util(display = "<whitespace>", as(display), kind = "trivia")]
#[lang_util(display = "<whitespace>", parser(display), kind = "trivia")]
Whitespace,
#[cfg_attr(feature = "v1", regex("//(.|\\\\\r?\n)*", |lex| { parse_cmt(lex, true); logos::Skip }))]
#[lang_util(display = "<single line comment>", as(display), kind = "trivia")]
#[lang_util(display = "<single line comment>", parser(display), kind = "trivia")]
SingleLineComment,
#[cfg_attr(feature = "v1", regex("/\\*([^*]|\\*[^/])+\\*/", |lex| { parse_cmt(lex, false); logos::Skip }))]
#[lang_util(display = "<multi line comment>", as(display), kind = "trivia")]
#[lang_util(display = "<multi line comment>", parser(display), kind = "trivia")]
MultiLineComment,

// TODO: Line continuations in preprocessor pragmas?
#[cfg_attr(feature = "v1", regex("#([ \t]|\\\\\r?\n)*define"))]
#[lang_util(display = "#define", as(display), kind = "preprocessor directive")]
#[lang_util(display = "#define", parser(display), kind = "preprocessor directive")]
PpDefine,
#[cfg_attr(feature = "v1", regex("#([ \t]|\\\\\r?\n)*else"))]
#[lang_util(display = "#else", as(display), kind = "preprocessor directive")]
#[lang_util(display = "#else", parser(display), kind = "preprocessor directive")]
PpElse,
#[cfg_attr(feature = "v1", regex("#([ \t]|\\\\\r?\n)*elif"))]
#[lang_util(display = "#elif", as(display), kind = "preprocessor directive")]
#[lang_util(display = "#elif", parser(display), kind = "preprocessor directive")]
PpElif,
#[cfg_attr(feature = "v1", regex("#([ \t]|\\\\\r?\n)*endif"))]
#[lang_util(display = "#endif", as(display), kind = "preprocessor directive")]
#[lang_util(display = "#endif", parser(display), kind = "preprocessor directive")]
PpEndIf,
#[cfg_attr(feature = "v1", regex("#([ \t]|\\\\\r?\n)*error"))]
#[lang_util(display = "#error", as(display), kind = "preprocessor directive")]
#[lang_util(display = "#error", parser(display), kind = "preprocessor directive")]
PpError,
#[cfg_attr(feature = "v1", regex("#([ \t]|\\\\\r?\n)*if"))]
#[lang_util(display = "#if", as(display), kind = "preprocessor directive")]
#[lang_util(display = "#if", parser(display), kind = "preprocessor directive")]
PpIf,
#[cfg_attr(feature = "v1", regex("#([ \t]|\\\\\r?\n)*ifdef"))]
#[lang_util(display = "#ifdef", as(display), kind = "preprocessor directive")]
#[lang_util(display = "#ifdef", parser(display), kind = "preprocessor directive")]
PpIfDef,
#[cfg_attr(feature = "v1", regex("#([ \t]|\\\\\r?\n)*ifndef"))]
#[lang_util(display = "#ifndef", as(display), kind = "preprocessor directive")]
#[lang_util(display = "#ifndef", parser(display), kind = "preprocessor directive")]
PpIfNDef,
#[cfg_attr(feature = "v1", regex("#([ \t]|\\\\\r?\n)*include"))]
#[lang_util(display = "#include", as(display), kind = "preprocessor directive")]
#[lang_util(display = "#include", parser(display), kind = "preprocessor directive")]
PpInclude,
#[cfg_attr(feature = "v1", regex("#([ \t]|\\\\\r?\n)*line"))]
#[lang_util(display = "#line", as(display), kind = "preprocessor directive")]
#[lang_util(display = "#line", parser(display), kind = "preprocessor directive")]
PpLine,
#[cfg_attr(feature = "v1", regex("#([ \t]|\\\\\r?\n)*pragma"))]
#[lang_util(display = "#pragma", as(display), kind = "preprocessor directive")]
#[lang_util(display = "#pragma", parser(display), kind = "preprocessor directive")]
PpPragma,
#[cfg_attr(feature = "v1", regex("#([ \t]|\\\\\r?\n)*undef"))]
#[lang_util(display = "#undef", as(display), kind = "preprocessor directive")]
#[lang_util(display = "#undef", parser(display), kind = "preprocessor directive")]
PpUndef,
#[cfg_attr(feature = "v1", regex("#([ \t]|\\\\\r?\n)*version"))]
#[lang_util(display = "#version", as(display), kind = "preprocessor directive")]
#[lang_util(display = "#version", parser(display), kind = "preprocessor directive")]
PpVersion,
#[cfg_attr(feature = "v1", regex("#([ \t]|\\\\\r?\n)*extension"))]
#[lang_util(display = "#extension", as(display), kind = "preprocessor directive")]
#[lang_util(
display = "#extension",
parser(display),
kind = "preprocessor directive"
)]
PpExtension,

#[lang_util(
display = "<preprocessor string>",
as(display),
parser(display),
kind = "preprocessor string"
)]
PpRest(String),

#[lang_util(display = "core", as(display), kind = "version profile")]
#[lang_util(display = "core", parser(display), kind = "version profile")]
PpCore,
#[lang_util(display = "compatibility", as(display), kind = "version profile")]
#[lang_util(display = "compatibility", parser(display), kind = "version profile")]
PpCompatibility,
#[lang_util(display = "es", as(display), kind = "version profile")]
#[lang_util(display = "es", parser(display), kind = "version profile")]
PpEs,

#[lang_util(display = "require", as(display), kind = "extension behavior")]
#[lang_util(display = "require", parser(display), kind = "extension behavior")]
PpExtRequire,
#[lang_util(display = "enable", as(display), kind = "extension behavior")]
#[lang_util(display = "enable", parser(display), kind = "extension behavior")]
PpExtEnable,
#[lang_util(display = "warn", as(display), kind = "extension behavior")]
#[lang_util(display = "warn", parser(display), kind = "extension behavior")]
PpExtWarn,
#[lang_util(display = "disable", as(display), kind = "extension behavior")]
#[lang_util(display = "disable", parser(display), kind = "extension behavior")]
PpExtDisable,

#[lang_util(display = "<{}>", as(display), kind = "include path")]
#[lang_util(display = "<{}>", parser(display), kind = "include path")]
PpPathAbsolute(String),
#[lang_util(display = "\"{}\"", as(display), kind = "include path")]
#[lang_util(display = "\"{}\"", parser(display), kind = "include path")]
PpPathRelative(String),

#[cfg_attr(feature = "v1", error)]
#[lang_util(display = "<invalid token>", as(display), kind = "error")]
#[lang_util(display = "<invalid token>", parser(display), kind = "error")]
Error,
}

Expand Down
10 changes: 5 additions & 5 deletions lang-pp/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "glsl-lang-pp"
version = "0.5.3"
version = "0.6.0-beta.1"
authors = ["Alixinne <alixinne@pm.me>"]
edition = "2021"
license = "BSD-3-Clause"
Expand All @@ -14,25 +14,25 @@ categories = ["parser-implementations", "rendering"]
build = "build.rs"

[dependencies]
lang-util = "=0.5.3"
lang-util = "=0.6.0-beta.1"

string_cache = "0.8"
thiserror = "1.0"
arrayvec = "0.7"
derive_more = "0.99"
derive_more = { version = "1.0", features = ["display"] }

# Preprocessor
rowan = { version = "0.15", optional = true }
cbitset = { version = "0.2", optional = true }
static_assertions = { version = "1.1", optional = true }
bimap = { version = "0.6", optional = true }
itertools = { version = "0.10", optional = true }
itertools = { version = "0.13", optional = true }

# Extension registry
once_cell = { version = "1.17.1", optional = true }

[dev-dependencies]
lang-util-dev = "=0.5.3"
lang-util-dev = "=0.6.0-beta.1"

expect-test = "1.3"
encoding_rs = "0.8"
Expand Down
2 changes: 1 addition & 1 deletion lang-pp/src/lexer/glue/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,6 @@ impl Token {
impl From<crate::lexer::PreToken> for Token {
fn from(pre: crate::lexer::PreToken) -> Self {
// SAFETY: Token is a superset of PreToken
unsafe { std::mem::transmute(std::mem::transmute::<_, u16>(pre)) }
unsafe { std::mem::transmute(std::mem::transmute::<crate::lexer::PreToken, u16>(pre)) }
}
}
2 changes: 1 addition & 1 deletion lang-pp/src/parser/syntax_kind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ impl From<lexer::Token> for SyntaxKind {
}

// SAFETY: Aside from LINECONT, SyntaxKind is a superset of lexer::Token
unsafe { std::mem::transmute(std::mem::transmute::<_, u16>(s)) }
unsafe { std::mem::transmute(std::mem::transmute::<lexer::Token, u16>(s)) }
}
}

Expand Down
Loading
Loading