Skip to content

Commit b351426

Browse files
committed
Remove Evan's CLA, adjust contributing.md accordingly, refine extra/readme.md
1 parent 7b19439 commit b351426

File tree

4 files changed

+51
-56
lines changed

4 files changed

+51
-56
lines changed

.github/CONTRIBUTING.md

Lines changed: 12 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,25 @@
1-
# Contributing to Elm
1+
# Contributing to the Lamdera compiler
22

3-
Thanks helping with the development of Elm! This document describes the basic
4-
standards for opening pull requests and making the review process as smooth as
5-
possible.
3+
Thanks contributing to the Lamdera compiler!
64

7-
## Licensing
8-
9-
You need to sign the [contributor agreement](ContributorAgreement.pdf)
10-
and send it to <info@elm-lang.org> before opening your pull request.
5+
The Lamdera **compiler** is a free, open-source and open-contribution [un-fork of the Elm compiler](https://dashboard.lamdera.app/releases/open-source-compiler).
116

127
## Style Guide
138

14-
* Haskell &mdash; conform to [these guidelines][haskell]
15-
* JavaScript &mdash; use [Google's JS style guide][js]
16-
17-
[haskell]: https://gist.github.com/evancz/0a1f3717c92fe71702be
18-
[js]: https://google.github.io/styleguide/javascriptguide.xml
9+
We don't have a particular style enforcement tool in place, but generally
10+
we prefer Elm-like layout that's indented with two spaces, with no trailing
11+
whitespace.
1912

2013
## Branches
2114

22-
* [The master branch][master] is the home of the next release of the compiler
15+
* [The lamdera-next branch][lamdera-next] is the home of the next release of the compiler
2316
so new features and improvements get merged there. Most pull requests
24-
should target this branch!
25-
26-
* [The stable branch][stable] is for tagging releases and critical bug fixes.
27-
This branch is handy for folks who want to build the most recent public
28-
release from source.
17+
should target this branch, it is the repo default branch.
2918

30-
[master]: http://github.com/elm-lang/elm/tree/master
31-
[stable]: http://github.com/elm-lang/elm/tree/stable
19+
[lamdera-next]: https://github.com/lamdera/compiler
3220

33-
If you are working on a fairly large feature, we will probably want to merge it
34-
in as its own branch and do some testing before bringing it into the master
35-
branch. This way we can keep releases of the master branch independent of new
36-
features.
21+
## Development guide
3722

38-
Note that the master branch of the compiler should always be in sync with the
39-
master branch of the [website][], and the stable branch of the compiler should
40-
always be in sync with the stable branch of the [website][]. Make sure that
41-
your changes maintain this compatibility.
23+
Check out the [extra/readme.md](extra/readme.md) for more information on how to get started with development.
4224

43-
[website]: https://github.com/elm-lang/elm-lang.org
25+
If you're planning on embarking on a feature, come chat with us on the [Lamdera Discord](https://dashboard.lamdera.app/docs/discuss) as it's possible we're already working on it, or have some thoughts that will be helpful to get the best result and ensure it can be merged quickly.

ContributorAgreement.pdf

-64.7 KB
Binary file not shown.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Elm is [a delightful language for reliable webapps](https://elm-lang.org/).
44

55
The Lamdera compiler extends the official Elm compiler with tooling that works for any regular Elm frontend project, as well as specific features for Elm projects on [Lamdera: A delightful platform for full-stack Elm web apps](https://lamdera.com).
66

7-
The Lamdera **compiler** is free, open-source and open-contribution [un-fork of the Elm compiler](https://dashboard.lamdera.app/releases/open-source-compiler).
7+
The Lamdera **compiler** is a free, open-source and open-contribution [un-fork of the Elm compiler](https://dashboard.lamdera.app/releases/open-source-compiler).
88

99
The Lamdera **platform** is a paid service with a free tier to try, and is how we keep our work funded and sustainable.
1010

extra/readme.md

Lines changed: 38 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -9,43 +9,31 @@ The integration philosophy is:
99
- Inject as small a surface area into actual compiler code as feasibly possible
1010
- You'll see this done with certain tricks using `&` and `$` to, wherever possible, only add additional lines to source, without modifying any existing lines
1111
- This means merge conflicts are minimized when trying to stay up to date with upstream Elm Compiler
12-
- Sometimes entire functions are added to the bottom of files, usually when the current file defines a bunch of types that are needed and it's messier to have it external
12+
- Sometimes entire functions are added to the bottom of core files, this is usually when the current file defines a bunch of types that are needed in the extension code, and it's problematic/messier to externalise that code and cause cyclic dependencies
1313

1414
The idea is that searching the project for `import.*Lamdera` and `@LAMDERA` will reveal every single `/builder` and `/compiler` core file that has some Lamdera related modification.
1515

16-
Alternatively the [diff of `master` and `lamdera` branches](https://github.com/lamdera/compiler/compare/master...lamdera) gives a nice overview of all modifications in the "Files Changed" view.
16+
Alternatively the [diffing `elm/compiler` and `lamdera/compiler`](https://github.com/lamdera/compiler/compare/master...lamdera) gives a nice overview of all core file modifications in the "Files Changed" view.
1717

1818
Otherwise:
1919

20-
- Use Elm compiler source liberally inside `/extra`
20+
- Reference/use Elm compiler source liberally inside `/extra`
2121
- We don't want to reinvent the wheel on core compiler concepts, and can lean heavily on Haskell's type system to tell us when there are problems due to core type changes upstream in future
22-
- Future developers might find things might seem obviously duplicated - if there's no comment and blame history is not helpful, it was likely accidental (didn't know compiler already had that functionality/code) or transient (i.e. features carried up from 0.19 over the years)
22+
- Future developers might find things that might seem obviously duplicated - if there's no comment and blame history is not helpful, it was likely accidental (didn't know compiler already had that functionality/code) or transient (i.e. features carried up from 0.19 over the years)
2323

2424
If in doubt, please ask!
2525

2626
### Setup
2727

28-
```
29-
brew install gcc pkg-config # some headers like 'linux/random.h' are implicitly required to build Haskell libs
30-
brew install icdiff # used for nice side-by-side diffs in test output
31-
git submodule init && git submodule update # Get and update Git submodules for this project
32-
stack install hindent # used for debugging haskell values
33-
```
34-
35-
36-
### Tests
28+
:warning: We'd like to move to `devbox` to make this a one-shot env setup in future; contributions welcome.
3729

38-
The `test` folder contains tests for aspects of the additional functionality. Most are at the acceptance test level, these have been the most useful so far.
39-
40-
The test framework is a very lightweight vendored copy of `EasyTest.hs`, defined entirely in that one file. There are some `test/Test/Helpers.hs` too.
41-
42-
The easiest way to run is from the project root:
30+
In the meantime, here's our setup on MacOS:
4331

4432
```
45-
$ TOKEN="..." LDEBUG=1 LOVR=~/lamdera/overrides stack ghci
46-
λ: Test.all
47-
...
48-
✅ 38 tests passed, no failures!
33+
brew install gcc pkg-config # some headers like 'linux/random.h' are implicitly required to build Haskell libs
34+
brew install icdiff # for nice side-by-side diffs in test output
35+
git submodule init && git submodule update # setup Git submodule deps for this project
36+
stack install hindent # used for debugging haskell values
4937
```
5038

5139
### Developing
@@ -82,11 +70,36 @@ By default it's `target = Test.all`, so `:rr` will recompile and run all tests.
8270

8371
Press up arrow to get history of prior commands!
8472

85-
#### Tests
73+
#### Debugging in VSCode
74+
75+
https://marketplace.visualstudio.com/items?itemName=phoityne.phoityne-vscode
76+
77+
```
78+
stack install haskell-dap ghci-dap haskell-debug-adapter
79+
```
80+
81+
82+
83+
### Tests
84+
85+
:warning: The compiler tests need work, a few of them are not isolated (i.e they reach out into the world and expect things to exist).
86+
87+
The `test` folder contains tests for aspects of the additional functionality. Most are at the acceptance test level, these have been the most useful so far.
88+
89+
The test framework is a vendored copy of the very lightweight [`easytest`](https://github.com/joelburget/easytest) lib, defined entirely in that one file. There are some `test/Test/Helpers.hs` too.
90+
91+
The easiest way to run is from the project root:
92+
93+
```
94+
$ TOKEN="..." LDEBUG=1 LOVR=~/lamdera/overrides stack ghci
95+
λ: Test.all
96+
...
97+
✅ 38 tests passed, no failures!
98+
```
8699

87-
`test/Test.hs` is the entrypoint for all tests. Use `Test.all` in ghci to run everything (it is also the `:rr` target by default).
100+
`test/Test.hs` is the entrypoint for all tests. Use `Test.all` in ghci to run everything (it is also the `:rr` target by default, see notes above).
88101

89-
Using the test framework in `test/EasyTest`, a vendored version of [easytest](https://github.com/joelburget/easytest) back when it had fun emojis! It's only a single file and easy to read.
102+
Using the test framework in `test/EasyTest`, a vendored version of back when it had fun emojis! It's only a single file and easy to read.
90103

91104

92105
#### Testing functions directly

0 commit comments

Comments
 (0)