successfully generated a makefile that worked with no tweaks

stable
penguin 4 years ago
parent 1b8ac7bbcf
commit a4611500fb

@ -3,7 +3,6 @@
[arch] [arch]
QUOTE = "\""
PROJECT_NAME = "d21test" PROJECT_NAME = "d21test"
DIR_INCLUDES = ["-I$(QUOTE)../ESF/mcu/inc$(QUOTE)", DIR_INCLUDES = ["-I$(QUOTE)../ESF/mcu/inc$(QUOTE)",
"-I$(QUOTE)../inc$(QUOTE)"] "-I$(QUOTE)../inc$(QUOTE)"]
@ -14,7 +13,22 @@ OBJS_AS_ARGS = ["$(QUOTE)src/main.o$(QUOTE)"]
CLEAN_PREREQS = [""] CLEAN_PREREQS = [""]
CLEAN_CMDS = ["rm -f $(OBJS_AS_ARGS)", CLEAN_CMDS = ["rm -f $(OBJS_AS_ARGS)",
"rm -f $(DEPS_AS_ARGS)"] "rm -f $(DEPS_AS_ARGS)",
"rm -f $(PROJECT_NAME).bin",
"rm -f $(PROJECT_NAME).elf",
"rm -f $(PROJECT_NAME).hex"]
DEBUG_PREREQS = ["$(PROJECT_NAME).elf"]
DEBUG_CMDS = ["$(QUOTE)arm-none-eabi-gdb$(QUOTE) -iex $(QUOTE)target extended-remote localhost:3333$(QUOTE) $(PROJECT_NAME).elf"]
ELF_TARGET_PREREQS = ["$(OBJS)"]
ELF_TARGET_CMDS = ["$(QUOTE)$(CC)$(QUOTE) -o $@ $(OBJS_AS_ARGS) $(ELF_FLAGS)"]
BIN_TARGET_PREREQS = ["$(PROJECT_NAME).elf"]
BIN_TARGET_CMDS = ["$(QUOTE)$(OBJCOPY)$(QUOTE) -O binary $(QUOTE)$<$(QUOTE) $(QUOTE)$@$(QUOTE)"]
HEX_TARGET_PREREQS = ["$(PROJECT_NAME).elf"]
HEX_TARGET_CMDS = ["$(QUOTE)$(OBJCOPY)$(QUOTE) -O ihex $(HEX_FLAGS) $(QUOTE)$<$(QUOTE) $(QUOTE)$@$(QUOTE)"]
[arch.arm] [arch.arm]
TOOLCHAIN = "${ESF_DIR}/toolchains/arm/bin/arm-none-eabi" TOOLCHAIN = "${ESF_DIR}/toolchains/arm/bin/arm-none-eabi"
@ -63,6 +77,20 @@ ALL_PREREQS = ["$(SUB_DIRS)",
"$(PROJECT_NAME).lss"] "$(PROJECT_NAME).lss"]
ALL_CMDS = ["$(QUOTE)$(SIZE)$(QUOTE) $(QUOTE)$(PROJECT_NAME).elf$(QUOTE)"] ALL_CMDS = ["$(QUOTE)$(SIZE)$(QUOTE) $(QUOTE)$(PROJECT_NAME).elf$(QUOTE)"]
SUB_DIRS = ["src", "ESF/mcu/src"] SUB_DIRS = ["src", "ESF/mcu/src"]
EEP_TARGET_PREREQS = ["$(PROJECT_NAME).elf"]
EEP_TARGET_CMDS = ["$(QUOTE)$(OBJCOPY)$(QUOTE) $(EEP_FLAGS) -O binary $(QUOTE)$<$(QUOTE)",
"$(QUOTE)$@$(QUOTE) || exit 0"]
LSS_TARGET_PREREQS = ["$(PROJECT_NAME).elf"]
LSS_TARGET_CMDS = ["$(QUOTE)$(OBJDUMP)$(QUOTE) -h -S $(QUOTE)$<$(QUOTE) > $(QUOTE)$@$(QUOTE)"]
CLEAN_CMDS = ["rm -f $(PROJECT_NAME).a",
"rm -f $(PROJECT_NAME).lss",
"rm -f $(PROJECT_NAME).srec",
"rm -f $(PROJECT_NAME).map",
"rm -f $(PROJECT_NAME).eep"]
[arch.arm.samd21a] [arch.arm.samd21a]
MCPU = "cortex-m0plus" MCPU = "cortex-m0plus"
CFLAGS = ["-D$(MCU)", "-mcpu=$(MCPU)"] CFLAGS = ["-D$(MCU)", "-mcpu=$(MCPU)"]

@ -53,31 +53,31 @@ EEP_FLAGS= \
.eeprom=0 \ .eeprom=0 \
--no-change-warnings --no-change-warnings
ifdef SystemRoot ifdef SystemRoot
SHELL = cmd.exe SHELL = cmd.exe
MK_DIR = mkdir MK_DIR = mkdir
else else
ifeq ($(shell uname), Linux) ifeq ($(shell uname), Linux)
MK_DIR = mkdir -p MK_DIR = mkdir -p
endif endif
ifeq ($(shell uname | cut -d _ -f 1), CYGWIN) ifeq ($(shell uname | cut -d _ -f 1), CYGWIN)
MK_DIR = mkdir -p MK_DIR = mkdir -p
endif endif
ifeq ($(shell uname | cut -d _ -f 1), MINGW32) ifeq ($(shell uname | cut -d _ -f 1), MINGW32)
MK_DIR = mkdir -p MK_DIR = mkdir -p
endif endif
ifeq ($(shell uname | cut -d _ -f 1), MINGW64) ifeq ($(shell uname | cut -d _ -f 1), MINGW64)
MK_DIR = mkdir -p MK_DIR = mkdir -p
endif endif
ifeq ($(shell uname | cut -d _ -f 1), DARWIN) ifeq ($(shell uname | cut -d _ -f 1), DARWIN)
MK_DIR = mkdir -p MK_DIR = mkdir -p
endif
endif endif
endif
SUB_DIRS+= \ SUB_DIRS+= \
src \ src \
ESF/mcu/src ESF/mcu/src
@ -117,3 +117,78 @@ $(PROJECT_NAME).eep\
$(PROJECT_NAME).lss $(PROJECT_NAME).lss
\ \
$(QUOTE)$(SIZE)$(QUOTE) $(QUOTE)$(PROJECT_NAME).elf$(QUOTE) $(QUOTE)$(SIZE)$(QUOTE) $(QUOTE)$(PROJECT_NAME).elf$(QUOTE)
$(PROJECT_NAME).elf:\
$(OBJS)
\
$(QUOTE)$(CC)$(QUOTE) -o $@ $(OBJS_AS_ARGS) $(ELF_FLAGS)
$(PROJECT_NAME).bin:\
$(PROJECT_NAME).elf
\
$(QUOTE)$(OBJCOPY)$(QUOTE) -O binary $(QUOTE)$<$(QUOTE) $(QUOTE)$@$(QUOTE)
$(PROJECT_NAME).hex:\
$(PROJECT_NAME).elf
\
$(QUOTE)$(OBJCOPY)$(QUOTE) -O ihex $(HEX_FLAGS) $(QUOTE)$<$(QUOTE) $(QUOTE)$@$(QUOTE)
$(PROJECT_NAME).eep:\
$(PROJECT_NAME).elf
\
$(QUOTE)$(OBJCOPY)$(QUOTE) $(EEP_FLAGS) -O binary $(QUOTE)$<$(QUOTE)\
$(QUOTE)$@$(QUOTE) || exit 0
$(PROJECT_NAME).lss:\
$(PROJECT_NAME).elf
\
$(QUOTE)$(OBJDUMP)$(QUOTE) -h -S $(QUOTE)$<$(QUOTE) > $(QUOTE)$@$(QUOTE)
# Compiler targets
%.o: %.c
@echo Building file: $<
@echo ARM/GNU C Compiler
$(QUOTE)$(CC)$(QUOTE) $(CFLAGS) -o $(QUOTE)$@$(QUOTE) $(QUOTE)$<$(QUOTE)
@echo Finished building: $<
%.o: %.s
@echo Building file: $<
@echo ARM/GNU Assembler
$(QUOTE)$(AS)$(QUOTE) $(CFLAGS) -o $(QUOTE)$@$(QUOTE) $(QUOTE)$<$(QUOTE)
@echo Finished building: $<
%.o: %.S
@echo Building file: $<
@echo ARM/GNU Preprocessing Assembler
$(QUOTE)$(CC)$(QUOTE) $(CFLAGS) -o $(QUOTE)$@$(QUOTE) $(QUOTE)$<$(QUOTE)
@echo Finished building: $<
$(SUB_DIRS):
$(MK_DIR) $(QUOTE)$@$(QUOTE)
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(strip $(DEPS)),)
-include $(DEPS)
endif
endif
clean:
\
rm -f $(PROJECT_NAME).a \
rm -f $(PROJECT_NAME).lss \
rm -f $(PROJECT_NAME).srec \
rm -f $(PROJECT_NAME).map \
rm -f $(PROJECT_NAME).eep \
rm -f $(OBJS_AS_ARGS) \
rm -f $(DEPS_AS_ARGS) \
rm -f $(PROJECT_NAME).bin \
rm -f $(PROJECT_NAME).elf \
rm -f $(PROJECT_NAME).hex
debug:\
$(PROJECT_NAME).elf
\
$(QUOTE)arm-none-eabi-gdb$(QUOTE) -iex $(QUOTE)target extended-remote localhost:3333$(QUOTE) $(PROJECT_NAME).elf
QUOTE:="

@ -4,7 +4,6 @@ use std::io::prelude::*;
use std::fs::File; use std::fs::File;
use std::fs::OpenOptions; use std::fs::OpenOptions;
use std::path::Path; use std::path::Path;
use toml::value;
fn main() fn main()
{ {
let mut mcu_lookup_table = Config::new(); let mut mcu_lookup_table = Config::new();
@ -317,31 +316,31 @@ fn gen_makefile(mkfile: &HashMap<String, config::Value>) -> bool
writeln!(app_file, "\n").unwrap(); writeln!(app_file, "\n").unwrap();
// Write SystemRoot config stuff for cross compatibility // Write SystemRoot config stuff for cross compatibility
let sysroot: String = String::from("ifdef SystemRoot let sysroot: String = String::from("
SHELL = cmd.exe\n\ ifdef SystemRoot
MK_DIR = mkdir\n\ SHELL = cmd.exe
else\n\ MK_DIR = mkdir
ifeq ($(shell uname), Linux)\n\ else
MK_DIR = mkdir -p\n\ ifeq ($(shell uname), Linux)
endif\n\ MK_DIR = mkdir -p
\n\ endif
ifeq ($(shell uname | cut -d _ -f 1), CYGWIN)\n\
MK_DIR = mkdir -p\n\ ifeq ($(shell uname | cut -d _ -f 1), CYGWIN)
endif\n\ MK_DIR = mkdir -p
\n\ endif
ifeq ($(shell uname | cut -d _ -f 1), MINGW32)\n\
MK_DIR = mkdir -p\n\ ifeq ($(shell uname | cut -d _ -f 1), MINGW32)
endif\n\ MK_DIR = mkdir -p
\n\ endif
ifeq ($(shell uname | cut -d _ -f 1), MINGW64)\n\
MK_DIR = mkdir -p\n\ ifeq ($(shell uname | cut -d _ -f 1), MINGW64)
endif\n\ MK_DIR = mkdir -p
\n\ endif
ifeq ($(shell uname | cut -d _ -f 1), DARWIN)\n\
MK_DIR = mkdir -p\n\ ifeq ($(shell uname | cut -d _ -f 1), DARWIN)
endif\n\ MK_DIR = mkdir -p
endif\n\ endif
"); endif");
writeln!(app_file, "{}", sysroot).unwrap(); writeln!(app_file, "{}", sysroot).unwrap();
match mkfile.get("SUB_DIRS") match mkfile.get("SUB_DIRS")
@ -482,7 +481,293 @@ endif\n\
}, },
} }
write!(app_file, "\n\n").unwrap();
match mkfile.get("ELF_TARGET_PREREQS")
{
None =>
{
println!("ELF_TARGET_PREREQS Not found");
}
Some(v) =>
{
write!(app_file, "$(PROJECT_NAME).elf:").unwrap();
for cflag in v.clone().into_array().unwrap()
{
writeln!(app_file, "\\").unwrap();
write!(app_file, "{}", cflag).unwrap();
}
},
}
match mkfile.get("ELF_TARGET_CMDS")
{
None =>
{
println!("ELF_TARGET_CMDS Not found");
}
Some(v) =>
{
write!(app_file, "\n\t").unwrap();
for cflag in v.clone().into_array().unwrap()
{
writeln!(app_file, "\\").unwrap();
write!(app_file, "\t{}", cflag).unwrap();
}
},
}
write!(app_file, "\n\n").unwrap();
match mkfile.get("BIN_TARGET_PREREQS")
{
None =>
{
println!("BIN_TARGET_PREREQS Not found");
}
Some(v) =>
{
write!(app_file, "$(PROJECT_NAME).bin:").unwrap();
for cflag in v.clone().into_array().unwrap()
{
writeln!(app_file, "\\").unwrap();
write!(app_file, "{}", cflag).unwrap();
}
},
}
match mkfile.get("BIN_TARGET_CMDS")
{
None =>
{
println!("BIN_TARGET_CMDS Not found");
}
Some(v) =>
{
write!(app_file, "\n\t").unwrap();
for cflag in v.clone().into_array().unwrap()
{
writeln!(app_file, "\\").unwrap();
write!(app_file, "\t{}", cflag).unwrap();
}
},
}
write!(app_file, "\n\n").unwrap();
match mkfile.get("HEX_TARGET_PREREQS")
{
None =>
{
println!("HEX_TARGET_PREREQS Not found");
}
Some(v) =>
{
write!(app_file, "$(PROJECT_NAME).hex:").unwrap();
for cflag in v.clone().into_array().unwrap()
{
writeln!(app_file, "\\").unwrap();
write!(app_file, "{}", cflag).unwrap();
}
},
}
match mkfile.get("HEX_TARGET_CMDS")
{
None =>
{
println!("HEX_TARGET_CMDS Not found");
}
Some(v) =>
{
write!(app_file, "\n\t").unwrap();
for cflag in v.clone().into_array().unwrap()
{
writeln!(app_file, "\\").unwrap();
write!(app_file, "\t{}", cflag).unwrap();
}
},
}
write!(app_file, "\n\n").unwrap();
match mkfile.get("EEP_TARGET_PREREQS")
{
None =>
{
println!("EEP_TARGET_PREREQS Not found");
}
Some(v) =>
{
write!(app_file, "$(PROJECT_NAME).eep:").unwrap();
for cflag in v.clone().into_array().unwrap()
{
writeln!(app_file, "\\").unwrap();
write!(app_file, "{}", cflag).unwrap();
}
},
}
match mkfile.get("EEP_TARGET_CMDS")
{
None =>
{
println!("EEP_TARGET_CMDS Not found");
}
Some(v) =>
{
write!(app_file, "\n\t").unwrap();
for cflag in v.clone().into_array().unwrap()
{
writeln!(app_file, "\\").unwrap();
write!(app_file, "\t{}", cflag).unwrap();
}
},
}
write!(app_file, "\n\n").unwrap();
match mkfile.get("LSS_TARGET_PREREQS")
{
None =>
{
println!("LSS_TARGET_PREREQS Not found");
}
Some(v) =>
{
write!(app_file, "$(PROJECT_NAME).lss:").unwrap();
for cflag in v.clone().into_array().unwrap()
{
writeln!(app_file, "\\").unwrap();
write!(app_file, "{}", cflag).unwrap();
}
},
}
match mkfile.get("LSS_TARGET_CMDS")
{
None =>
{
println!("LSS_TARGET_CMDS Not found");
}
Some(v) =>
{
write!(app_file, "\n\t").unwrap();
for cflag in v.clone().into_array().unwrap()
{
writeln!(app_file, "\\").unwrap();
write!(app_file, "\t{}", cflag).unwrap();
}
},
}
// Compiler Targets
writeln!(app_file, "").unwrap();
writeln!(app_file, "
# Compiler targets
%.o: %.c
@echo Building file: $<
@echo ARM/GNU C Compiler
$(QUOTE)$(CC)$(QUOTE) $(CFLAGS) -o $(QUOTE)$@$(QUOTE) $(QUOTE)$<$(QUOTE)
@echo Finished building: $<").unwrap();
writeln!(app_file, "
%.o: %.s
@echo Building file: $<
@echo ARM/GNU Assembler
$(QUOTE)$(AS)$(QUOTE) $(CFLAGS) -o $(QUOTE)$@$(QUOTE) $(QUOTE)$<$(QUOTE)
@echo Finished building: $<").unwrap();
writeln!(app_file, "
%.o: %.S
@echo Building file: $<
@echo ARM/GNU Preprocessing Assembler
$(QUOTE)$(CC)$(QUOTE) $(CFLAGS) -o $(QUOTE)$@$(QUOTE) $(QUOTE)$<$(QUOTE)
@echo Finished building: $<").unwrap();
writeln!(app_file, "\n").unwrap();
writeln!(app_file, "$(SUB_DIRS):\n\t$(MK_DIR) $(QUOTE)$@$(QUOTE)").unwrap();
writeln!(app_file, "
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(strip $(DEPS)),)
-include $(DEPS)
endif
endif\n").unwrap();
match mkfile.get("CLEAN_PREREQS")
{
None =>
{
println!("CLEAN_TARGET_PREREQS Not found");
}
Some(v) =>
{
write!(app_file, "clean:").unwrap();
for cflag in v.clone().into_array().unwrap()
{
if !cflag.to_string().is_empty()
{
writeln!(app_file, "\\").unwrap();
write!(app_file, "{}", cflag).unwrap()
}
}
},
}
match mkfile.get("CLEAN_CMDS")
{
None =>
{
println!("CLEAN_CMDS Not found");
}
Some(v) =>
{
write!(app_file, "\n\t").unwrap();
for cflag in v.clone().into_array().unwrap()
{
if !cflag.to_string().is_empty()
{
writeln!(app_file, " \\").unwrap();
write!(app_file, "\t{}", cflag).unwrap()
}
}
},
}
writeln!(app_file, "\n").unwrap();
match mkfile.get("DEBUG_PREREQS")
{
None =>
{
println!("DEBUG_TARGET_PREREQS Not found");
}
Some(v) =>
{
write!(app_file, "debug:").unwrap();
for cflag in v.clone().into_array().unwrap()
{
if !cflag.to_string().is_empty()
{
writeln!(app_file, "\\").unwrap();
write!(app_file, "{}", cflag).unwrap()
}
}
},
}
match mkfile.get("DEBUG_CMDS")
{
None =>
{
println!("DEBUG_CMDS Not found");
}
Some(v) =>
{
write!(app_file, "\n\t").unwrap();
for cflag in v.clone().into_array().unwrap()
{
if !cflag.to_string().is_empty()
{
writeln!(app_file, " \\").unwrap();
write!(app_file, "\t{}", cflag).unwrap()
}
}
},
}
writeln!(app_file, "\n\nQUOTE:=\"").unwrap();
true true
} }

@ -1,4 +1,3 @@
{"message":"unused imports: `Environment`, `Value`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":21,"byte_end":32,"line_start":1,"line_end":1,"column_start":22,"column_end":33,"is_primary":true,"text":[{"text":"use config::{Config, Environment, Value};","highlight_start":22,"highlight_end":33}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/main.rs","byte_start":34,"byte_end":39,"line_start":1,"line_end":1,"column_start":35,"column_end":40,"is_primary":true,"text":[{"text":"use config::{Config, Environment, Value};","highlight_start":35,"highlight_end":40}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_imports)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove the unused imports","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":19,"byte_end":39,"line_start":1,"line_end":1,"column_start":20,"column_end":40,"is_primary":true,"text":[{"text":"use config::{Config, Environment, Value};","highlight_start":20,"highlight_end":40}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused imports: `Environment`, `Value`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:1:22\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m1\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0muse config::{Config, Environment, Value};\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_imports)]` on by default\u001b[0m\n\n"} {"message":"unused imports: `Environment`, `Value`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":21,"byte_end":32,"line_start":1,"line_end":1,"column_start":22,"column_end":33,"is_primary":true,"text":[{"text":"use config::{Config, Environment, Value};","highlight_start":22,"highlight_end":33}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/main.rs","byte_start":34,"byte_end":39,"line_start":1,"line_end":1,"column_start":35,"column_end":40,"is_primary":true,"text":[{"text":"use config::{Config, Environment, Value};","highlight_start":35,"highlight_end":40}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_imports)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove the unused imports","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":19,"byte_end":39,"line_start":1,"line_end":1,"column_start":20,"column_end":40,"is_primary":true,"text":[{"text":"use config::{Config, Environment, Value};","highlight_start":20,"highlight_end":40}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused imports: `Environment`, `Value`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:1:22\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m1\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0muse config::{Config, Environment, Value};\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_imports)]` on by default\u001b[0m\n\n"}
{"message":"unused import: `toml::value`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":168,"byte_end":179,"line_start":7,"line_end":7,"column_start":5,"column_end":16,"is_primary":true,"text":[{"text":"use toml::value;","highlight_start":5,"highlight_end":16}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove the whole `use` item","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":164,"byte_end":180,"line_start":7,"line_end":7,"column_start":1,"column_end":17,"is_primary":true,"text":[{"text":"use toml::value;","highlight_start":1,"highlight_end":17}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused import: `toml::value`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:7:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m7\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0muse toml::value;\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^\u001b[0m\n\n"} {"message":"unused `std::result::Result` that must be used","code":{"code":"unused_must_use","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":1813,"byte_end":1846,"line_start":68,"line_end":68,"column_start":3,"column_end":36,"is_primary":true,"text":[{"text":"\t\tstd::fs::remove_file(\"Makefile\");","highlight_start":3,"highlight_end":36}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_must_use)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"this `Result` may be an `Err` variant, which should be handled","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused `std::result::Result` that must be used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:68:3\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m68\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m std::fs::remove_file(\"Makefile\");\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_must_use)]` on by default\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: this `Result` may be an `Err` variant, which should be handled\u001b[0m\n\n"}
{"message":"unused `std::result::Result` that must be used","code":{"code":"unused_must_use","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":1830,"byte_end":1863,"line_start":69,"line_end":69,"column_start":3,"column_end":36,"is_primary":true,"text":[{"text":"\t\tstd::fs::remove_file(\"Makefile\");","highlight_start":3,"highlight_end":36}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_must_use)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"this `Result` may be an `Err` variant, which should be handled","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused `std::result::Result` that must be used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:69:3\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m69\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m std::fs::remove_file(\"Makefile\");\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_must_use)]` on by default\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: this `Result` may be an `Err` variant, which should be handled\u001b[0m\n\n"} {"message":"2 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: 2 warnings emitted\u001b[0m\n\n"}
{"message":"3 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: 3 warnings emitted\u001b[0m\n\n"}

@ -1,4 +1,3 @@
{"message":"unused imports: `Environment`, `Value`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":21,"byte_end":32,"line_start":1,"line_end":1,"column_start":22,"column_end":33,"is_primary":true,"text":[{"text":"use config::{Config, Environment, Value};","highlight_start":22,"highlight_end":33}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/main.rs","byte_start":34,"byte_end":39,"line_start":1,"line_end":1,"column_start":35,"column_end":40,"is_primary":true,"text":[{"text":"use config::{Config, Environment, Value};","highlight_start":35,"highlight_end":40}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_imports)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove the unused imports","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":19,"byte_end":39,"line_start":1,"line_end":1,"column_start":20,"column_end":40,"is_primary":true,"text":[{"text":"use config::{Config, Environment, Value};","highlight_start":20,"highlight_end":40}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused imports: `Environment`, `Value`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:1:22\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m1\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0muse config::{Config, Environment, Value};\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_imports)]` on by default\u001b[0m\n\n"} {"message":"unused imports: `Environment`, `Value`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":21,"byte_end":32,"line_start":1,"line_end":1,"column_start":22,"column_end":33,"is_primary":true,"text":[{"text":"use config::{Config, Environment, Value};","highlight_start":22,"highlight_end":33}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"src/main.rs","byte_start":34,"byte_end":39,"line_start":1,"line_end":1,"column_start":35,"column_end":40,"is_primary":true,"text":[{"text":"use config::{Config, Environment, Value};","highlight_start":35,"highlight_end":40}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_imports)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove the unused imports","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":19,"byte_end":39,"line_start":1,"line_end":1,"column_start":20,"column_end":40,"is_primary":true,"text":[{"text":"use config::{Config, Environment, Value};","highlight_start":20,"highlight_end":40}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused imports: `Environment`, `Value`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:1:22\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m1\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0muse config::{Config, Environment, Value};\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_imports)]` on by default\u001b[0m\n\n"}
{"message":"unused import: `toml::value`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":168,"byte_end":179,"line_start":7,"line_end":7,"column_start":5,"column_end":16,"is_primary":true,"text":[{"text":"use toml::value;","highlight_start":5,"highlight_end":16}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove the whole `use` item","code":null,"level":"help","spans":[{"file_name":"src/main.rs","byte_start":164,"byte_end":180,"line_start":7,"line_end":7,"column_start":1,"column_end":17,"is_primary":true,"text":[{"text":"use toml::value;","highlight_start":1,"highlight_end":17}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused import: `toml::value`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:7:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m7\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0muse toml::value;\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^\u001b[0m\n\n"} {"message":"unused `std::result::Result` that must be used","code":{"code":"unused_must_use","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":1813,"byte_end":1846,"line_start":68,"line_end":68,"column_start":3,"column_end":36,"is_primary":true,"text":[{"text":"\t\tstd::fs::remove_file(\"Makefile\");","highlight_start":3,"highlight_end":36}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_must_use)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"this `Result` may be an `Err` variant, which should be handled","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused `std::result::Result` that must be used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:68:3\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m68\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m std::fs::remove_file(\"Makefile\");\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_must_use)]` on by default\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: this `Result` may be an `Err` variant, which should be handled\u001b[0m\n\n"}
{"message":"unused `std::result::Result` that must be used","code":{"code":"unused_must_use","explanation":null},"level":"warning","spans":[{"file_name":"src/main.rs","byte_start":1830,"byte_end":1863,"line_start":69,"line_end":69,"column_start":3,"column_end":36,"is_primary":true,"text":[{"text":"\t\tstd::fs::remove_file(\"Makefile\");","highlight_start":3,"highlight_end":36}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_must_use)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"this `Result` may be an `Err` variant, which should be handled","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused `std::result::Result` that must be used\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/main.rs:69:3\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m69\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m std::fs::remove_file(\"Makefile\");\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_must_use)]` on by default\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: this `Result` may be an `Err` variant, which should be handled\u001b[0m\n\n"} {"message":"2 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: 2 warnings emitted\u001b[0m\n\n"}
{"message":"3 warnings emitted","code":null,"level":"warning","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: 3 warnings emitted\u001b[0m\n\n"}

Loading…
Cancel
Save