build: add failure message if compile build variable for angular/angular usage (#34109)
To quicken migration for our own developers away from using compile=aot for setting ivy, we actually fail the build process if the compile build variable is used with a message to use our config flags instead. PR Close #34109
This commit is contained in:
		
							parent
							
								
									72d366fe21
								
							
						
					
					
						commit
						c16a79df5c
					
				| @ -35,10 +35,17 @@ def is_ivy_enabled(ctx): | |||||||
|     Returns: |     Returns: | ||||||
|       Boolean, Whether the ivy compiler should be used. |       Boolean, Whether the ivy compiler should be used. | ||||||
|     """ |     """ | ||||||
|  |     if "compile" in ctx.var and ctx.workspace_name == "angular": | ||||||
|  |         fail( | ||||||
|  |             msg = "Setting ViewEngine/Ivy using --define=compile is deprecated, please use " + | ||||||
|  |                   "--config=ivy or --config=view-engine instead.", | ||||||
|  |             attr = "ng_module", | ||||||
|  |         ) | ||||||
|  | 
 | ||||||
|     # TODO(josephperrott): Remove configuration via compile=aot define flag. |     # TODO(josephperrott): Remove configuration via compile=aot define flag. | ||||||
|     if ctx.var.get("compile", None) == "aot": |     if ctx.var.get("compile", None) == "aot": | ||||||
|         print("Setting ViewEngine/Ivy using the compile build variable (--define=compile=*) " + |         print("Setting ViewEngine/Ivy using the compile build variable (--define=compile=*) " + | ||||||
|               "is deprecated, please use the angular_ivy_enabled build variable instead.") |               "is deprecated, please use the --define=angular_ivy_enabled=True instead.") | ||||||
|         return True |         return True | ||||||
| 
 | 
 | ||||||
|     if ctx.var.get("angular_ivy_enabled", None) == "True": |     if ctx.var.get("angular_ivy_enabled", None) == "True": | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user