Fork of daniellemaywood.uk/gleam — Wasm codegen work
2

Configure Feed

Select the types of activity you want to include in your feed.

Fix duplication of type aliases

+8 -7
+2
compiler-core/src/build.rs
··· 269 269 .map(|span| Comment::from((span, self.code.as_str())).content.into()) 270 270 .collect(); 271 271 272 + self.ast.type_info.documentation = self.ast.documentation.clone(); 273 + 272 274 // Order statements to avoid misassociating doc comments after the 273 275 // order has changed during compilation. 274 276 let mut statements: Vec<_> = self.ast.definitions.iter_mut().collect();
+5 -6
compiler-core/src/package_interface.rs
··· 389 389 } 390 390 391 391 impl ModuleInterface { 392 - pub fn from_interface(interface: &type_::ModuleInterface) -> ModuleInterface { 392 + fn from_interface(interface: &type_::ModuleInterface) -> ModuleInterface { 393 393 let mut types = HashMap::new(); 394 394 let mut type_aliases = HashMap::new(); 395 395 let mut constants = HashMap::new(); 396 396 let mut functions = HashMap::new(); 397 - for (name, constructor) in interface 398 - .types 399 - .iter() 400 - .filter(|(_, c)| c.publicity.is_public()) 401 - { 397 + for (name, constructor) in interface.types.iter().filter(|(name, c)| { 398 + // Aliases are stored separately 399 + c.publicity.is_public() && !interface.type_aliases.contains_key(*name) 400 + }) { 402 401 let mut id_map = IdMap::new(); 403 402 404 403 let TypeConstructor {
+1 -1
compiler-core/src/package_interface/snapshots/gleam_core__package_interface__tests__type_definition.snap
··· 12 12 "type-aliases": {}, 13 13 "types": { 14 14 "Wibble": { 15 - "documentation": " Wibble's documentation", 15 + "documentation": " Wibble's documentation\n", 16 16 "deprecation": null, 17 17 "parameters": 2, 18 18 "constructors": [