
{"id":1183,"date":"2013-01-10T15:35:14","date_gmt":"2013-01-10T20:35:14","guid":{"rendered":"http:\/\/www.ikriv.com\/blog\/?p=1183"},"modified":"2013-01-10T15:35:14","modified_gmt":"2013-01-10T20:35:14","slug":"nant-does-null-really-exist","status":"publish","type":"post","link":"https:\/\/ikriv.com\/blog\/?p=1183","title":{"rendered":"NAnt: Does null really exist?"},"content":{"rendered":"<p>Stumbled upon an interesting situation in NAnt, which may inspire some philosophical thought on what &#8220;to exist&#8221; really means.<\/p>\n<p>We run a NAnt build script from our program and set its properties manually. Due to a bug in our code, certain property <code>foo<\/code> is set to null:<\/p>\n<pre><code>var project = new NAnt.Core.Project(...);\nproject.Properties.Add(\"foo\", null);<\/code><\/pre>\n<p>The end result is quite spectacular: <code>property::exists('foo')<\/code> returns <code>true<\/code>, but attempt to access <code>${foo}<\/code> fails, claiming that the property has not been set.<\/p>\n<p>On a deep philsophical level it kinda makes sense, but it defeated our required property checker, that foolishily assumed that if a property exists, its value can be retrieved.<\/p>\n<p>P.S. This might as well have been fixed in the latest NAnt, we are using version 0.90. On second thought, when I am out of the current crunch, I may try it with the latest version, create a repro case, and report a bug.<a style=\"display:none\" href=\"http:\/\/www.codeproject.com\/script\/Articles\/BlogFeedList.aspx?amid=1181663\" rel=\"tag\">CodeProject<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Stumbled upon an interesting situation in NAnt, which may inspire some philosophical thought on what &#8220;to exist&#8221; really means. We run a NAnt build script from our program and set <a href=\"https:\/\/ikriv.com\/blog\/?p=1183\" class=\"more-link\">[&hellip;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"Layout":"","footnotes":""},"categories":[4],"tags":[],"class_list":["entry","author-ikriv","post-1183","post","type-post","status-publish","format-standard","category-hack"],"_links":{"self":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1183","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1183"}],"version-history":[{"count":0,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1183\/revisions"}],"wp:attachment":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1183"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1183"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1183"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}