Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable incremental compilation in bazel rules #281

Merged
merged 9 commits into from
Jul 5, 2019

Conversation

johnynek
Copy link
Owner

This uses the work in #54 to incrementally compile bosatsu_library and avoid typechecking dependencies for given targets. bosatsu_test now reuses the library parsing and typechecking.

this uncovered the bugs in #279

@johnynek johnynek changed the base branch from master to oscar/remaining_skolems June 23, 2019 17:48
@codecov-io
Copy link

codecov-io commented Jun 23, 2019

Codecov Report

Merging #281 into master will decrease coverage by 0.36%.
The diff coverage is 20%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #281      +/-   ##
==========================================
- Coverage   86.83%   86.47%   -0.37%     
==========================================
  Files          56       56              
  Lines        4536     4570      +34     
  Branches      181      195      +14     
==========================================
+ Hits         3939     3952      +13     
- Misses        597      618      +21
Impacted Files Coverage Δ
core/src/main/scala/org/bykn/bosatsu/Program.scala 98.07% <ø> (+13.07%) ⬆️
...e/src/main/scala/org/bykn/bosatsu/PackageMap.scala 70.16% <0%> (-0.39%) ⬇️
cli/src/main/scala/org/bykn/bosatsu/Main.scala 0% <0%> (ø) ⬆️
core/src/main/scala/org/bykn/bosatsu/Predef.scala 93.75% <100%> (+0.04%) ⬆️
...main/scala/org/bykn/bosatsu/TypedExprToProto.scala 90.04% <71.42%> (-0.58%) ⬇️
.../src/main/scala/org/bykn/bosatsu/Declaration.scala 97.94% <0%> (-0.42%) ⬇️
...rc/main/scala/org/bykn/bosatsu/TotalityCheck.scala 96.64% <0%> (+0.37%) ⬆️
...e/src/main/scala/org/bykn/bosatsu/StringUtil.scala 98.33% <0%> (+1.66%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a392274...6e04eb0. Read the comment docs.

@johnynek
Copy link
Owner Author

note, this coverage decline is actually false, we exercise the Main.scala code in the bazel rules, but we don't merge that coverage into the main reports.

@johnynek johnynek changed the base branch from oscar/remaining_skolems to master June 27, 2019 03:11
@johnynek
Copy link
Owner Author

johnynek commented Jul 4, 2019

going to merge this when it goes green.... end of a long road.

It's pretty great to have incremental compilation working!

My next steps I think are:

  1. documenting using bosatsu to generate json
  2. try to write more libraries
  3. use graal native-image to generate the bazel rule so the we don't pay the 1.5s JVM startup and don't need to worry about workers
  4. add optimization/normalization rules that transform TypedExpr to TypedExpr.
  5. add more tests of coercion in TypedExpr. It's a weaker kind of type inference, but I don't think it is solved: you know a type and cast it down to a narrower type.
  6. scala API for embedding in scala programs directly without having to go through JSON -> circe, or whatever.

@johnynek
Copy link
Owner Author

johnynek commented Jul 5, 2019

The coverage issue is due to Main not having coverage in tests, but is tested by the bosatsu bazel rules.

@johnynek johnynek merged commit 7deef2e into master Jul 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants