exercism / ocaml

Exercism exercises in OCaml.
https://exercism.org/tracks/ocaml
MIT License
94 stars 50 forks source link

Reconsider hint in Bob exercise #365

Closed sshine closed 5 years ago

sshine commented 5 years ago

Since #56, the Bob exercise has had the hint below. As I understand it, the hint addresses a situation where a str package is being used, but isn't being added to the build environment.

Today, there is no str package on OPAM, and #56 does not mention what type of solution this package would enable. I imagine it is like Haskell's Data.Text where a hint was added to the Bob README in exercism/haskell#794.

Until we find out what kind of alternative solutions one may want to make in Bob that requires another package, we should remove this hint, as it is outdated. If/when we do find out, a similar hint can be re-added.

## Error: No implementations provided for the following modules:
         Str referenced from bob.cmx

### Message
```
+ ocamlfind ocamlopt -linkpkg -g -thread -package oUnit -package core bob.cmx test.cmx -o test.native
File "_none_", line 1:
Error: No implementations provided for the following modules:
         Str referenced from bob.cmx
Command exited with code 2.
```

### Reason
You are using a module in your solution, in this case the `Str` module, and the
OCaml build tool is not aware of this.

### Solution
Add the module you are trying to use to the `ocamlbuild` build options.

Modify the `test.native` directive of the Makefile to be:

```
test.native: *.ml *.mli
    @corebuild -quiet -pkg oUnit -pkg str test.native
```

Note the additional `-pkg str` option.