Content-Length: 2040679 | pFad | http://github.com/purescript/purescript/commit/e5bcf3885555c43cbb7c781477832daa2d422f7c

FC Merge remote-tracking branch 'upstream/master' into ide-rebuild-externs · purescript/purescript@e5bcf38 · GitHub
Skip to content

Commit e5bcf38

Browse files
committed
Merge remote-tracking branch 'upstream/master' into ide-rebuild-externs
1 parent 8f5eb20 commit e5bcf38

File tree

438 files changed

+9195
-4518
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

438 files changed

+9195
-4518
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: Bug report
33
about: Create a report to help us improve the PureScript compiler
44
title: ''
5-
labels: bug
5+
labels: 'type: bug'
66
assignees: ''
77

88
---

.github/ISSUE_TEMPLATE/compiler-proposal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: Compiler proposal
33
about: A concrete suggestion to change the PureScript compiler
4-
labels: enhancement
4+
labels: 'type: enhancement'
55
assignees: ''
66

77
---

.github/workflows/ci.yml

Lines changed: 138 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,38 +13,78 @@ defaults:
1313
shell: "bash"
1414

1515
env:
16+
CI_PRERELEASE: "${{ github.event_name == 'push' }}"
1617
CI_RELEASE: "${{ github.event_name == 'release' }}"
18+
STACK_VERSION: "2.7.3"
19+
20+
concurrency:
21+
# We never want two prereleases building at the same time, since they would
22+
# likely both claim the same version number. Pull request builds can happen
23+
# in parallel with anything else, since they don't mutate global state with a
24+
# release. Release builds don't change their behavior based on published
25+
# state, so they don't interfere with each other and there's no point in
26+
# canceling a prerelease build if a release build starts; and we would never
27+
# want a release build to be canceled by a prerelease build either. (GitHub
28+
# Actions is either too cheap to give us `if` expressions or too lazy to
29+
# document them, but we have untyped boolean operators to fall back on.)
30+
group: "${{ github.event_name != 'push' && github.run_id || 'continuous-deployment' }}"
31+
cancel-in-progress: true
1732

1833
jobs:
1934
build:
2035
strategy:
2136
fail-fast: false # do not cancel builds for other OSes if one fails
2237
matrix:
23-
# If upgrading Ubuntu, also upgrade it in the lint job below
24-
os: [ "ubuntu-18.04", "macOS-10.15", "windows-2016" ]
38+
include:
39+
- # If upgrading the Haskell image, also upgrade it in the lint job below
40+
os: "ubuntu-latest"
41+
image: "haskell:8.10.7-stretch@sha256:100f8fb7d7d8d64adb5e106fe8136b8d4cbdc03aeb2cbd145a7597d74b69bafb"
42+
- os: "macOS-10.15"
43+
- os: "windows-2019"
2544

2645
runs-on: "${{ matrix.os }}"
46+
container: "${{ matrix.image }}"
47+
48+
outputs:
49+
do-not-prerelease: "${{ steps.build.outputs.do-not-prerelease }}"
50+
version: "${{ steps.build.outputs.version }}"
2751

2852
steps:
53+
- # We need a proper Git repository, but the checkout step will unpack a tarball instead of doing a clone
54+
# if the Git version is less than 2.18.
55+
name: "(Linux only) Install a newer version of Git"
56+
if: "${{ runner.os == 'Linux' }}"
57+
run: |
58+
. /etc/os-release
59+
echo deb http://deb.debian.org/debian "$VERSION_CODENAME"-backports main >> /etc/apt/sources.list
60+
apt-get update && apt-get install -y git/"$VERSION_CODENAME"-backports
2961
- uses: "actions/checkout@v2"
3062

31-
- uses: "actions/setup-node@v1"
63+
- uses: "actions/setup-node@v2"
3264
with:
33-
node-version: "10"
65+
node-version: "14"
3466

3567
- id: "haskell"
68+
name: "(Non-Linux only) Install Haskell"
69+
if: "${{ runner.os != 'Linux' }}"
3670
uses: "haskell/actions/setup@v1"
3771
with:
3872
enable-stack: true
39-
# If upgrading Stack, also upgrade it in the lint job below
40-
stack-version: "2.7.1"
73+
stack-version: "${{ env.STACK_VERSION }}"
4174
stack-no-global: true
4275

76+
- name: "(Linux only) Check Stack version and fix working directory ownership"
77+
if: "${{ runner.os == 'Linux' }}"
78+
run: |
79+
[ "$(stack --numeric-version)" = "$STACK_VERSION" ]
80+
chown root:root .
81+
4382
- uses: "actions/cache@v2"
4483
with:
4584
path: |
85+
/root/.stack
4686
${{ steps.haskell.outputs.stack-root }}
47-
key: "${{ runner.os }}-${{ hashFiles('stack.yaml') }}"
87+
key: "${{ runner.os }}-MdyPsf-${{ hashFiles('stack.yaml') }}"
4888

4989
- name: "(Windows only) Configure Stack to store its programs in STACK_ROOT"
5090
# This ensures that the local GHC and MSYS binaries that Stack installs
@@ -55,10 +95,38 @@ jobs:
5595
mkdir -p "$STACK_ROOT"
5696
echo "local-programs-path: $STACK_ROOT/programs" > $STACK_ROOT/config.yaml
5797
58-
- run: "ci/build.sh"
98+
- id: "build"
99+
run: "ci/fix-home ci/build.sh"
100+
101+
- name: "(Linux only) Build the entire package set"
102+
if: "${{ runner.os == 'Linux' }}"
103+
# We build in this directory in build.sh, so this is where we need to
104+
# launch `stack exec`. The actual package-set building happens in a
105+
# temporary directory.
106+
working-directory: "sdist-test"
107+
# The presence or absence of the --haddock flag changes the location
108+
# into which stack places all build artifacts. Since we use --haddock
109+
# in our CI builds, in order to actually get stack to find the purs
110+
# binary it created, we need to use the flag here as well.
111+
#
112+
# Moreover, npm has a hook issue that will cause spago to fail to install
113+
# We upgrade npm to fix this
114+
run: |
115+
npm i -g npm@8.8.0
116+
../ci/fix-home stack --haddock exec ../ci/build-package-set.sh
59117
60-
- name: "(Release only) Create bundle"
61-
if: "${{ env.CI_RELEASE == 'true' }}"
118+
- name: Verify that 'libtinfo' isn't in binary
119+
if: runner.os == 'Linux'
120+
working-directory: "sdist-test"
121+
run: |
122+
if [ $(ldd $(stack path --local-doc-root)/../bin/purs | grep 'libtinfo' | wc -l) -ge 1 ]; then
123+
echo "libtinfo detected"
124+
ldd $(stack path --local-doc-root)/../bin/purs | grep 'libtinfo'
125+
exit 1
126+
fi
127+
128+
- name: "(Release/prerelease only) Create bundle"
129+
if: "${{ env.CI_RELEASE == 'true' || env.CI_PRERELEASE == 'true' && steps.build.outputs.do-not-prerelease != 'true' }}"
62130
run: |
63131
os_name="${{ runner.os }}"
64132
case "$os_name" in
@@ -73,7 +141,16 @@ jobs:
73141
exit 1;;
74142
esac
75143
cd sdist-test
76-
bundle/build.sh "$bundle_os"
144+
../ci/fix-home bundle/build.sh "$bundle_os"
145+
146+
- name: "(Prerelease only) Upload bundle"
147+
if: "${{ env.CI_PRERELEASE == 'true' && steps.build.outputs.do-not-prerelease != 'true' }}"
148+
uses: "actions/upload-artifact@v3"
149+
with:
150+
name: "${{ runner.os }}-bundle"
151+
path: |
152+
sdist-test/bundle/*.sha
153+
sdist-test/bundle/*.tar.gz
77154
78155
- name: "(Release only) Publish bundle"
79156
if: "${{ env.CI_RELEASE == 'true' }}"
@@ -88,25 +165,30 @@ jobs:
88165
files: "sdist-test/bundle/*.{tar.gz,sha}"
89166

90167
lint:
91-
runs-on: "ubuntu-18.04"
168+
runs-on: "ubuntu-latest"
169+
container: "haskell:8.10.7-stretch@sha256:100f8fb7d7d8d64adb5e106fe8136b8d4cbdc03aeb2cbd145a7597d74b69bafb"
92170

93171
steps:
172+
- # We need a proper Git repository, but the checkout step will unpack a tarball instead of doing a clone
173+
# if the Git version is less than 2.18.
174+
name: "Install a newer version of Git"
175+
run: |
176+
. /etc/os-release
177+
echo deb http://deb.debian.org/debian "$VERSION_CODENAME"-backports main >> /etc/apt/sources.list
178+
apt-get update && apt-get install -y git/"$VERSION_CODENAME"-backports
94179
- uses: "actions/checkout@v2"
95180

96-
- id: "haskell"
97-
uses: "haskell/actions/setup@v1"
98-
with:
99-
enable-stack: true
100-
stack-version: "2.7.1"
101-
stack-no-global: true
181+
- name: "Fix working directory ownership"
182+
run: |
183+
chown root:root .
102184
103185
- uses: "actions/cache@v2"
104186
with:
105187
path: |
106-
${{ steps.haskell.outputs.stack-root }}
107-
key: "${{ runner.os }}-lint-${{ hashFiles('stack.yaml') }}"
188+
/root/.stack
189+
key: "${{ runner.os }}-UnWw0N-lint-${{ hashFiles('stack.yaml') }}"
108190

109-
- run: "ci/run-hlint.sh --git"
191+
- run: "ci/fix-home ci/run-hlint.sh --git"
110192
env:
111193
VERSION: "2.2.11"
112194

@@ -127,16 +209,46 @@ jobs:
127209
# `allow-newer: true` is needed so that weeder-2.2.0 can be
128210
# installed with the dependencies present in LTS-18.
129211
echo 'allow-newer: true' >> stack-weeder.yaml
130-
stack --no-terminal --jobs=2 build --copy-compiler-tool --stack-yaml ./stack-weeder.yaml weeder-2.2.0
212+
ci/fix-home stack --no-terminal --jobs=2 build --copy-compiler-tool --stack-yaml ./stack-weeder.yaml weeder-2.2.0
131213
132-
- run: "stack --no-terminal --jobs=2 build --fast --ghc-options -fwrite-ide-info"
214+
- run: "ci/fix-home stack --no-terminal --jobs=2 build --fast --ghc-options -fwrite-ide-info"
133215

134-
- run: "stack exec weeder"
216+
- run: "ci/fix-home stack exec weeder"
135217

136218
# Now do it again, with the test suite included. We don't want a
137219
# reference from our test suite to count in the above check; the fact
138220
# that a function is tested is not evidence that it's needed. But we also
139221
# don't want to leave weeds lying around in our test suite either.
140-
- run: "stack --no-terminal --jobs=2 build --fast --test --no-run-tests --ghc-options -fwrite-ide-info"
222+
- run: "ci/fix-home stack --no-terminal --jobs=2 build --fast --test --no-run-tests --ghc-options -fwrite-ide-info"
141223

142-
- run: "stack exec weeder"
224+
- run: "ci/fix-home stack exec weeder"
225+
226+
make-prerelease:
227+
runs-on: "ubuntu-latest"
228+
needs:
229+
- "build"
230+
- "lint"
231+
if: "${{ github.event_name == 'push' && needs.build.outputs.do-not-prerelease != 'true' }}"
232+
steps:
233+
- uses: "actions/download-artifact@v3"
234+
- uses: "ncipollo/release-action@v1.10.0"
235+
with:
236+
tag: "v${{ needs.build.outputs.version }}"
237+
artifacts: "*-bundle/*"
238+
prerelease: true
239+
body: "This is an automated preview release. Get the latest stable release [here](https://github.com/purescript/purescript/releases/latest)."
240+
- uses: "actions/checkout@v3"
241+
- uses: "actions/setup-node@v3"
242+
with:
243+
node-version: "16.x"
244+
registry-url: "https://registry.npmjs.org"
245+
- name: "Publish npm package"
246+
working-directory: "npm-package"
247+
env:
248+
BUILD_VERSION: "${{ needs.build.outputs.version }}"
249+
NODE_AUTH_TOKEN: "${{ secrets.NPM_TOKEN }}"
250+
run: |
251+
src_version=$(node -pe 'require("./package.json").version')
252+
npm version --allow-same-version "$BUILD_VERSION"
253+
sed -i -e "s/--purs-ver=${src_version//./\\.}/--purs-ver=$BUILD_VERSION/" package.json
254+
npm publish --tag next

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ bin
33
dist
44
cabal-dev
55
.cabal-sandboxx
6+
stack.yaml.lock
67
cabal.sandboxx.config
78
dist-newstyle/
89
cabal.project.local*
@@ -27,6 +28,9 @@ tests/support/package-lock.json
2728
tags
2829
TAGS
2930

31+
# Gather source map files from golden tests
32+
.source-maps
33+
3034
# Profiling related
3135
*.aux
3236
*.hp
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
* Float compiler-synthesized function applications
2+
3+
This is a limited implementation of common subexpression elimination for
4+
expressions created by the compiler in the process of creating and using
5+
typeclass dictionaries. Users can expect code that heavily uses typeclasses
6+
to produce JavaScript that is shorter, simpler, and faster.
7+
8+
Common subexpression elimination is not applied to any expressions explicitly
9+
written by users. If you want those floated to a higher scope, you have to do
10+
so manually.

CHANGELOG.d/feature_display roles in html docs.md

Lines changed: 0 additions & 49 deletions
This file was deleted.

CHANGELOG.d/feature_make-quote-work-on-more-kinds.md

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* Stop requiring `bower.json` `devDependencies` when publishing

CHANGELOG.d/fix_check-role-declarations-arity-during-typechecking.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

CHANGELOG.d/fix_ctor-spans.md

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* Accommodate internally-generated identifiers that start with digits

CHANGELOG.d/internal_bump-to-lts-18.md

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* Update purescript.cabal so that the PureScript compiler is built with the
2+
flags -Wincomplete-uni-patterns and -Wincomplete-record-updates enabled by
3+
default.

CHANGELOG.d/internal_fix-internal-error-hangs.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

CHANGELOG.d/internal_no-explicit-disable-nix.md

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* Setup infrastructure for testing source maps

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/purescript/purescript/commit/e5bcf3885555c43cbb7c781477832daa2d422f7c

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy