Skip to content

Commit 2076c3a

Browse files
committed
Merge branch 'main' into run-package
2 parents 18940fb + 11119a7 commit 2076c3a

File tree

12 files changed

+781
-516
lines changed

12 files changed

+781
-516
lines changed

builder/src/Reporting/Exit.hs

Lines changed: 0 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ module Reporting.Exit
1313
replToReport,
1414
Validate (..),
1515
validateToReport,
16-
Install (..),
17-
installToReport,
1816
Uninstall (..),
1917
uninstallToReport,
2018
Outdated (..),
@@ -832,117 +830,6 @@ toDocsProblemReport problem context =
832830
\ for some reason."
833831
]
834832

835-
-- INSTALL
836-
837-
data Install
838-
= InstallNoOutline
839-
| InstallBadOutline Outline
840-
| InstallNoOnlineAppSolution Pkg.Name
841-
| InstallNoOnlinePkgSolution Pkg.Name
842-
| InstallHadSolverTrouble Solver
843-
| InstallNoSolverSolution
844-
| InstallNoCompatiblePkg Pkg.Name
845-
| InstallUnknownPackageOnline Pkg.Name [Pkg.Name]
846-
| InstallBadDetails Details
847-
848-
installToReport :: Install -> Help.Report
849-
installToReport exit =
850-
case exit of
851-
InstallNoOutline ->
852-
Help.report
853-
"NEW PROJECT?"
854-
Nothing
855-
"Are you trying to start a new project? Try this command instead:"
856-
[ D.indent 4 $ D.green "gren init",
857-
D.reflow "It will help you get started!"
858-
]
859-
InstallBadOutline outline ->
860-
toOutlineReport outline
861-
InstallNoOnlineAppSolution pkg ->
862-
Help.report
863-
"CANNOT FIND COMPATIBLE VERSION"
864-
(Just "gren.json")
865-
( "I cannot find a version of "
866-
++ Pkg.toChars pkg
867-
++ " that is compatible\
868-
\ with your existing dependencies."
869-
)
870-
[ D.reflow $
871-
"I checked all the semver-formatted tags. When that failed, I tried to find any\
872-
\ compatible combination of these packages, even if it meant changing all your\
873-
\ existing dependencies! That did not work either!",
874-
D.reflow $
875-
"This is most likely to happen when a package is not upgraded yet. Maybe a new\
876-
\ version of Gren came out recently? Maybe a common package was changed recently?\
877-
\ Maybe a better package came along, so there was no need to upgrade this one?\
878-
\ Try asking around https://gren-lang.org/community to learn what might be going on\
879-
\ with this package.",
880-
D.toSimpleNote $
881-
"Whatever the case, please be kind to the relevant package authors! Having\
882-
\ friendly interactions with users is great motivation, and conversely, getting\
883-
\ berated by strangers on the internet sucks your soul dry. Furthermore, package\
884-
\ authors are humans with families, friends, jobs, vacations, responsibilities,\
885-
\ goals, etc. They face obstacles outside of their technical work you will never\
886-
\ know about, so please assume the best and try to be patient and supportive!"
887-
]
888-
InstallNoOnlinePkgSolution pkg ->
889-
Help.report
890-
"CANNOT FIND COMPATIBLE VERSION"
891-
(Just "gren.json")
892-
( "I cannot find a version of "
893-
++ Pkg.toChars pkg
894-
++ " that is compatible\
895-
\ with your existing constraints."
896-
)
897-
[ D.reflow $
898-
"With applications, I try to broaden the constraints to see if anything works,\
899-
\ but messing with package constraints is much more delicate business. E.g. making\
900-
\ your constraints stricter may make it harder for applications to find compatible\
901-
\ dependencies. So fixing something here may break it for a lot of other people!",
902-
D.reflow $
903-
"So I recommend making an application with the same dependencies as your package.\
904-
\ See if there is a solution at all. From there it may be easier to figure out\
905-
\ how to proceed in a way that will disrupt your users as little as possible. And\
906-
\ the solution may be to help other package authors to get their packages updated,\
907-
\ or to drop a dependency entirely."
908-
]
909-
InstallHadSolverTrouble solver ->
910-
toSolverReport solver
911-
InstallNoSolverSolution ->
912-
Help.report
913-
"COULD NOT RESOLVE DEPENDENCIES"
914-
(Just "gren.json")
915-
( "I could not find a compatible set of dependencies."
916-
)
917-
[]
918-
InstallNoCompatiblePkg pkg ->
919-
Help.report
920-
"CANNOT FIND COMPATIBLE VERSION"
921-
(Just "gren.json")
922-
( "I cannot find a version of "
923-
++ Pkg.toChars pkg
924-
++ " that is compatible with your current Gren compiler."
925-
)
926-
[ D.reflow $
927-
"You'll have to wait for the package to release a version with support for your\
928-
\ current Gren compiler, or upgrade."
929-
]
930-
InstallUnknownPackageOnline pkg suggestions ->
931-
Help.docReport
932-
"UNKNOWN PACKAGE"
933-
Nothing
934-
( D.fillSep
935-
["I", "cannot", "find", "a", "package", "named", D.red (D.fromPackage pkg) <> "."]
936-
)
937-
[ D.reflow $
938-
"I looked through https://package.gren-lang.org for packages with similar names\
939-
\ and found these:",
940-
D.indent 4 $ D.dullyellow $ D.vcat $ map D.fromPackage suggestions,
941-
D.reflow $ "Maybe you want one of these instead?"
942-
]
943-
InstallBadDetails details ->
944-
toDetailsReport details
945-
946833
-- UNINSTALL
947834

948835
data Uninstall

devbox.lock

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -115,151 +115,151 @@
115115
}
116116
},
117117
"github:NixOS/nixpkgs/nixpkgs-unstable": {
118-
"last_modified": "2025-06-05T08:10:37Z",
119-
"resolved": "github:NixOS/nixpkgs/ec62ae342c340d24289735e31eb9155261cd5fe7?lastModified=1749111037&narHash=sha256-V5fbB7XUPz8qtuJntul%2F7PABtP35tlmcYpriRvJ3EBw%3D"
118+
"last_modified": "2025-06-27T03:16:46Z",
119+
"resolved": "github:NixOS/nixpkgs/80d50fc87924c2a0d346372d242c27973cf8cdbf?lastModified=1750994206&narHash=sha256-3u6rEbIX9CN%2F5A5%2Fmc3u0wIO1geZ0EhjvPBXmRDHqWM%3D"
120120
},
121121
"nodejs@20": {
122-
"last_modified": "2025-05-28T04:23:31Z",
122+
"last_modified": "2025-06-25T15:38:15Z",
123123
"plugin_version": "0.0.2",
124-
"resolved": "github:NixOS/nixpkgs/3d1f29646e4b57ed468d60f9d286cde23a8d1707#nodejs_20",
124+
"resolved": "github:NixOS/nixpkgs/61c0f513911459945e2cb8bf333dc849f1b976ff#nodejs_20",
125125
"source": "devbox-search",
126126
"version": "20.19.2",
127127
"systems": {
128128
"aarch64-darwin": {
129129
"outputs": [
130130
{
131131
"name": "out",
132-
"path": "/nix/store/94chw39vss6h3pbjhh8bygiz0q477gzd-nodejs-20.19.2",
132+
"path": "/nix/store/bk2ccq1nwk72ag45glxzpvzkkh5a83fj-nodejs-20.19.2",
133133
"default": true
134134
},
135135
{
136136
"name": "dev",
137-
"path": "/nix/store/swzicw8mfidrka038zrmrx4lckk9k6zf-nodejs-20.19.2-dev"
137+
"path": "/nix/store/5499fyvlwsrhamv1y8kphlb87gn16ja2-nodejs-20.19.2-dev"
138138
},
139139
{
140140
"name": "libv8",
141-
"path": "/nix/store/5m1fsrkl8xbz34ys87ggcsns8grdp30g-nodejs-20.19.2-libv8"
141+
"path": "/nix/store/yklpxdif067phm9g8dygjgq8s75b4hlp-nodejs-20.19.2-libv8"
142142
}
143143
],
144-
"store_path": "/nix/store/94chw39vss6h3pbjhh8bygiz0q477gzd-nodejs-20.19.2"
144+
"store_path": "/nix/store/bk2ccq1nwk72ag45glxzpvzkkh5a83fj-nodejs-20.19.2"
145145
},
146146
"aarch64-linux": {
147147
"outputs": [
148148
{
149149
"name": "out",
150-
"path": "/nix/store/gxw447rjm20g8jrzm2ccsqynx4bq2n1l-nodejs-20.19.2",
150+
"path": "/nix/store/igk19nk1p66v0bf9y2kbp11dwgpnyqh5-nodejs-20.19.2",
151151
"default": true
152152
},
153153
{
154-
"name": "dev",
155-
"path": "/nix/store/p05pi2gbvjvsr19si0fx17q1za84g9vg-nodejs-20.19.2-dev"
154+
"name": "libv8",
155+
"path": "/nix/store/8smmnly549yz3xxnfa5018i464bq13id-nodejs-20.19.2-libv8"
156156
},
157157
{
158-
"name": "libv8",
159-
"path": "/nix/store/j5rq19i98ssznln4cgfjg30kbmharzby-nodejs-20.19.2-libv8"
158+
"name": "dev",
159+
"path": "/nix/store/mw1ws43grcfmbi1rz0r0dlcwmg0hczhf-nodejs-20.19.2-dev"
160160
}
161161
],
162-
"store_path": "/nix/store/gxw447rjm20g8jrzm2ccsqynx4bq2n1l-nodejs-20.19.2"
162+
"store_path": "/nix/store/igk19nk1p66v0bf9y2kbp11dwgpnyqh5-nodejs-20.19.2"
163163
},
164164
"x86_64-darwin": {
165165
"outputs": [
166166
{
167167
"name": "out",
168-
"path": "/nix/store/bw8rnmhwkvipgcxjja0wi5mrjk0gvvkb-nodejs-20.19.2",
168+
"path": "/nix/store/asa518igxqzm6dy6f8yp39gr90wlz316-nodejs-20.19.2",
169169
"default": true
170170
},
171171
{
172-
"name": "libv8",
173-
"path": "/nix/store/kbwqyp27ljdc45lc2fv3j8vdd4m6l8py-nodejs-20.19.2-libv8"
172+
"name": "dev",
173+
"path": "/nix/store/nmmjadkcwl0pn0s3acbav6x2iahhgzdc-nodejs-20.19.2-dev"
174174
},
175175
{
176-
"name": "dev",
177-
"path": "/nix/store/j5pww5w57s076b2mm5k4jm8grf2dviqa-nodejs-20.19.2-dev"
176+
"name": "libv8",
177+
"path": "/nix/store/c4gwbhgd3mjmm687y1vnmydb67v0capn-nodejs-20.19.2-libv8"
178178
}
179179
],
180-
"store_path": "/nix/store/bw8rnmhwkvipgcxjja0wi5mrjk0gvvkb-nodejs-20.19.2"
180+
"store_path": "/nix/store/asa518igxqzm6dy6f8yp39gr90wlz316-nodejs-20.19.2"
181181
},
182182
"x86_64-linux": {
183183
"outputs": [
184184
{
185185
"name": "out",
186-
"path": "/nix/store/4qx33yfkway214mhlgq3ph4gnfdp32ah-nodejs-20.19.2",
186+
"path": "/nix/store/v5m05qvmza8b8922n42mgsisb05zllm3-nodejs-20.19.2",
187187
"default": true
188188
},
189189
{
190-
"name": "libv8",
191-
"path": "/nix/store/cikzmcbxfz97ym2jf76j843sh3z0x6r2-nodejs-20.19.2-libv8"
190+
"name": "dev",
191+
"path": "/nix/store/zfkwx3mw9fbgsbj7nmb637ndf3gf8zvr-nodejs-20.19.2-dev"
192192
},
193193
{
194-
"name": "dev",
195-
"path": "/nix/store/y85h8q99g1w8jdwiiz3i2zqmnl23rqhv-nodejs-20.19.2-dev"
194+
"name": "libv8",
195+
"path": "/nix/store/nsjk4fc9rp6im3c5w7hdrb7krfs0195w-nodejs-20.19.2-libv8"
196196
}
197197
],
198-
"store_path": "/nix/store/4qx33yfkway214mhlgq3ph4gnfdp32ah-nodejs-20.19.2"
198+
"store_path": "/nix/store/v5m05qvmza8b8922n42mgsisb05zllm3-nodejs-20.19.2"
199199
}
200200
}
201201
},
202202
"ormolu@0.7": {
203-
"last_modified": "2025-05-16T20:19:48Z",
204-
"resolved": "github:NixOS/nixpkgs/12a55407652e04dcf2309436eb06fef0d3713ef3#ormolu",
203+
"last_modified": "2025-06-20T02:24:11Z",
204+
"resolved": "github:NixOS/nixpkgs/076e8c6678d8c54204abcb4b1b14c366835a58bb#ormolu",
205205
"source": "devbox-search",
206206
"version": "0.7.4.0",
207207
"systems": {
208208
"aarch64-darwin": {
209209
"outputs": [
210210
{
211211
"name": "bin",
212-
"path": "/nix/store/mw9d6j870sjfm5pfg9bn448cmr6lhwjp-ormolu-0.7.4.0-bin",
212+
"path": "/nix/store/b5c6lcq5lsx59lsx2f5zv62brw2prg5a-ormolu-0.7.4.0-bin",
213213
"default": true
214214
},
215215
{
216216
"name": "out",
217-
"path": "/nix/store/2i3xpzsi0i2msvb2jf4fd3b756lb8931-ormolu-0.7.4.0"
217+
"path": "/nix/store/36ajjc27ynw57vrsknj45kykyc7yqskv-ormolu-0.7.4.0"
218218
}
219219
],
220-
"store_path": "/nix/store/mw9d6j870sjfm5pfg9bn448cmr6lhwjp-ormolu-0.7.4.0-bin"
220+
"store_path": "/nix/store/b5c6lcq5lsx59lsx2f5zv62brw2prg5a-ormolu-0.7.4.0-bin"
221221
},
222222
"aarch64-linux": {
223223
"outputs": [
224224
{
225225
"name": "bin",
226-
"path": "/nix/store/z2dg90r97a5a28ml215yzhsr13v7qwh5-ormolu-0.7.4.0-bin",
226+
"path": "/nix/store/4ryq4khscpkzm8q8vbw663lwxv5sfck6-ormolu-0.7.4.0-bin",
227227
"default": true
228228
},
229229
{
230230
"name": "out",
231-
"path": "/nix/store/ss3g0vzbvb0ajh5wkg09n7n8myxalv4x-ormolu-0.7.4.0"
231+
"path": "/nix/store/axycrhp28zd1c4s4cw0r6yr3f33iqbh9-ormolu-0.7.4.0"
232232
}
233233
],
234-
"store_path": "/nix/store/z2dg90r97a5a28ml215yzhsr13v7qwh5-ormolu-0.7.4.0-bin"
234+
"store_path": "/nix/store/4ryq4khscpkzm8q8vbw663lwxv5sfck6-ormolu-0.7.4.0-bin"
235235
},
236236
"x86_64-darwin": {
237237
"outputs": [
238238
{
239239
"name": "bin",
240-
"path": "/nix/store/1vnxn3cdlmwcf0vxb56h2bsfak54wp30-ormolu-0.7.4.0-bin",
240+
"path": "/nix/store/9hbf1dbi1mz4v8lsw9yhyg8qvdlh16l8-ormolu-0.7.4.0-bin",
241241
"default": true
242242
},
243243
{
244244
"name": "out",
245-
"path": "/nix/store/hhj5ddhmysk6sp633h98q8b4zkhhqf5r-ormolu-0.7.4.0"
245+
"path": "/nix/store/17daghgf23ga00pb98g2ijkawa67mrj1-ormolu-0.7.4.0"
246246
}
247247
],
248-
"store_path": "/nix/store/1vnxn3cdlmwcf0vxb56h2bsfak54wp30-ormolu-0.7.4.0-bin"
248+
"store_path": "/nix/store/9hbf1dbi1mz4v8lsw9yhyg8qvdlh16l8-ormolu-0.7.4.0-bin"
249249
},
250250
"x86_64-linux": {
251251
"outputs": [
252252
{
253253
"name": "bin",
254-
"path": "/nix/store/dzga2p0pnfgmxby0m6k11vwyp9yrzi6f-ormolu-0.7.4.0-bin",
254+
"path": "/nix/store/id5jnxs2jzf3zvz711kiw9qggb9wd05m-ormolu-0.7.4.0-bin",
255255
"default": true
256256
},
257257
{
258258
"name": "out",
259-
"path": "/nix/store/s9n9kijwpdpfz79h53sf8g612kgmi9ap-ormolu-0.7.4.0"
259+
"path": "/nix/store/wy0fkapnqjgpbnk5xnnd25nnijqfbvlg-ormolu-0.7.4.0"
260260
}
261261
],
262-
"store_path": "/nix/store/dzga2p0pnfgmxby0m6k11vwyp9yrzi6f-ormolu-0.7.4.0-bin"
262+
"store_path": "/nix/store/id5jnxs2jzf3zvz711kiw9qggb9wd05m-ormolu-0.7.4.0-bin"
263263
}
264264
}
265265
}

0 commit comments

Comments
 (0)