1. 29 Jul, 2020 4 commits
  2. 28 Jul, 2020 11 commits
    • Nils Goroll's avatar
      vtest: git-clean the tree · b41d4bea
      Nils Goroll authored
      Some mistake in the previous commits has left vtest maschine's tree in
      an unclean state with bad symlinks.
      
      Try to avoid such issues in the future.
      b41d4bea
    • Nils Goroll's avatar
      Full abort on the sphinx links mess · 3f2be2ce
      Nils Goroll authored
      Either I need to come up with a better idea or leave this with someone
      else.
      
      This reverts commit 37215599.
      This reverts commit 2754e02e.
      This reverts commit d7d31e47.
      This reverts commit 803b9a0c.
      3f2be2ce
    • Nils Goroll's avatar
      fix a stupid mistake which I overlooked · 37215599
      Nils Goroll authored
      ... trying to understand the reason for failing builds.
      
      Apologies!
      37215599
    • Nils Goroll's avatar
      be more specific about files we need to copy from `$(srcdir)` · 2754e02e
      Nils Goroll authored
      in particular, do not copy files which we are about to generate
      
      (side note: If I had not before, now I really detest this...
       all I really want is working VTEST builds, there should be a better
       way)
      2754e02e
    • Nils Goroll's avatar
      more sphinx build fiddling · d7d31e47
      Nils Goroll authored
      In the previous commit, I argued that adding the link job to
      `BUILT_SOURCES` was the better option than adding it to the `all`
      target, but I overlooked the fact that also the `BUILT_SOURCES` are
      built in parallel (only before all other targets). Thus, we still need
      an explicit dependency on the link job.
      d7d31e47
    • Nils Goroll's avatar
      use a real target for the `$(srcdir)` to `$(builddir)` links for sphinx · 803b9a0c
      Nils Goroll authored
      The phony target was executed unconditionally and would thus race.
      
      A real target (using `index.rst`) does not race and has the additional
      advantage of simplifying the code (avoiding a condition in the shell
      code).
      
      It seems (at least GNU) `make` outsmarts the attempt to use a file from
      `$(srcdir)` as a marker for the link to have succeeded when
      `$(builddir)/index.rst` is used as the target.
      Using `$(abs_builddir)` seems to dtrt.
      
      Largely unrelated to this issue: The links are required for targets in
      `BUILT_SOURCES`, so previously I added a dependency to the `all` target.
      Having the link target in `BUILD_SOURCES` seems to be the better option.
      
      Fixes #3370 (I hope)
      803b9a0c
    • Geoff Simmons's avatar
      Start skeleton release notes for the next version. · 1c3b7841
      Geoff Simmons authored
      Restructured so that:
      
      * 'Upgrading' is limited to work that has to be done to upgrade from
        a current deployment to the new version.
      
      * 'Changes' is a comprehensive, user-level description of changes and
        new features.
      
      Conflicts:
      	doc/sphinx/whats-new/index.rst
      1c3b7841
    • Dridi Boukelmoune's avatar
      doc: It is now possible to name PRIV_ arguments · 81a7e851
      Dridi Boukelmoune authored
      Contrary to what the documentation stated, PRIV_ arguments aren't
      unnamed by nature with the current vmodtool script. Both the generated
      struct and JSON descriptor would account for named PRIV_ arguments and
      the only limitation was in libvcc.
      
      It was really a bug in the sense that vmodtool would generate C code
      incompatible with the code generated by libvcc. It was simpler to fix
      libvcc and allow VMOD authors to give meaningful names to PRIVs if they
      happen to use them in conjunction with [optional arguments].
      
      Refs 82491c2a
      81a7e851
    • Nils Goroll's avatar
      more include shuffling for vsig.h · 6d4df363
      Nils Goroll authored
      6d4df363
    • Nils Goroll's avatar
      polish previous commit · 2d4da769
      Nils Goroll authored
      - remove a duplicate sys/wait.h include
      - remove a stray vapi/voptget.h include
      - move include in vsig.h to the right place
      2d4da769
    • David Carlier's avatar
      Haiku build fix · 7e144bde
      David Carlier authored
      Mainly WCOREDUMP is undefine but WIFCORED has similar semantic.
      7e144bde
  3. 27 Jul, 2020 2 commits
  4. 25 Jul, 2020 1 commit
  5. 24 Jul, 2020 2 commits
  6. 20 Jul, 2020 1 commit
  7. 17 Jul, 2020 1 commit
  8. 13 Jul, 2020 6 commits
  9. 06 Jul, 2020 2 commits
    • Nils Goroll's avatar
      Loosen assertion on ctx->(req|bo), fix shard and vcl_pipe · 3dc2baed
      Nils Goroll authored
      in VRT_priv_task() we asserted that only one of ctx->req and ctx->bo is
      set when not in vcl_pipe {}, but we also need to extend that assertion
      to when ctx->method == 0 after vcl_pipe as finished because
      VRT_priv_task() could be called from director resolution.
      
      Being at it, I also noticed that our behavior in vcl_pipe {} is
      inconsistent as, from the shard director perspective, it is a backend
      method. So now, vcl_pipe {} is handled like vcl_backend_* {}.
      
      We still need to make up our mind about #3329 / #3330 and depending on
      the outcome we might need to touch some places again which were changed
      in this commit.
      
      Fixes #3361
      3dc2baed
    • Nils Goroll's avatar
  10. 02 Jul, 2020 10 commits
    • Dridi Boukelmoune's avatar
      Clean up VMOD symbol registration code · 9426f4a4
      Dridi Boukelmoune authored
      The temporary code that accumulated in order to implement generic type
      methods is now a bit more tidy.
      9426f4a4
    • Dridi Boukelmoune's avatar
      edee8c62
    • Dridi Boukelmoune's avatar
      Find VMOD objects methods via their typed symbols · 417bf145
      Dridi Boukelmoune authored
      VMODs can now use the same facility as native types to find methods
      based on the type of the instance instead of the instance itself.
      
      Because SYM_METHOD symbols are tied to a type instead of an instance
      we lose that "extra" argument. To circumvent this, an expression will
      keep track of the instance before evaluating a method.
      
      With this, VCL expression evaluation is no longer aware of methods
      implementation details, and feeds entirely from the symbol table.
      417bf145
    • Dridi Boukelmoune's avatar
      7cd19157
    • Dridi Boukelmoune's avatar
      Add VMOD object methods to the symbol table · 787a505a
      Dridi Boukelmoune authored
      Although at this point we are still using the per-instance symbols from
      the table.
      
      For example with the following:
      
          new fb1 = directors.fallback();
          new fb2 = directors.fallback();
      
      We will get the following entries in the symbol table:
      
          object    directors.fallback  41 41 directors.fallback
          method    VOID                40 41 directors.fallback.add_backend
          method    BACKEND             40 41 directors.fallback.backend
          method    VOID                40 41 directors.fallback.remove_backend
          instance  INSTANCE            41 41 fb1
          func      VOID                40 41 fb1.add_backend
          func      BACKEND             40 41 fb1.backend
          func      VOID                40 41 fb1.remove_backend
          instance  INSTANCE            41 41 fb2
          func      VOID                40 41 fb2.add_backend
          func      BACKEND             40 41 fb2.backend
          func      VOID                40 41 fb2.remove_backend
      
      As long as the func symbols exist, and the instance symbols have the
      generic type INSTANCE, the expression parser will not try to evaluate
      the method symbols.
      
      But the type-based symbols aren't ready to be evaluated yet so we can
      have peaceful cohabitation for now. This makes this part of the code
      even more complicated but it will eventually straighten up once the
      SYM_FUNC symbols are gone.
      787a505a
    • Dridi Boukelmoune's avatar
      Create types for VMOD objects · b437976d
      Dridi Boukelmoune authored
      Now they appear as ${vmod}.${constructor} instead of VOID in the symbol
      table. The effective type is based on the VMOD's name, regardless of
      whether it was imported with an alias or not.
      b437976d
    • Dridi Boukelmoune's avatar
      Bury the knowledge of type methods in type code · e673718d
      Dridi Boukelmoune authored
      This enables the possibility for other kinds of SYM_METHOD symbols with
      different parsing rules.
      e673718d
    • Dridi Boukelmoune's avatar
      Parse .method() expressions via the symbol table · 2fb26ab7
      Dridi Boukelmoune authored
      Technically the lookup is TYPE.METHOD so it's not as simple as calling
      VCC_SymbolGet() with the correct namespace.
      2fb26ab7
    • Dridi Boukelmoune's avatar
      Register types and type methods as symbols · a82916ea
      Dridi Boukelmoune authored
      The SYM_METHOD kind of symbol was already present but never used so it
      just found its purpose.
      
      They appear in their dedicated symbol table:
      
          /*
           * Symbol Table MAIN
           *
           * reserved  VOID       41 41 acl
           * reserved  VOID       41 41 backend
           * [...]
           */
      
          /*
           * Symbol Table TYPE
           *
           * none      VOID     40 41 BACKEND
           * method    BACKEND  40 41 BACKEND.resolve
           * none      VOID     40 41 STEVEDORE
           * method    BYTES    40 41 STEVEDORE.free_space
           * method    BOOL     40 41 STEVEDORE.happy
           * method    BYTES    40 41 STEVEDORE.used_space
           * none      VOID     40 41 STRINGS
           * method    STRING   40 41 STRINGS.lower
           * method    STRING   40 41 STRINGS.upper
           */
      
      Unlike VMOD functions or object methods, native type methods are never
      invoked as a standalone statement:
      
          strings.upper();
      
      They are only evaluated atop an expression:
      
          (string expression).upper();
      
      So any VMOD named after a type, like vmod_blob, should not conflict with
      native type methods in the symbol table. Unless a symbol already exists
      in the MAIN namespace, like reserved keywords acl and backend.
      a82916ea
    • Dridi Boukelmoune's avatar
      Split the monolithic VCL symbol table · 6c5d9ae0
      Dridi Boukelmoune authored
      This introduces two namespaces MAIN and TYPE to allow top-level symbol
      collisions for type methods.
      
      For example, `backend` is a reserved keyword but `backend.resolve` is a
      type method. It is impossible to declare such a method symbol because it
      would require its parent `backend` symbol to be a type symbol.
      
      There would be a conflict between two `backend` symbols of different
      kinds. The same would apply if the BLOB type had methods and vmod_blob
      was imported.
      
      At this point only the MAIN namespace is used but the split enables the
      symbolization of types and type methods down the line.
      6c5d9ae0