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

feat: incremental compilation on hot reloading #49

Merged
merged 5 commits into from
Nov 22, 2019

Conversation

baszalmstra
Copy link
Collaborator

@baszalmstra baszalmstra commented Nov 15, 2019

This commit restructures the compiler crates to better support incremental compilation. The compiler --watch mode is now incremental, reusing the state from previous compilations.

Todo:

  • Implement Driver
  • Make --watch mode incremental with Driver
  • Add a test to check --watch mode works
  • Add a runtime test to verify hotloading

@baszalmstra
Copy link
Collaborator Author

@baszalmstra baszalmstra self-assigned this Nov 18, 2019
@baszalmstra baszalmstra force-pushed the incremental_compilation branch 2 times, most recently from e316284 to 98ae497 Compare November 19, 2019 17:36
@baszalmstra baszalmstra marked this pull request as ready for review November 19, 2019 18:40
@baszalmstra baszalmstra changed the title WIP: Incremental compilation Incremental compilation & hotreloading tests Nov 20, 2019
@baszalmstra
Copy link
Collaborator Author

crates/mun_errors/src/lib.rs Outdated Show resolved Hide resolved
crates/mun_hir/src/diagnostics.rs Outdated Show resolved Hide resolved
crates/mun_runtime/src/lib.rs Show resolved Hide resolved
crates/mun_compiler/src/diagnostics.rs Outdated Show resolved Hide resolved
crates/mun_compiler/src/diagnostics/emit.rs Outdated Show resolved Hide resolved
crates/mun_compiler/src/driver.rs Outdated Show resolved Hide resolved
crates/mun_compiler/src/driver.rs Show resolved Hide resolved
crates/mun_compiler/src/driver.rs Outdated Show resolved Hide resolved
crates/mun_runtime/src/test.rs Outdated Show resolved Hide resolved
crates/mun_runtime/src/test.rs Outdated Show resolved Hide resolved
baszalmstra and others added 4 commits November 20, 2019 20:40
The notify crate does not properly handle watching of recreated files on
all platform. This commit instead watches the parent directory as
proposed in the documentation of Notify.

See: notify-rs/notify#166
@codecov
Copy link

codecov bot commented Nov 20, 2019

Codecov Report

Merging #49 into master will increase coverage by 0.41%.
The diff coverage is 62.98%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #49      +/-   ##
==========================================
+ Coverage   70.43%   70.85%   +0.41%     
==========================================
  Files         102      106       +4     
  Lines        6813     6838      +25     
==========================================
+ Hits         4799     4845      +46     
+ Misses       2014     1993      -21
Impacted Files Coverage Δ
crates/mun_errors/src/lib.rs 0% <ø> (ø) ⬆️
crates/mun_hir/src/diagnostics.rs 15.94% <ø> (ø) ⬆️
crates/mun_hir/src/db.rs 100% <ø> (ø) ⬆️
crates/mun_compiler/src/diagnostics/emit.rs 0% <ø> (ø)
crates/mun_compiler/src/lib.rs 17.64% <0%> (-30.99%) ⬇️
crates/mun_compiler_daemon/src/lib.rs 0% <0%> (ø) ⬆️
crates/mun_codegen/src/mock.rs 79.16% <100%> (+4.16%) ⬆️
crates/mun_hir/src/mock.rs 85.36% <100%> (+1.58%) ⬆️
crates/mun_codegen/src/test.rs 100% <100%> (ø) ⬆️
crates/mun_hir/src/code_model.rs 69.76% <100%> (+1.55%) ⬆️
... and 21 more

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 bb44ea0...8b6c3bf. Read the comment docs.

@baszalmstra baszalmstra mentioned this pull request Nov 21, 2019
@baszalmstra baszalmstra merged commit dec7d73 into mun-lang:master Nov 22, 2019
@baszalmstra baszalmstra deleted the incremental_compilation branch November 22, 2019 15:21
@Wodann Wodann changed the title Incremental compilation & hotreloading tests feat: incremental compilation & hotreloading May 14, 2020
@Wodann Wodann changed the title feat: incremental compilation & hotreloading feat: incremental compilation on hotreloading May 14, 2020
@Wodann Wodann changed the title feat: incremental compilation on hotreloading feat: incremental compilation on hot reloading May 14, 2020
@Wodann Wodann added this to the Mun v0.2 milestone May 14, 2020
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