Merge pull request #94 from aiuto/ver

Update version stamp to 0.0.5
diff --git a/docs/latest.md b/docs/latest.md
index 58dc1c6..2005be2 100755
--- a/docs/latest.md
+++ b/docs/latest.md
@@ -9,7 +9,7 @@
 ## license
 
 <pre>
-license(<a href="#license-name">name</a>, <a href="#license-copyright_notice">copyright_notice</a>, <a href="#license-license_kinds">license_kinds</a>, <a href="#license-license_text">license_text</a>, <a href="#license-namespace">namespace</a>, <a href="#license-package_name">package_name</a>, <a href="#license-package_url">package_url</a>,
+license(<a href="#license-name">name</a>, <a href="#license-copyright_notice">copyright_notice</a>, <a href="#license-license_kinds">license_kinds</a>, <a href="#license-license_text">license_text</a>, <a href="#license-package_name">package_name</a>, <a href="#license-package_url">package_url</a>,
          <a href="#license-package_version">package_version</a>)
 </pre>
 
@@ -24,7 +24,6 @@
 | <a id="license-copyright_notice"></a>copyright_notice |  Copyright notice.   | String | optional | <code>""</code> |
 | <a id="license-license_kinds"></a>license_kinds |  License kind(s) of this license. If multiple license kinds are listed in the LICENSE file, and they all apply, then all should be listed here. If the user can choose a single one of many, then only list one here.   | <a href="https://bazel.build/concepts/labels">List of labels</a> | optional | <code>[]</code> |
 | <a id="license-license_text"></a>license_text |  The license file.   | <a href="https://bazel.build/concepts/labels">Label</a> | optional | <code>LICENSE</code> |
-| <a id="license-namespace"></a>namespace |  A human readable name used to organize licenses into categories. This is used in google3 to differentiate third party licenses used for compliance versus internal licenses used by SLAsan for internal teams' SLAs.   | String | optional | <code>""</code> |
 | <a id="license-package_name"></a>package_name |  A human readable name identifying this package. This may be used to produce an index of OSS packages used by an applicatation.   | String | optional | <code>""</code> |
 | <a id="license-package_url"></a>package_url |  The URL this instance of the package was download from. This may be used to produce an index of OSS packages used by an applicatation.   | String | optional | <code>""</code> |
 | <a id="license-package_version"></a>package_version |  A human readable version string identifying this package. This may be used to produce an index of OSS packages used by an applicatation.  It should be a value that increases over time, rather than a commit hash.   | String | optional | <code>""</code> |
@@ -98,7 +97,7 @@
 ## LicenseInfo
 
 <pre>
-LicenseInfo(<a href="#LicenseInfo-copyright_notice">copyright_notice</a>, <a href="#LicenseInfo-label">label</a>, <a href="#LicenseInfo-license_kinds">license_kinds</a>, <a href="#LicenseInfo-license_text">license_text</a>, <a href="#LicenseInfo-namespace">namespace</a>, <a href="#LicenseInfo-package_name">package_name</a>,
+LicenseInfo(<a href="#LicenseInfo-copyright_notice">copyright_notice</a>, <a href="#LicenseInfo-label">label</a>, <a href="#LicenseInfo-license_kinds">license_kinds</a>, <a href="#LicenseInfo-license_text">license_text</a>, <a href="#LicenseInfo-package_name">package_name</a>,
             <a href="#LicenseInfo-package_url">package_url</a>, <a href="#LicenseInfo-package_version">package_version</a>)
 </pre>
 
@@ -113,7 +112,6 @@
 | <a id="LicenseInfo-label"></a>label |  Label: label of the license rule    |
 | <a id="LicenseInfo-license_kinds"></a>license_kinds |  list(LicenseKindInfo): License kinds    |
 | <a id="LicenseInfo-license_text"></a>license_text |  string: The license file path    |
-| <a id="LicenseInfo-namespace"></a>namespace |  string: namespace of the license rule    |
 | <a id="LicenseInfo-package_name"></a>package_name |  string: Human readable package name    |
 | <a id="LicenseInfo-package_url"></a>package_url |  URL from which this package was downloaded.    |
 | <a id="LicenseInfo-package_version"></a>package_version |  Human readable version string    |
diff --git a/rules/gather_licenses_info.bzl b/rules/gather_licenses_info.bzl
index 4b0ad56..19e3e48 100644
--- a/rules/gather_licenses_info.bzl
+++ b/rules/gather_licenses_info.bzl
@@ -229,9 +229,13 @@
     for license in sorted(licenses_info.licenses.to_list(), key = lambda x: x.label):
         kinds = []
         for kind in sorted(license.license_kinds, key = lambda x: x.name):
+            if hasattr(kind, "long_name"):
+                long_name = kind.long_name
+            else:
+                long_name = ""
             kinds.append(kind_template.format(
                 kind_name = kind.name,
-                kind_long_name = kind.long_name if kind.long_name else "",
+                kind_long_name = long_name,
                 kind_path = kind.label,
                 kind_conditions = kind.conditions,
             ))
@@ -249,7 +253,7 @@
                 label = _strip_null_repo(license.label),
                 used_by = ",\n          ".join(sorted(['"%s"' % x for x in used_by[str(license.label)]])),
             ))
-            # Additionally retrun all File references so that other rules invoking
+            # Additionally return all File references so that other rules invoking
             # this method can load license text file contents from external repos
             # using runfiles
             all_license_text_files.append(license.license_text)
diff --git a/rules/license.bzl b/rules/license.bzl
index 032599d..a5c0379 100644
--- a/rules/license.bzl
+++ b/rules/license.bzl
@@ -69,12 +69,6 @@
                   " by an applicatation.  It should be a value that" +
                   " increases over time, rather than a commit hash."
         ),
-        "namespace": attr.string(
-            doc = "A human readable name used to organize licenses into categories." +
-                  " This is used in google3 to differentiate third party licenses used" +
-                  " for compliance versus internal licenses used by SLAsan for internal" +
-                  " teams' SLAs.",
-        ),
     },
 )
 
@@ -88,7 +82,7 @@
         package_name = None,
         package_url = None,
         package_version = None,
-        namespace = "compliance",
+        namespace = None,
         tags = [],
         visibility = ["//visibility:public"]):
     """Wrapper for license rule.
@@ -107,7 +101,6 @@
                     an application.
       package_url: str The canonical URL this package was downloaded from.
       package_version: str The version corresponding the the URL.
-      namespace: str Undocumened. Internal.
       tags: list(str) tags applied to the rule
       visibility: list(label) visibility spec.
     """
@@ -123,6 +116,11 @@
         if len(srcs) != 1 or srcs[0] != license_text:
             fail("Specified license file doesn't exist: %s" % license_text)
 
+    # TODO(0.0.6 release): Remove this warning and fail hard instead.
+    if namespace:
+        # buildifier: disable=print
+        print("license(namespace=<str>) is deprecated.")
+
     _license(
         name = name,
         license_kinds = license_kinds,
@@ -131,7 +129,6 @@
         package_name = package_name,
         package_url = package_url,
         package_version = package_version,
-        namespace = namespace,
         applicable_licenses = [],
         visibility = visibility,
         tags = tags,
diff --git a/rules/license_impl.bzl b/rules/license_impl.bzl
index 03477c6..3aa13de 100644
--- a/rules/license_impl.bzl
+++ b/rules/license_impl.bzl
@@ -41,7 +41,6 @@
         package_version = ctx.attr.package_version,
         license_text = ctx.file.license_text,
         label = ctx.label,
-        namespace = ctx.attr.namespace,
     )
     _debug(0, provider)
     return [provider]
diff --git a/rules/providers.bzl b/rules/providers.bzl
index 68c5c88..c9b4872 100644
--- a/rules/providers.bzl
+++ b/rules/providers.bzl
@@ -40,7 +40,6 @@
         "label": "Label: label of the license rule",
         "license_kinds": "list(LicenseKindInfo): License kinds ",
         "license_text": "string: The license file path",
-        "namespace": "string: namespace of the license rule",
         # TODO(aiuto): move to PackageInfo
         "package_name": "string: Human readable package name",
         "package_url": "URL from which this package was downloaded.",