-
Notifications
You must be signed in to change notification settings - Fork 0
Feat: Density Functions #15
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
Changes from all commits
75cc770
c9459e9
bab6514
4d2e7a7
f059487
770715e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| [language-server.mms-lsp] | ||
| command = "go" | ||
| args = ["run", "main.go", "lsp"] | ||
|
|
||
| [[language]] | ||
| name = "mms" | ||
| scope = "source.mms" | ||
| injection-regex = "mms" | ||
| file-types = ["mms"] | ||
| comment-tokens = "#" | ||
| language-servers = [ "mms-lsp" ] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,54 @@ | ||
| github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= | ||
| github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= | ||
| github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= | ||
| github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= | ||
| github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= | ||
| github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= | ||
| github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= | ||
| github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= | ||
| github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= | ||
| github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= | ||
| github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= | ||
| github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= | ||
| github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= | ||
| github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= | ||
| github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= | ||
| github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= | ||
| github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= | ||
| github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= | ||
| github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo= | ||
| github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8= | ||
| github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 h1:q2e307iGHPdTGp0hoxKjt1H5pDo6utceo3dQVK3I5XQ= | ||
| github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= | ||
| github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= | ||
| github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= | ||
| github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= | ||
| github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= | ||
| github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= | ||
| github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= | ||
| github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= | ||
| github.com/sourcegraph/jsonrpc2 v0.2.0 h1:KjN/dC4fP6aN9030MZCJs9WQbTOjWHhrtKVpzzSrr/U= | ||
| github.com/sourcegraph/jsonrpc2 v0.2.0/go.mod h1:ZafdZgk/axhT1cvZAPOhw+95nz2I/Ra5qMlU4gTRwIo= | ||
| github.com/spf13/cobra v1.9.1 h1:CXSaggrXdbHK9CF+8ywj8Amf7PBRmPCOJugH954Nnlo= | ||
| github.com/spf13/cobra v1.9.1/go.mod h1:nDyEzZ8ogv936Cinf6g1RU9MRY64Ir93oCnqb9wxYW0= | ||
| github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= | ||
| github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= | ||
| github.com/tliron/commonlog v0.2.8 h1:vpKrEsZX4nlneC9673pXpeKqv3cFLxwpzNEZF1qiaQQ= | ||
| github.com/tliron/commonlog v0.2.8/go.mod h1:HgQZrJEuiKLLRvUixtPWGcmTmWWtKkCtywF6x9X5Spw= | ||
| github.com/tliron/glsp v0.2.2 h1:IKPfwpE8Lu8yB6Dayta+IyRMAbTVunudeauEgjXBt+c= | ||
| github.com/tliron/glsp v0.2.2/go.mod h1:GMVWDNeODxHzmDPvYbYTCs7yHVaEATfYtXiYJ9w1nBg= | ||
| github.com/tliron/kutil v0.3.11 h1:kongR0dhrrn9FR/3QRFoUfQe27t78/xQvrU9aXIy5bk= | ||
| github.com/tliron/kutil v0.3.11/go.mod h1:4IqOAAdpJuDxYbJxMv4nL8LSH0mPofSrdwIv8u99PDc= | ||
| golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= | ||
| golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= | ||
| golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= | ||
| golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= | ||
| golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= | ||
| golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= | ||
| golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | ||
| golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= | ||
| golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= | ||
| golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= | ||
| golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= | ||
| gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= | ||
| gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,16 +1,44 @@ | ||||||
| grammar Core_Lang; | ||||||
|
|
||||||
| import Noise, DensityFunctions, Surface; | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Break circular grammar import (Core_Lang ↔ DensityFunctions). Core_Lang imports DensityFunctions, and DensityFunctions imports Core_Lang. ANTLR import cycles are not supported and will fail generation. Move densityFn-dependent builders out of Core_Lang and drop the import. -import Noise, DensityFunctions, Surface;
+import Noise, Surface;📝 Committable suggestion
Suggested change
|
||||||
|
|
||||||
| builder_XZScale: '.XZScale(' NL* number NL* ')'; | ||||||
| builder_YScale: '.YScale(' NL* number NL* ')'; | ||||||
| builder_XZFactor: '.XZFactor(' NL* number NL* ')'; | ||||||
| builder_YFactor: '.YFactor(' NL* number NL* ')'; | ||||||
| builder_Noise: '.Noise' (noiseDefinition | ('(' NL* resourceReference NL* ')')); | ||||||
| builder_Smear: 'Smear' '(' NL* number NL* ')'; | ||||||
| builder_Type1: '.Type1' '(' ')'; | ||||||
| builder_Type2: '.Type2' '(' ')'; | ||||||
| builder_ShiftX: '.ShiftX' '(' NL* densityFn NL* ')'; | ||||||
| builder_ShiftY: '.ShiftY' '(' NL* densityFn NL* ')'; | ||||||
| builder_ShiftZ: '.ShiftZ' '(' NL* densityFn NL* ')'; | ||||||
| builder_Amplitudes: '.Amplitudes' '(' (number ',')* number ')'; | ||||||
| builder_Offset: '.Offset' '(' NL* Int NL* ')'; | ||||||
| builder_Add:'.Add' '(' ')' ; | ||||||
| builder_Mul: '.Mul(' NL* number NL* ')'; | ||||||
| builder_MulInt: '.Mul(' NL* Int NL* ')'; | ||||||
| builder_Min: '.Min(' NL* number NL* ')'; | ||||||
| builder_Max: '.Max(' NL* number NL* ')'; | ||||||
| builder_Top: '.Top' '(' NL* verticalAnchor NL* ')'; | ||||||
| builder_TopLiteral: '.Top' '(' Int ')'; | ||||||
| builder_Bottom: '.Bottom' '(' NL* verticalAnchor NL* ')'; | ||||||
| builder_BottomLiteral: '.Bottom' '('NL* Int NL* ')'; | ||||||
| builder_InRange: '.InRange' '(' NL* densityFn NL* ')'; | ||||||
| builder_OutRange: '.OutRange' '(' NL* densityFn NL* ')'; | ||||||
|
|
||||||
|
|
||||||
| resourceReference: (Identifier ':')? Identifier; | ||||||
|
|
||||||
|
|
||||||
| Int: '-'? [0-9]+; | ||||||
| Float: ('-'? [0-9]+ '.' [0-9]+); | ||||||
| Float: ('-'? [0-9]* '.' [0-9]+); | ||||||
| String: '"' ~[\r\n]* '"'; | ||||||
| number: Int | Float; | ||||||
|
|
||||||
| NL: [\n]; | ||||||
| WS: [ \t]+ -> skip; | ||||||
| Identifier: [a-zA-Z][a-zA-Z0-9_]*; | ||||||
| Identifier: [a-zA-Z] [a-zA-Z0-9_/]*; | ||||||
|
|
||||||
| BlockComment: '/*' .*? '*/' -> channel(HIDDEN); | ||||||
| LineComment: '//' ~[\r\n]* -> channel(HIDDEN); | ||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,98 @@ | ||||||||||||||||||
| grammar DensityFunctions; | ||||||||||||||||||
|
|
||||||||||||||||||
| import Core_Lang, Noise; | ||||||||||||||||||
|
|
||||||||||||||||||
| densityFnBlock: 'DensityFn' NL* '{' NL* (densityFnDeclaration NL*)* NL* '}'; | ||||||||||||||||||
|
|
||||||||||||||||||
| densityFnDeclaration: Identifier NL* '=' NL* densityFn; | ||||||||||||||||||
| densityFn: ( | ||||||||||||||||||
| densityFn_SingleInput | ||||||||||||||||||
| | densityFn_Cache | ||||||||||||||||||
| | densityFn_DualInput | ||||||||||||||||||
| | densityFn_Constant | ||||||||||||||||||
| | densityFn_Noise | ||||||||||||||||||
| | densityFn_NoInput | ||||||||||||||||||
| | densityFn_OldBlendedNoise | ||||||||||||||||||
| | densityFn_WierdScaledSampler | ||||||||||||||||||
| | densityFn_ShiftedNoise | ||||||||||||||||||
| | densityFn_RangeChoice | ||||||||||||||||||
| | densityFn_Clamp | ||||||||||||||||||
| | densityFn_YClampedGradient | ||||||||||||||||||
| | densityFn_SplineFn | ||||||||||||||||||
| | densityFn_Reference // should be last | ||||||||||||||||||
| ) densityFn_Math?; | ||||||||||||||||||
|
|
||||||||||||||||||
| densityFn_NoInput: ( | ||||||||||||||||||
| 'BlendAlpha' | ||||||||||||||||||
| | 'BlendOffset' | ||||||||||||||||||
| | 'EndIslands' | ||||||||||||||||||
| ); | ||||||||||||||||||
|
|
||||||||||||||||||
| densityFn_SingleInput: ( | ||||||||||||||||||
| 'Interpolated' | ||||||||||||||||||
| | 'BlendDensity' | ||||||||||||||||||
| | 'FlatCache' | ||||||||||||||||||
| | 'Abs' | ||||||||||||||||||
| | 'Square' | ||||||||||||||||||
| | 'Cube' | ||||||||||||||||||
| | 'HalfNeg' | ||||||||||||||||||
| | 'QuarterNeg' | ||||||||||||||||||
| | 'Squeeze' | ||||||||||||||||||
| | 'Shift' | ||||||||||||||||||
| | 'ShiftA' | ||||||||||||||||||
| | 'ShiftB' | ||||||||||||||||||
| ) NL* '(' NL* densityFn NL* ')'; | ||||||||||||||||||
|
|
||||||||||||||||||
| densityFn_InlineNoise: noise; | ||||||||||||||||||
|
|
||||||||||||||||||
| densityFn_Noise: ( | ||||||||||||||||||
| ('Noise' NL* '(' NL* (resourceReference) NL* ')') | densityFn_InlineNoise | ||||||||||||||||||
| ) NL* (densityFn_NoiseBuilder NL*)*; | ||||||||||||||||||
|
|
||||||||||||||||||
| densityFn_NoiseBuilder: builder_XZScale | builder_YScale; | ||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Localize densityFn-dependent builders here to break grammar cycle (paired with Core_Lang.g4 change). These builders reference densityFn_NoiseBuilder: builder_XZScale | builder_YScale;
+
+// densityFn-scoped builders (moved from Core_Lang to avoid circular import)
+builder_Shift: '.Shift' '(' Axis ',' densityFn ')';
+builder_InRange: '.InRange' '(' densityFn ')';
+builder_OutRange: '.OutRange' '(' densityFn ')';📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||
|
|
||||||||||||||||||
| DensityFn_CacheKind: '2d' | 'Once' | 'All'; | ||||||||||||||||||
| densityFn_Cache: 'Cache' NL* '(' NL* DensityFn_CacheKind NL* ',' NL* densityFn NL* ')'; | ||||||||||||||||||
|
|
||||||||||||||||||
| densityFn_DualInput: ( | ||||||||||||||||||
| | 'Min' | ||||||||||||||||||
| | 'Max' | ||||||||||||||||||
| ) NL* '(' NL* densityFn ',' NL* densityFn NL* ')'; | ||||||||||||||||||
|
Comment on lines
+57
to
+60
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove stray empty alternative in densityFn_DualInput (parsing bug). The leading Apply: -densityFn_DualInput: (
- | 'Min'
- | 'Max'
-) NL* '(' NL* densityFn ',' NL* densityFn NL* ')';
+densityFn_DualInput: (
+ 'Min'
+ | 'Max'
+) NL* '(' NL* densityFn ',' NL* densityFn NL* ')';📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||
|
|
||||||||||||||||||
| densityFn_OldBlendedNoise: 'OldBlendedNoise' NL* '(' NL* ')' NL* (densityFn_OldBlendedNoiseBuilder NL*)*; | ||||||||||||||||||
| densityFn_OldBlendedNoiseBuilder: | ||||||||||||||||||
| builder_XZScale | ||||||||||||||||||
| | builder_YScale | ||||||||||||||||||
| | builder_XZFactor | ||||||||||||||||||
| | builder_YFactor | ||||||||||||||||||
| | builder_Smear; | ||||||||||||||||||
|
|
||||||||||||||||||
|
|
||||||||||||||||||
| densityFn_WierdScaledSampler: 'WeirdScaledSampler' NL* '(' NL* densityFn NL* ')' NL* (densityFn_WierdScaledSamplerBuilder NL*)*; | ||||||||||||||||||
|
|
||||||||||||||||||
| densityFn_WierdScaledSamplerBuilder: builder_Type1 | builder_Type2 | builder_Noise; | ||||||||||||||||||
|
|
||||||||||||||||||
| densityFn_ShiftedNoise: 'ShiftedNoise' NL* '(' NL* ')' NL* (densityFn_ShiftedNoiseBuilder NL*)*; | ||||||||||||||||||
| densityFn_ShiftedNoiseBuilder: builder_Noise | builder_XZScale | builder_YScale | builder_ShiftX | builder_ShiftY | builder_ShiftZ; | ||||||||||||||||||
|
|
||||||||||||||||||
| densityFn_RangeChoice: 'RangeChoice' NL* '(' NL* densityFn NL* ')' NL* (densityFn_RangeChoiceBuilder NL*)*; | ||||||||||||||||||
| densityFn_RangeChoiceBuilder: builder_Min | builder_Max | builder_InRange | builder_OutRange; | ||||||||||||||||||
|
|
||||||||||||||||||
| densityFn_Clamp: 'Clamp' NL* '(' densityFn ')' NL* (densityFn_ClampBuilder NL*)*; | ||||||||||||||||||
| densityFn_ClampBuilder: builder_Min | builder_Max; | ||||||||||||||||||
|
|
||||||||||||||||||
| densityFn_YClampedGradient: 'YClampedGradient' NL* '(' NL* ')' NL* (densityFn_YClampedGradientBuilder NL*)*; | ||||||||||||||||||
| densityFn_YClampedGradientBuilder: builder_TopLiteral | builder_BottomLiteral | builder_Min | builder_Max; | ||||||||||||||||||
|
|
||||||||||||||||||
| densityFn_SplineFn: densityFn_Spline; | ||||||||||||||||||
| densityFn_Spline: 'Spline' NL* (('(' NL* densityFn NL* ')' NL* (densityFn_SplinePoint NL*)* ) | '(' number ')'); | ||||||||||||||||||
| densityFn_SplinePoint: '.Point' '(' number ',' (number | densityFn_Spline | resourceReference) ',' number ')'; | ||||||||||||||||||
|
Comment on lines
+88
to
+89
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Eliminate Spline ambiguity (both alts match Spline(number)). As written, Spline(5) matches both alts since number ∈ densityFn_Constant. Require at least one .Point when using the densityFn alt, or drop the number-only alternative. Apply: -densityFn_Spline: 'Spline' NL* (('(' NL* densityFn NL* ')' NL* (densityFn_SplinePoint NL*)* ) | '(' number ')');
+densityFn_Spline:
+ 'Spline' NL* (
+ '(' NL* densityFn NL* ')' NL* (densityFn_SplinePoint NL*)+
+ | '(' NL* number NL* ')'
+ );📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||
|
|
||||||||||||||||||
| densityFn_Constant: number; | ||||||||||||||||||
| densityFn_Reference: resourceReference; | ||||||||||||||||||
| densityFn_Math: ('+' | '*') NL* densityFn; | ||||||||||||||||||
|
|
||||||||||||||||||
|
|
||||||||||||||||||
| /* | ||||||||||||||||||
| 5.15 spline | ||||||||||||||||||
| */ | ||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,10 @@ | ||
| grammar MinecraftMetascript; | ||
|
|
||
| import Surface, Noise, Core_Lang; | ||
| import Surface,DensityFunctions, Noise, Core_Lang; | ||
|
|
||
| script: NL* (namespace NL*)*; | ||
|
|
||
| namespaceDeclaration: 'namespace' Identifier; | ||
| namespaceDeclaration: 'Namespace' Identifier; | ||
| namespace: namespaceDeclaration NL* '{' NL* (contentBlocks NL*)* NL* '}'; | ||
|
|
||
| contentBlocks: surfaceBlock | noiseBlock; | ||
| contentBlocks: surfaceBlock | noiseBlock | densityFnBlock; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Critical: golang.org/x/crypto v0.15.0 has multiple CRITICAL vulns — bump to a safe version
Static analysis flags several critical advisories on v0.15.0. Please upgrade x/crypto to the latest patched release and re-tidy.
Run to determine and apply the latest version, then verify vuln closure:
🏁 Script executed:
Length of output: 210
🏁 Script executed:
Length of output: 109
🏁 Script executed:
Length of output: 969
Critical: Upgrade applied but tidy failing due to missing grammar module
go mod tidynow errors ongithub.com/minecraftmetascript/mms/lang/grammar: ensure that package path exists or update the import/version for the grammar module before merging🧰 Tools
🪛 OSV Scanner (2.1.0)
[CRITICAL] 28-28: golang.org/x/crypto 0.15.0: Man-in-the-middle attacker can compromise integrity of secure channel in golang.org/x/crypto
(GO-2023-2402)
[CRITICAL] 28-28: golang.org/x/crypto 0.15.0: Misuse of connection.serverAuthenticate may cause authorization bypass in golang.org/x/crypto
(GO-2024-3321)
[CRITICAL] 28-28: golang.org/x/crypto 0.15.0: Potential denial of service in golang.org/x/crypto
(GO-2025-3487)
[CRITICAL] 28-28: golang.org/x/crypto 0.15.0: Prefix Truncation Attack against ChaCha20-Poly1305 and Encrypt-then-MAC aka Terrapin
(GHSA-45x7-px36-x8w8)
[CRITICAL] 28-28: golang.org/x/crypto 0.15.0: golang.org/x/crypto Vulnerable to Denial of Service (DoS) via Slow or Incomplete Key Exchange
(GHSA-hcg3-q754-cr77)
[CRITICAL] 28-28: golang.org/x/crypto 0.15.0: Misuse of ServerConfig.PublicKeyCallback may cause authorization bypass in golang.org/x/crypto
(GHSA-v778-237x-gjrc)
🤖 Prompt for AI Agents