Repository: spack/spack

Issue:
Doxygen does not build with flex v2.6.2
See https://github.com/westes/flex/issues/113 . Is it possible to blacklist this version of flex?


Discussion:
maybe add `preferred=True` to the version which is known to build? Or to specify this in doxygen requirements.
Apparently Scotch also doesn't work with flex 2.6.2. @svenevs, https://github.com/westes/flex/issues/113 explains why you ran into the problem discussed in #2521. I think the appropriate solution here is to specify that doxygen `depends_on('flex@:2.6.1')`, as was done in #2523. `preferred=True` should be used lightly, as it can confuse a lot of new developers who are always expecting the latest version to install. It makes sense for Python, since most people are still running Python 2, and it kind of made sense during the HDF5/NetCDF incompatibility phase, but I'm not sure if it makes sense here. Maybe others can weigh in.
Yes, the listed issue was something I discovered later but forgot to update.  I think the more appropriate action, given that it is advertised as breaking that many things, but has also already [been fixed](https://github.com/westes/flex/commit/347652c32b4614995acd4ee0d686499da2070d9e), would be to blacklist 2.6.2.  There's a way to mark things as 'unstable' right?

Then ideally flex 2.6.3 will be released and add that as the latest stable (potentially even flat out ignoring 2.6.2)?
Hmm, I guess if the developers themselves recommend against using `2.6.2` for compatibility reasons, then maybe we should use `preferred=True` on `2.6.1`. There isn't really a way to blacklist, aside from commenting out the version directive. Should we remove `2.6.2` altogether? I think I was the one who added it, and I only added it because I saw a new version was available.
I vote for "blacklisting" 2.6.2 by commenting it out, and adding a short comment (with URL link) in the `package.py` explaining the problem.

We don't currently have an attribute for blacklisting a version, but `2.6.2` seems like a real disaster.  I like @citibeth's idea.  If people really want it they can uncomment it. 
same here, we should just comment it out and add a short comment say that it breaks a lot of things.
I'm adding the `ready` flag to indicate that discussion is about done, and this Issue is ready for a PR.

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/flex/package.py b/var/spack/repos/builtin/packages/flex/package.py
--- a/var/spack/repos/builtin/packages/flex/package.py
+++ b/var/spack/repos/builtin/packages/flex/package.py
@@ -29,9 +29,11 @@ class Flex(AutotoolsPackage):
     """Flex is a tool for generating scanners."""
 
     homepage = "https://github.com/westes/flex"
-    url = "https://github.com/westes/flex/releases/download/v2.6.2/flex-2.6.2.tar.gz"
+    url = "https://github.com/westes/flex/releases/download/v2.6.1/flex-2.6.1.tar.gz"
 
-    version('2.6.2', 'cc6d76c333db7653d5caf423a3335239')
+    # Problematic version:
+    # See issue #2554; https://github.com/westes/flex/issues/113
+    # version('2.6.2', 'cc6d76c333db7653d5caf423a3335239')
     version('2.6.1', '05bcd8fb629e0ae130311e8a6106fa82')
     version('2.6.0', '760be2ee9433e822b6eb65318311c19d')
     version('2.5.39', '5865e76ac69c05699f476515592750d7')


Test patch: