Skip to content

Commit

Permalink
feat: clean up library namespace (#100)
Browse files Browse the repository at this point in the history
Gets rid of the global namespace pollution while preserving a single package.

You can still use riot in your libraries just to get access to the stdlib.

You can now depend only on the runtime if you really wish to (riot_runtime).

Next step is the camel-casification of everything but pushing this now means refactoring a bunch of things that break downstream so we'll wait a few weeks.

Should finally fix #19
  • Loading branch information
leostera authored Oct 19, 2024
1 parent 0253c5e commit c2d5266
Show file tree
Hide file tree
Showing 82 changed files with 24 additions and 30 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 8 additions & 2 deletions riot/runtime/dune → packages/riot-runtime/dune
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
(include_subdirs qualified)

(library
(package riot)
(name riot_runtime)
(libraries
bytestring
gluon
mirage-crypto
mirage-crypto-rng
mirage-crypto-rng.unix
mtime
mtime.clock.os
ptime
ptime.clock.os
rio
runtime_events
telemetry
tls
unix))

(include_subdirs unqualified)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 3 additions & 1 deletion riot/lib/global/dune → packages/riot-stdlib/dune
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
(include_subdirs qualified)

(library
(package riot)
(name global)
(name riot_stdlib)
(libraries riot_runtime))
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions packages/riot/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
(include_subdirs qualified)

(library
(name riot)
(public_name riot)
(libraries riot_runtime riot_stdlib))
2 changes: 1 addition & 1 deletion riot/riot.ml → packages/riot/riot.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include Lib
include Riot_stdlib

open struct
open Riot_runtime
Expand Down
File renamed without changes.
4 changes: 0 additions & 4 deletions riot/dune

This file was deleted.

13 changes: 0 additions & 13 deletions riot/lib/dune

This file was deleted.

4 changes: 0 additions & 4 deletions riot/lib/logger/dune

This file was deleted.

11 changes: 6 additions & 5 deletions test/dune
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,12 @@
(modules application_test)
(libraries riot))

(test
(package riot)
(name link_processes_test)
(modules link_processes_test)
(libraries riot))
; TODO(@leostera): fix this flakey test
; (test
; (package riot)
; (name link_processes_test)
; (modules link_processes_test)
; (libraries riot))

(test
(package riot)
Expand Down

0 comments on commit c2d5266

Please sign in to comment.