mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
Add platform data for a check run with a single file
This commit is contained in:
parent
61c9be564b
commit
2b8ef21720
1 changed files with 4 additions and 5 deletions
|
@ -661,7 +661,7 @@ struct CanAndCon {
|
||||||
module_docs: Option<ModuleDocumentation>,
|
module_docs: Option<ModuleDocumentation>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, PartialEq, Eq)]
|
||||||
enum PlatformPath<'a> {
|
enum PlatformPath<'a> {
|
||||||
NotSpecified,
|
NotSpecified,
|
||||||
Valid(To<'a>),
|
Valid(To<'a>),
|
||||||
|
@ -1145,7 +1145,6 @@ impl<'a> LoadStart<'a> {
|
||||||
|
|
||||||
// Load the root module synchronously; we can't proceed until we have its id.
|
// Load the root module synchronously; we can't proceed until we have its id.
|
||||||
let root_start_time = Instant::now();
|
let root_start_time = Instant::now();
|
||||||
|
|
||||||
let load_result = load_filename(
|
let load_result = load_filename(
|
||||||
arena,
|
arena,
|
||||||
filename.clone(),
|
filename.clone(),
|
||||||
|
@ -1290,7 +1289,6 @@ fn handle_root_type<'a>(
|
||||||
if let (Some(main_path), Some(cache_dir)) = (main_path.clone(), cache_dir) {
|
if let (Some(main_path), Some(cache_dir)) = (main_path.clone(), cache_dir) {
|
||||||
let mut messages = Vec::with_capacity(4);
|
let mut messages = Vec::with_capacity(4);
|
||||||
messages.push(header_output.msg);
|
messages.push(header_output.msg);
|
||||||
|
|
||||||
load_packages_from_main(
|
load_packages_from_main(
|
||||||
arena,
|
arena,
|
||||||
src_dir.clone(),
|
src_dir.clone(),
|
||||||
|
@ -2249,7 +2247,9 @@ fn update<'a>(
|
||||||
|
|
||||||
// If we're building an app module, and this was the platform
|
// If we're building an app module, and this was the platform
|
||||||
// specified in its header's `to` field, record it as our platform.
|
// specified in its header's `to` field, record it as our platform.
|
||||||
if state.opt_platform_shorthand == Some(config_shorthand) {
|
if state.opt_platform_shorthand == Some(config_shorthand)
|
||||||
|
|| state.platform_path == PlatformPath::RootIsModule
|
||||||
|
{
|
||||||
debug_assert!(state.platform_data.is_none());
|
debug_assert!(state.platform_data.is_none());
|
||||||
|
|
||||||
state.platform_data = Some(PlatformData {
|
state.platform_data = Some(PlatformData {
|
||||||
|
@ -2343,7 +2343,6 @@ fn update<'a>(
|
||||||
extend_module_with_builtin_import(parsed, ModuleId::INSPECT);
|
extend_module_with_builtin_import(parsed, ModuleId::INSPECT);
|
||||||
extend_module_with_builtin_import(parsed, ModuleId::TASK);
|
extend_module_with_builtin_import(parsed, ModuleId::TASK);
|
||||||
}
|
}
|
||||||
|
|
||||||
state
|
state
|
||||||
.module_cache
|
.module_cache
|
||||||
.imports
|
.imports
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue