Skip to content

Refactored build-properties creation (and removed some legacy code) #2082

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Mar 2, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Refactored generation of 'software' build property
  • Loading branch information
cmaglie committed Feb 27, 2023
commit ca7cd4cba174adbb508a04628ae011b6e302c86e
3 changes: 3 additions & 0 deletions arduino/cores/packagemanager/package_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,9 @@ func (pme *Explorer) ResolveFQBN(fqbn *cores.FQBN) (
// Deprecated properties
buildProperties.Set("ide_version", "10607")
buildProperties.Set("runtime.ide.version", "10607")
if !buildProperties.ContainsKey("software") {
buildProperties.Set("software", "ARDUINO")
}

// No errors... phew!
return targetPackage, platformRelease, board, buildProperties, buildPlatformRelease, nil
Expand Down
1 change: 0 additions & 1 deletion legacy/builder/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ var tr = i18n.Tr

const DEFAULT_DEBUG_LEVEL = 5
const DEFAULT_WARNINGS_LEVEL = "none"
const DEFAULT_SOFTWARE = "ARDUINO"

type Builder struct{}

Expand Down
4 changes: 0 additions & 4 deletions legacy/builder/setup_build_properties.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ func (s *SetupBuildProperties) Run(ctx *types.Context) error {
}
ctx.OptimizationFlags = buildProperties.Get("compiler.optimization_flags")

if !buildProperties.ContainsKey("software") {
buildProperties.Set("software", DEFAULT_SOFTWARE)
}

buildProperties.SetPath("build.source.path", ctx.Sketch.FullPath)

buildProperties.Merge(ctx.PackageManager.GetCustomGlobalProperties())
Expand Down