Name clash error message include hash of clashing packages (#39234)
Co-authored-by: Simon <simonleary@umass.edu>
This commit is contained in:
		@@ -321,12 +321,13 @@ def refresh(module_type, specs, args):
 | 
			
		||||
        file2writer[item.layout.filename].append(item)
 | 
			
		||||
 | 
			
		||||
    if len(file2writer) != len(writers):
 | 
			
		||||
        spec_fmt_str = "{name}@={version}%{compiler}/{hash:7} {variants} arch={arch}"
 | 
			
		||||
        message = "Name clashes detected in module files:\n"
 | 
			
		||||
        for filename, writer_list in file2writer.items():
 | 
			
		||||
            if len(writer_list) > 1:
 | 
			
		||||
                message += "\nfile: {0}\n".format(filename)
 | 
			
		||||
                for x in writer_list:
 | 
			
		||||
                    message += "spec: {0}\n".format(x.spec.format())
 | 
			
		||||
                    message += "spec: {0}\n".format(x.spec.format(spec_fmt_str))
 | 
			
		||||
        tty.error(message)
 | 
			
		||||
        tty.error("Operation aborted")
 | 
			
		||||
        raise SystemExit(1)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user