Skip to content
Snippets Groups Projects
  1. Jul 01, 2024
  2. Jun 27, 2024
  3. Jun 19, 2024
  4. Jun 18, 2024
  5. Jun 13, 2024
    • Marc van der Wal's avatar
      Rewrite LOC RR encoding function; avoid use of ** · 754a6424
      Marc van der Wal authored
      The wire format for LOC resource records requires that some fields be
      converted into some kind of decimal floating-point representation
      allowing one decimal digit for the mantissa and one decimal digit for
      the exponent.
      
      The previous algorithm used the ** operator for raising 10 to an integer
      power. But this operator was only introduced in Elixir 1.13. This meant
      that IBDNS could not be compiled with older Elixir versions that we want
      to support.
      
      The new algorithm has the same iterative approach, but leverages Stream
      and Enum in order to generate a list of possible candidates, removing
      the illegal ones (i.e. whose mantissa is greater than 9) and keeping the
      first one that works. Too large values are still encoded as having a
      mantissa of 9 and an exponent of 10^9.
      
      Fixes #45.
      754a6424
    • Marc van der Wal's avatar
      Specify Elixir 1.17 explicitly, instead of “latest” · aa419c4a
      Marc van der Wal authored
      There is an issue with Elixir 1.17.0 which causes Dialyxir to
      erroneously report some code in IBDNS as having no local returns.
      The workaround is too cumbersome to implement; it is easier to just
      ignore the warnings for the time being.
      
      The issue is triggered when a “with” statement has an “else” clause that
      may raise an exception.
      
      See also: https://github.com/elixir-lang/elixir/issues/13656
      aa419c4a
    • Marc van der Wal's avatar
      Dialyzer: ignore spurious warnings · f7303a5f
      Marc van der Wal authored
      On Elixir 1.11.x, Dialyzer could generate spurious warnings in code
      generated by yecc. We can’t do much about it. Later versions of Elixir
      report no problems.
      f7303a5f
    • Marc van der Wal's avatar
      Require Elixir version 1.11 or up · 79d47822
      Marc van der Wal authored
      We need Elixir 1.10 in order to benefit from a feature in Mix’s
      release-building infrastructure called overlays; these are files that
      are copied as data files along with the BEAM binaries. We use this for
      shipping a default configuration file.
      
      And we need Elixir 1.11 for two reasons. Firstly, to benefit from more
      features in guards, such as the is_struct/2 guard, which tests whether a
      term is a struct of a certain type, and the ability to use the
      struct.member syntax in guards. Secondly, to be able to use
      ExUnit.Case.register_test/6, which deprecates the previous
      register_test/4 function.
      
      Those features lack in Elixir 1.9. As of now, I do not know whether it
      is worth spending the time to try to get IBDNS to work on Elixir 1.9 or
      1.10, but for having tried to have a go at fixing IBDNS for Elixir 1.10,
      it is probably going to be tedious. Besides, Elixir 1.11.0 was released
      about three years and a half ago, so we are by no means requiring a
      cutting-edge version of Elixir.
      79d47822
    • Marc van der Wal's avatar
      CI: test on multiple versions of Elixir · a7ae8c40
      Marc van der Wal authored
      a7ae8c40
    • Marc van der Wal's avatar
      CI: we need rebar3 as well · 40443ce1
      Marc van der Wal authored
      The base32 library now seems to require rebar3 for building, but it
      wasn’t installed appropriately in the CI environment. The remedy is to
      have it installed before attempting to compile the dependencies.
      40443ce1
    • Marc van der Wal's avatar
      CI: don’t cache PLTs for now · 5a6b82cf
      Marc van der Wal authored
      I’ve witnessed a case, presumably due to a recent new release of
      Erlang/OTP, where caching the PLT files caused problems. The speed gain
      of caching those files is debatable anyway, so let’s just keep things
      simple and only cache the dependencies, using mix.lock as the cache key.
      5a6b82cf
  6. May 02, 2024
  7. Apr 30, 2024
  8. Apr 29, 2024
    • Marc van der Wal's avatar
      IBDNS.Zone.FileLoader: overhaul error handling · 11a29325
      Marc van der Wal authored
      Make data structures describing errors happening at zone loading time
      more consistent. The idea is to always ensure that error tuples are
      three-tuples of {:error, where, what}.
      
      The parser code is also improved so that errors happening at
      post-processing time stop that post-processing immediately, instead of
      waiting until the file is done processing.
      11a29325
    • Marc van der Wal's avatar
      Refactor unit tests for $INCLUDE tests · cef10f4a
      Marc van der Wal authored
      Prepare test zones that contain $INCLUDE directives. The unit tests are
      only modified so that they read from the files instead of hard-coded
      strings.
      cef10f4a
    • Marc van der Wal's avatar
      IBDNS.Zone.FileParser: stricter checks for read/3 · aed8d4d2
      Marc van der Wal authored
      Clarify that the origin parameter in IBDNS.Zone.FileParser.read/3 must
      be an domain in absolute labels list form, be it in the documentation
      and in the spec.
      
      To enforce that restriction, also define a useful guard in IBDNS.Name
      and use it for IBDNS.Zone.FileParser.read/3 so that anything that is not
      an absolute labels list is rejected.
      aed8d4d2
    • Marc van der Wal's avatar
      Merge branch 'feature/grand-opening' into 'develop' · 3f651c41
      Marc van der Wal authored
      Relicense project as GPLv3
      
      See merge request !38
      3f651c41
    • Marc van der Wal's avatar
      Better source code documentation · d7708453
      Marc van der Wal authored
      Add or improve docstrings in various modules, types and functions, to
      make the source easier to follow for newcomers.
      
      Some functions have specs added to them. This improved the coverage and
      exhaustivity of Dialyzer reports and helped fix one bug.
      
      There are some other minor drive-by refactorings in this code, but they
      shouldn’t change anything functionally.
      d7708453
  9. Apr 25, 2024
    • Marc van der Wal's avatar
      Add “reuse lint” in CI · d2fe2c60
      Marc van der Wal authored
      Ensure compliance to the REUSE specification by adding another action in
      the testing stage of the continuous integration setup.
      d2fe2c60
    • Marc van der Wal's avatar
      State license in README.md · c21c2826
      Marc van der Wal authored
      After stating the license in a form that’s nice for machines, let’s
      state it in a more human-friendly and prominent way by editing
      README.md.
      c21c2826
    • Marc van der Wal's avatar
      Apply REUSE specification · 1281401b
      Marc van der Wal authored
      Mark all files in version control with the appropriate licensing
      information, according to <https://reuse.software>.
      
      All files are licensed under GPL-3.0-or-later, with some exceptions.
      There are two CSV files downloaded from IANA whose copyright information
      is set appropriately (CC0-1.0). Some trivial files are released under
      the CC0-1.0 license too.
      1281401b
  10. Apr 23, 2024
Loading