Skip to content

Commit e995510

Browse files
authored
Drop Reason and Esy support (#112)
* Drop Reason and Esy support * Remove generators * Update changelog * Hide subprocesses output in non-verbose mode * Update CI scripts * Update roadmap * Increase timeout * Vendor inquire * Update CI * Update demo * Default to TCSANOW to change term attributes
1 parent 092ab59 commit e995510

File tree

203 files changed

+2917
-3855
lines changed

Some content is hidden

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

203 files changed

+2917
-3855
lines changed

.gitattributes

-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
*.ml linguist-language=OCaml
33
*.mli linguist-language=OCaml
44

5-
# Disable syntax detection for .spin
6-
.spin linguist-language=Text
7-
85
# Disable syntax detection for cram tests
96
*.t linguist-language=Text
107

.github/workflows/ci.yml

-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ jobs:
1717
os:
1818
- macos-latest
1919
- ubuntu-latest
20-
- windows-latest
2120

2221
ocaml-compiler:
2322
- 4.12.x
@@ -34,7 +33,6 @@ jobs:
3433
with:
3534
ocaml-compiler: ${{ matrix.ocaml-compiler }}
3635
dune-cache: ${{ matrix.os != 'macos-latest' }}
37-
opam-depext-flags: --with-test
3836

3937
- name: Install ocamlformat
4038
run: opam install ocamlformat.0.18.0

.github/workflows/release.yml

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ jobs:
2929
with:
3030
ocaml-compiler: ${{ matrix.ocaml-compiler }}
3131
dune-cache: ${{ matrix.os != 'macos-latest' }}
32-
opam-depext-flags: --with-test
3332

3433
- name: Use Node.js 12.x
3534
if: ${{ matrix.os == 'ubuntu-latest' }}

.gitignore

+5-9
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
1-
# ocamlbuild working directory
1+
# Dune generated files
22
_build/
3-
4-
# ocamlbuild targets
5-
*.byte
6-
*.native
3+
*.install
74

85
# Merlin configuring file for Vim and Emacs
96
.merlin
107

11-
# Dune generated files
12-
*.install
13-
148
# Local OPAM switch
15-
_opam/
9+
_opam/
10+
11+
_generated*/

CHANGES.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44

55
- Added a `parse_binaries` stanza that can be `true` to force Spin to parse binary files
66
- Added a `raw_files` stanza that takes a list of file or glob expressions to instruct Spin to copy files instead of parsing them
7-
- A lock file is now generated for Opam projects
8-
- Added `ocaml-lsp-server` in `esy.json` files
97
- Added a new `c-bindings` template for C bindings using `ctypes`
108
- Added a new `js` template for javascript applications with `js_of_ocaml`
119

1210
## Changed
1311

12+
- Removed the `gen` subcommand. The generators will come back with a much better workflow
13+
- Dropped support for Esy and Reason. The templates are now using the recommended OCaml setup only. The previous templates are hosted at https://github.com/ocaml-templates/
14+
- Changed the templates to use the `ISC` license
1415
- Increase version of `ocamlformat` to `0.18.0` in templates
1516
- Do not install merlin when installing dev dependencies in templates
1617
- Drop support for BuckleScript in PPX
@@ -19,7 +20,7 @@
1920
- Remove python dependency to serve documentation in Makefile
2021
- Inline release script in Makefile
2122
- Remove global `-open StdLabels` in templates
22-
- The `spa` template has been removed from the official templates and now lives at https://github.com/tmattio/spin-incr-dom
23+
- The `spa` template has been removed from the official templates and now lives at https://github.com/ocaml-templates/spin-incr-dom
2324
- Spin does not parse binary files by default anymore, they are simply copied to the destination folder
2425
- Use `test` stanza for unit tests now that Alcotest prints colors by default
2526
- Remove unused flags defined in the root's `dune` file
@@ -122,7 +123,7 @@ Since the beginning of the project, a lot of learnings have been made and this n
122123

123124
## Added
124125

125-
- Support user configuration file that stores general configuration such as the user's name, Github username, etc.
126+
- Support user configuration file that stores general configuration such as the user's name, Github author_name, etc.
126127
- Provide a `config` subcommand that can be used to change the user configuration.
127128
- The generators can now print a message when the generation succeeds with the `message` stanza.
128129

LICENSE

+12-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1-
Copyright 2019 Thibaut Mattio
1+
ISC License
22

3-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3+
Copyright (c) 2021 Thibaut Mattio
44

5-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
5+
Permission to use, copy, modify, and/or distribute this software for any
6+
purpose with or without fee is hereby granted, provided that the above
7+
copyright notice and this permission notice appear in all copies.
68

7-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ test: ## Run the unit tests
3131
opam exec -- dune build --root . @test/runtest
3232
opam exec -- dune build --root . @test_bin/runtest
3333

34-
.PHONY: test-template
35-
test-template: ## Run the template integration tests
34+
.PHONY: test-templates
35+
test-templates: ## Run the template integration tests
3636
opam exec -- dune build --root . @test_template/runtest -f -j 1
3737

3838
.PHONY: clean

README.md

+6-18
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<p align="center">
22
<img width="300" src="https://raw.githubusercontent.com/tmattio/spin/master/doc/logo.svg?sanitize=true" alt="Logo">
33
<br><br>
4-
Reason and OCaml project generator.
4+
OCaml project generator.
55
</p>
66

77

@@ -33,7 +33,7 @@
3333

3434
🚀 Quickly start new projects that are ready for the real world.
3535

36-
❤️ Have a great developer experience when developing with Reason/OCaml.
36+
❤️ Have a great developer experience when developing with OCaml.
3737

3838
🏄 Be as productive as Ruby-on-Rails or Elixir's Mix users.
3939

@@ -84,13 +84,12 @@ The official Spin templates templates are the following:
8484

8585
If you'd like to add an official template, don't hesitate to open a PR!
8686

87-
### Other Reason/OCaml templates
87+
### Other OCaml templates
88+
89+
You can find community Spin templates for various projects here: [https://github.com/ocaml-templates](https://github.com/ocaml-templates)
8890

8991
Here are some non-official Spin templates that you can use:
9092

91-
- [**spin-rescript**](https://github.com/tmattio/spin-rescript) - Spin template for ReScript applications
92-
- [**spin-jsoo-react**](https://github.com/tmattio/spin-jsoo-react) - Spin template for React applications with Js_of_ocaml
93-
- [**spin-incr-dom**](https://github.com/tmattio/spin-incr-dom) - Single page application with Js_of_ocaml using Incr_dom
9493
- [**spin-sihl**](https://github.com/oxidizing/spin-sihl) - Spin template for [Sihl](https://github.com/oxidizing/sihl) applications
9594

9695
### Other non-OCaml templates
@@ -117,14 +116,6 @@ When `--ignore-config` is passed, the configuration file will be ignored and the
117116

118117
List the official Spin templates.
119118

120-
### `spin gen`
121-
122-
List the generators available for the current project.
123-
124-
### `spin gen GENERATOR`
125-
126-
Generate a new component in the current project.
127-
128119
### `spin config`
129120

130121
Prompt the user for values that can be saved in the configuration file.
@@ -137,11 +128,8 @@ See our [development board](https://github.com/tmattio/spin/projects/1) for a li
137128

138129
Here are some of the improvements we'll be working on as well in for next releases:
139130

140-
- [ ] Add cram tests to CI
141-
- [ ] Support Opam 2.0.X (add to CI)
142131
- [ ] Support windows
143132
- [ ] Support CLI options/args for configurations
144-
- [ ] Extract current templates in community templates, and drop support for Reason/Esy
145133
- [ ] Minimal `hello` template
146134
- [ ] Generators for `lib/bin/test` for all templates
147135

@@ -153,7 +141,7 @@ Take a look at our [Contributing Guide](CONTRIBUTING.md) to get started.
153141

154142
## License
155143

156-
Distributed under the MIT License. See [LICENSE](LICENSE) for more information.
144+
Distributed under the ISC License. See [LICENSE](LICENSE) for more information.
157145

158146
## Acknowledgements
159147

bin/commands/cmd_gen.ml

-87
This file was deleted.

bin/common.ml

+1-5
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ let spin_error_to_code = function
7575
6
7676
| `Failed_to_generate _ ->
7777
7
78-
| `Generator_error _ ->
79-
8
8078

8179
let handle_errors = function
8280
| Ok () ->
@@ -94,6 +92,4 @@ let exits =
9492
::
9593
Term.exit_info 6 ~doc:"on invalid spin template."
9694
::
97-
Term.exit_info 7 ~doc:"on failure to generate project."
98-
::
99-
Term.exit_info 8 ~doc:"on failure to run a generator." :: Term.default_exits
95+
Term.exit_info 7 ~doc:"on failure to generate project." :: Term.default_exits

bin/main.ml

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ open Cmdliner
22

33
let () = Printexc.record_backtrace true
44

5-
let cmds = [ Cmd_config.cmd; Cmd_gen.cmd; Cmd_ls.cmd; Cmd_new.cmd ]
5+
let cmds = [ Cmd_config.cmd; Cmd_ls.cmd; Cmd_new.cmd ]
66

77
let run () =
88
let message =
99
{|
10-
Generate Reason and OCaml projects.
10+
Generate OCaml projects.
1111

1212
Usage:
1313
spin COMMAND
@@ -32,7 +32,7 @@ Use `spin COMMAND --help` for help on a single command.|}
3232

3333
(* Command line interface *)
3434

35-
let doc = "Generate Reason and OCaml projects"
35+
let doc = "Generate OCaml projects"
3636

3737
let sdocs = Manpage.s_common_options
3838

@@ -42,7 +42,7 @@ let envs = Common.envs
4242

4343
let man =
4444
[ `S Manpage.s_description
45-
; `P "$(mname) helps to bootstrap Reason and OCaml projects."
45+
; `P "$(mname) helps to bootstrap OCaml projects."
4646
; `P
4747
"It can generate new projects from local or remote templates, and \
4848
generate components in existing projects."

doc/cli.md

-46
Original file line numberDiff line numberDiff line change
@@ -58,52 +58,6 @@ prompted for configuration that have been saved.
5858

5959
Run as if spin was started in `PATH` instead of the current directory.
6060

61-
## `gen`
62-
63-
```
64-
spin gen [OPTION]... [GENERATOR]
65-
```
66-
67-
### Description
68-
69-
`gen` generates new files in the current project if a generator is
70-
provided, or list the available generators for the current project if
71-
not.
72-
73-
`gen` assumes it is run in a project generated with `new`, it will
74-
read the source template of the project from the file `.spin` located
75-
at the root of the project. If the source is not a local directory and
76-
cannot be found in the cache, it will be downloaded before the
77-
generator is run.
78-
79-
If the provided generator exists in the source template, the user will
80-
be prompted for the configurations of the generator and the generator
81-
will be run at the root of the project.
82-
83-
### Arguments
84-
85-
- `GENERATOR`
86-
87-
The generator to use. If absent, list the available generators for
88-
the current project.
89-
90-
### Options
91-
92-
- `-C PATH`
93-
94-
Run as if spin was started in PATH instead of the current
95-
directory.
96-
97-
- `-d, --default`
98-
99-
Use default values without prompting when the configuration has a
100-
default value.
101-
102-
- `--ignore-config`
103-
104-
Prompt for values regardless of whether they are in the user's
105-
configuration file.
106-
10761
## `ls`
10862

10963
```

0 commit comments

Comments
 (0)