Skip to content

Commit

Permalink
Fixed fiddle exception and local __THIS__
Browse files Browse the repository at this point in the history
  • Loading branch information
aschaal committed Sep 7, 2020
1 parent 665d697 commit 79b494a
Show file tree
Hide file tree
Showing 13 changed files with 55 additions and 10 deletions.
4 changes: 4 additions & 0 deletions documentation/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Changelog
=========

September 7, 2020 - bake-toolkit 2.65.1
* Bugfix: __THIS__ in Project.meta was resolved to main project name, not local project name
* Bugfix: Fixed an exception with old Ruby versions where "fiddle" is not available

August 26, 2020 - bake-toolkit 2.65.0
* Bugfix: Dependency to gem thwait 0.1.0 instead of latest version (they messed it up, latest gem might abort the builds on some systems)
* Bugfix: Skip CompilationCheck on dry run
Expand Down
2 changes: 1 addition & 1 deletion documentation/index.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
bake 2.65.0
bake 2.65.1
==========================================
bake, building software **fast** and **easy**!

Expand Down
5 changes: 5 additions & 0 deletions install-docs/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@
<div class="section" id="changelog">
<h1>Changelog<a class="headerlink" href="#changelog" title="Permalink to this headline"></a></h1>
<dl>
<dt>September 7, 2020 - bake-toolkit 2.65.1</dt><dd><ul class="simple">
<li><p>Bugfix: __THIS__ in Project.meta was resolved to main project name, not local project name</p></li>
<li><p>Bugfix: Fixed an exception with old Ruby versions where “fiddle” is not available</p></li>
</ul>
</dd>
<dt>August 26, 2020 - bake-toolkit 2.65.0</dt><dd><ul class="simple">
<li><p>Bugfix: Dependency to gem thwait 0.1.0 instead of latest version (they messed it up, latest gem might abort the builds on some systems)</p></li>
<li><p>Bugfix: Skip CompilationCheck on dry run</p></li>
Expand Down
8 changes: 4 additions & 4 deletions install-docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>bake 2.65.0 &#8212; bake documentation</title>
<title>bake 2.65.1 &#8212; bake documentation</title>
<link rel="stylesheet" href="_static/bootstrap-sphinx.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="_static/custom.css" />
Expand Down Expand Up @@ -83,7 +83,7 @@
<ul class="dropdown-menu localtoc"
role="menu"
aria-labelledby="dLabelLocalToc"><ul>
<li><a class="reference internal" href="#">bake 2.65.0</a><ul>
<li><a class="reference internal" href="#">bake 2.65.1</a><ul>
</ul>
</li>
</ul>
Expand Down Expand Up @@ -115,8 +115,8 @@
<div class="row">
<div class="body col-md-12 content" role="main">

<div class="section" id="bake-2-65-0">
<h1>bake 2.65.0<a class="headerlink" href="#bake-2-65-0" title="Permalink to this headline"></a></h1>
<div class="section" id="bake-2-65-1">
<h1>bake 2.65.1<a class="headerlink" href="#bake-2-65-1" title="Permalink to this headline"></a></h1>
<p>bake, building software <strong>fast</strong> and <strong>easy</strong>!</p>
<table class="docutils align-default">
<colgroup>
Expand Down
Binary file modified install-docs/objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion install-docs/searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/bake/config/loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def loadProjMeta(filename)
if adaptRoots.length > 0
adaptRoots.each do |adapt|
Bake::Config::checkVer(adapt.requiredBakeVersion)
adapt.mainProject = @mainProjectName if adapt.mainProject == "__THIS__"
adapt.mainProject = proj.name if adapt.mainProject == "__THIS__"
adaptConfigs = adapt.getConfig
AdaptConfig.checkSyntax(adaptConfigs, filename, true)
adaptConfigs.each do |ac|
Expand Down
2 changes: 1 addition & 1 deletion lib/blocks/compile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def realname file
x = longname(shortname(file))
end

rescue Fiddle::DLError
rescue Exception

def realname file
file
Expand Down
2 changes: 1 addition & 1 deletion lib/common/version.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Bake
class Version
def self.number
"2.65.0"
"2.65.1"
end

def self.printBakeVersion(ry = "")
Expand Down
2 changes: 1 addition & 1 deletion rake_helper/spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def at_exit(&block)
rescue LoadError
end

SPEC_PATTERN ='spec/**/*_spec.rb'
SPEC_PATTERN ='spec/**/local_adapt_spec.rb'

puts "Creating dummy libs"
`gcc -r -c rake_helper/dummy.c -o rake_helper/dummy.a`
Expand Down
13 changes: 13 additions & 0 deletions spec/local_adapt_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,19 @@ module Bake
expect($mystring.include?("ADAPT_09")).to be == false
end

it '__THIS__ applies to local project' do
Bake.startBake("localAdapt/main3", ["test"])
expect($mystring.include?("start this test")).to be == true
expect($mystring.include?("hello main3")).to be == true
expect($mystring.include?("hello main4")).to be == true
end

it '__THIS__ does not apply to main project' do
Bake.startBake("localAdapt/main4", ["test"])
expect($mystring.include?("start this test")).to be == false
expect($mystring.include?("hello main3")).to be == true
expect($mystring.include?("hello main4")).to be == true
end

end

Expand Down
16 changes: 16 additions & 0 deletions spec/testdata/localAdapt/main3/Project.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Project default: test {
CustomConfig test {
Dependency main4
DefaultToolchain GCC
CommandLine "echo hello main3", echo: off
}
}

If mainProject: __THIS__ {
CustomConfig test, type: extend {
StartupSteps {
CommandLine "echo start this test", echo: off
}
}

}
7 changes: 7 additions & 0 deletions spec/testdata/localAdapt/main4/Project.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Project default: test {
CustomConfig test {
Dependency main3
DefaultToolchain GCC
CommandLine "echo hello main4", echo: off
}
}

0 comments on commit 79b494a

Please sign in to comment.