1. 07 Jan, 2021 1 commit
  2. 04 Jan, 2021 1 commit
  3. 03 Jan, 2021 3 commits
  4. 16 Dec, 2020 4 commits
  5. 15 Dec, 2020 1 commit
  6. 11 Dec, 2020 6 commits
  7. 10 Dec, 2020 2 commits
    • Paul Hummer's avatar
      refactor: clean up flux test runner (#3390) · 8115824f
      Paul Hummer authored
      This patch refactors the new flux test runner to use structs to form a
      cleaner organization and architecture for expansion into downstream
      consumers. The intention is to layout out pieces that should be
      composable. As such, the `TestRunner` and `TestReporter` are new in this
      patch, though not in any sort of final form.
      
      Additionally, cli arguments for the basic needs of the test runner were
      introduced in this patch.
      8115824f
    • Paul Hummer's avatar
      feat: add a pure flux test runner (#3388) · 0afe8d3f
      Paul Hummer authored
      * feat: add a pure flux test runner
      
      This patch adds the first pass at a pure flux test runner using the new
      `testcase` statement. It ports the existing strings tests to `testcase`
      tests to demonstrate the differences between the tests. The new tests
      can be invoked with `go run ./cmd/flux test`.
      
      Additionally, as the `TestCaseStatement` won't survive semantic checks,
      the generation of existing tests must ignore the new-style `testcase`
      tests entirely.
      
      There are still a number of rough edges to be worked out, namely:
      
        - Lack of good output in the case of failures. Currently, the
      expectation is that if a result is returned at all, it's the result of
      `testing.diff`, and should be treated as a failure, but that result uses
      `table.Stringify`. The test output in general could use some work.
        - Command line arguments to `flux test` are missing entirely, but
      should be added for pathing and verbosity at the very least. It's likely
      that, as other downstream projects implement their own runner, new flags
      will be needed.
      
      Fixes #3298
      
      * fix: fix issue where compilation fails
      
      * chore: address code review comments
      
      * chore: update generated files
      
      * chore: update doc comments
      
      * chore: minor nit
      0afe8d3f
  8. 07 Dec, 2020 4 commits
    • Jonathan A. Sternberg's avatar
      fix(compiler): do not allow containers within a record to be null (#3384) · 84bf2ff8
      Jonathan A. Sternberg authored
      When we retrieve a missing parameter from a record, we should not allow
      it to return a null value if we know we are supposed to be returning one
      of the container types (array, record, or dict). Those three are not
      nullable so it is not valid for null to be returned. Instead, an error
      is returned instead.
      84bf2ff8
    • Faith Chikwekwe's avatar
      test: benchmark rust scanner (#3344) · 7929aed5
      Faith Chikwekwe authored
      
      
      * test: benchmark rust scanner
      
      * feat: added ragel 7 to the Dockerfiles
      
      Installing colm and ragel 7 to /usr/local/ragel7 and putting the bindir on the
      path after /usr/local/bin. This hides the ragel version 7 binary, but we only
      need the ragel-rust binary.
      
      * fix: add deleted imports
      Co-authored-by: default avatarAdrian Thurston <thurston@colm.net>
      7929aed5
    • Jonathan A. Sternberg's avatar
      fix(lang): retrieve now option before running the flux script (#3377) · 7c9214e5
      Jonathan A. Sternberg authored
      This changes the `AstProgram` to retrieve the now option before it runs
      the flux script. The reason is because the now option is placed into the
      scope before the script is executed, but it can be reassigned to a
      different value during execution. When we tried to retrieve the option
      afterwards, it resulted in selecting the local now instead of the one
      from the universe package.
      
      We now retrieve the option ahead of time. If the option is redefined
      with `option`, then the retrieved option will be modified in a mutable
      way that we can access anyway and it avoids accidentally using a similar
      variable with the same name.
      7c9214e5
    • 0xflotus's avatar
      fix: misspellings in the readme (#3380) · 741c5ee3
      0xflotus authored
      741c5ee3
  9. 04 Dec, 2020 2 commits
    • Paul Hummer's avatar
      feat: transform testcase ast into pure flux (#3373) · c40321a5
      Paul Hummer authored
      * feat: transform testcase ast into pure flux
      
      This patch takes ast that contains `testcase` statements and
      transforms them into multiple pure flux scripts.
      
      Additionally, there was some flatbuffer work that was missing from the
      work in #3352 that needed to be updated to support the roundtrip from go
      to rust to go again.
      
      Fixes #3333
      c40321a5
    • Jonathan A. Sternberg's avatar
      fix(stdlib/strings): substring method now works on more indices (#3375) · f555576e
      Jonathan A. Sternberg authored
      The substring method in the strings package now works properly when the
      start or end index isn't within the bounds of the existing string. It
      truncates these indices to be the start or end of the string. This
      reduces the need to check the length of the string to get a substring of
      a certain size and makes it work more similar to how the javascript
      substring operates.
      
      This also fixes the case where both the start and the end index are
      zero. This was erroneously creating a string of 1 character when it
      should have been zero.
      f555576e
  10. 03 Dec, 2020 1 commit
    • Adrian Thurston's avatar
      feat: added rust scanner (#3362) · baff926f
      Adrian Thurston authored
      * feat: ported the scanner to rust
      
      To build the rust scanner you need ragel 7.0.1 installed. Consult
      Dockerfile_build for instructions on how to install this.
      
      * feat: preparing to add the rust scanner as a separate module
      
      Both scanners can exist simultaneously for some time and it should be an easy
      fix if we need to revert.
      
      * feat: use the rust scanner, can switch back by changing the scanner struct
      
      * fix: moved the rust-scanner to the new loction in core/src
      
      After rebasing on master the file names need to update.
      
      * fix: moved all of the rust scanner to a sub-module
      
      Using the rust scanner instead of c is now just a matter of referecing
      rust::Scanner instead of Scanner.
      
      * fix: don't need to clone the token defs, can include scanner::**
      
      Also renamed scan2() -> scan() and included rust scanner in generated targets.
      
      * chore: call the original scanner
      
      Reverting to disabling the rust scanner. To enable it simply use
      scanner::rust::Scanner from the parser instead of scanner::Scanner.
      
      * fix: added some explanation around errors if ragel-7 install is wrong
      
      * fix: added the generated rust scanner code and removed dependency from Makefile
      
      Adding the generated code and removing the dependency from the Makefile will
      make it such that the rust library can be compiled, but users won't yet need
      ragel 7 installed.
      
      * fix: don't check fmt/clippy of the generated rust scanner
      baff926f
  11. 02 Dec, 2020 1 commit
  12. 01 Dec, 2020 1 commit
    • Paul Hummer's avatar
      revert: re-enable sccache in ci (#3369) · c2a9e090
      Paul Hummer authored
      After the change in #3366, the docker container now has a working
      `sccache` with rust 1.48. This patch reverts the patch that disabled
      `sccache` so that we were unblocked.
      
      Fixes #3357
      c2a9e090
  13. 30 Nov, 2020 3 commits
  14. 26 Nov, 2020 1 commit
  15. 25 Nov, 2020 2 commits
  16. 24 Nov, 2020 2 commits
    • Paul Hummer's avatar
      chore: adjust libflux workspace to be idiomatic (#3353) · 92102aa2
      Paul Hummer authored
      _Obligatory: apologies for using the term "idiomatic" here; I couldn't
      find a better word._
      
      When working with a rust workspace, it is usually in the context of
      multiple connected crates. Our use of multiple crates is needed and
      makes sense. However, the crates aren't laid out the way a normal crate
      would be laid out, and the `src` in the workspace is usually not there.
      This patch simplifies the rust workspace layout, removes some overrides
      in various `Cargo.toml` files, and fixes the build accordingly.
      
      Fixes #2342
      92102aa2
    • Paul Hummer's avatar
      chore: add support for rust 1.48 (#3356) · 0d9d585f
      Paul Hummer authored
      Rust 1.48 was released a few days ago. This patch adds the fixes that
      will get flux passing in CI again. The following things needed
      addressed:
      
        - There is a new lint introduced that checks for `push_str` on a
      single char `str`, and recommends using `push` instead.
        - There is an open issue with `sccache` and rust 1.48. As a result,
      `sccache` is desabled for now. See https://github.com/mozilla/sccache/issues/887
      0d9d585f
  17. 23 Nov, 2020 1 commit
  18. 18 Nov, 2020 2 commits
  19. 10 Nov, 2020 2 commits