mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
Add HeaderType::Package
This commit is contained in:
parent
51c919993a
commit
7512a964f7
2 changed files with 17 additions and 2 deletions
|
@ -2402,6 +2402,9 @@ fn update<'a>(
|
|||
debug_assert!(matches!(state.platform_path, PlatformPath::NotSpecified));
|
||||
state.platform_path = PlatformPath::Valid(to_platform);
|
||||
}
|
||||
Package { config_shorthand } => {
|
||||
work.extend(state.dependencies.notify_package(config_shorthand));
|
||||
}
|
||||
Platform {
|
||||
config_shorthand,
|
||||
provides,
|
||||
|
@ -4215,11 +4218,15 @@ fn build_header<'a>(
|
|||
);
|
||||
}
|
||||
|
||||
// Platforms do not have names. This is important because otherwise
|
||||
// Platform modules do not have names. This is important because otherwise
|
||||
// those names end up in host-generated symbols, and they may contain
|
||||
// characters that hosts might not allow in their function names.
|
||||
String::new().into()
|
||||
}
|
||||
HeaderType::Package { .. } => {
|
||||
// Package modules do not have names.
|
||||
String::new().into()
|
||||
}
|
||||
HeaderType::Interface { name, .. }
|
||||
| HeaderType::Builtin { name, .. }
|
||||
| HeaderType::Hosted { name, .. } => {
|
||||
|
@ -5111,7 +5118,11 @@ fn canonicalize_and_constrain<'a>(
|
|||
// Generate documentation information
|
||||
// TODO: store timing information?
|
||||
let module_docs = match header_type {
|
||||
HeaderType::Platform { .. } | HeaderType::App { .. } => None,
|
||||
HeaderType::App { .. } => None,
|
||||
HeaderType::Platform { .. } | HeaderType::Package { .. } => {
|
||||
// TODO: actually generate docs for platform and package modules.
|
||||
None
|
||||
}
|
||||
HeaderType::Interface { name, .. }
|
||||
| HeaderType::Builtin { name, .. }
|
||||
| HeaderType::Hosted { name, .. } => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue