jdev - 2020-04-02


  1. Guus

    What is the purpose of `TRAVIS_TAG:-` on the first line below (characters 23 trough 34)? ``` $ export TRAVIS_TAG=${TRAVIS_TAG:-$(date +'%Y%m%d')-TRAVIS_BUILD_NUMBER_$TRAVIS_BUILD_NUMBER-$(git log --format=%h -1)} $ echo $TRAVIS_TAG 20200402-TRAVIS_BUILD_NUMBER_-c74cade ```

  2. Guus

    It doesn't seem to be included in the exported value?

  3. jonas’

    Guus, ${foo:-bar} defaults the expression to `bar` if `foo` is not defined

  4. jonas’

    the `-` is part of the syntax

  5. Guus

    ah!

  6. Guus

    then it seems this construct is a mismatched combination of copy/paste

  7. jonas’

    why?

  8. Guus

    TRAVIS_TAG is never defined.

  9. jonas’

    you sure?

  10. Guus

    well, it shouldn't.

  11. jonas’

    then I suggest not exporting a variable named like something the CI server could set ;)

  12. Guus

    or should it... hmm.. wI didn't _expect_ it 🙂

  13. lovetox

    if i get a disco info request to my full jid

  14. lovetox

    with a node that resembles entity caps

  15. lovetox

    should i check if the hash is my current hash

  16. lovetox

    and if not probably answer with an error or not?

  17. lovetox

    because 0115 does not mention anything about in what cases one should return an error

  18. lovetox

    and what error that would be

  19. flow

    lovetox, smack caches the last N caps and will return the information

  20. lovetox

    sound wrong to me

  21. flow

    but maybe I don't get the question. the answer seems trivial to me: if you can answer the query, the answer it, otherwise response with an error

  22. flow

    lovetox, how come?

  23. lovetox

    but doesnt answer my question, you assume someone sends a hash that existed in the past

  24. flow

    ok, then I probably don't understand the question

  25. lovetox

    i send a disco info request with node="lovetoxlovesdisco"

  26. lovetox

    what does smacks answer?

  27. flow

    assuming the node does not exists, hopefully whatever xep30 specifies to return in that case

  28. flow looks at xep30 (and later at smack's code)

  29. flow

    https://xmpp.org/extensions/xep-0030.html#errors

  30. flow

    item-not-found

  31. flow

    lovetox, does that help?

  32. flow

    (or, does it sound right?)

  33. lovetox

    yeah thats what i thought, item-not-found seems to fit

  34. lovetox

    just find it weird that 115 neither say anything about checking the node hash, nor notes any error cases

  35. lovetox

    for example Gajim does not check the node hash, and just returns its disco info

  36. lovetox

    which seems pretty bad

  37. flow

    indeed

  38. flow

    tbh, I wouldn't expect that xep115 has to say anthing about this, as its all within the realm of xep30

  39. flow

    tbh, I wouldn't expect that xep115 has to say anything about this, as its all within the realm of xep30

  40. lovetox

    do have some kind of node register functionality

  41. lovetox

    it seems more than one xep uses disco

  42. lovetox

    like adhoc which can have various nodes

  43. lovetox

    but its not clear if we receive a disco for what module it is

  44. lovetox

    entity caps, ad hoc, or something else

  45. lovetox

    there is no xep namespaces here

  46. flow

    well it should be clear to the receiving entity if there is something behind that node or not

  47. lovetox

    yeah but how do you implement that in a library

  48. lovetox

    you have multiple modules, and they register their nodes in some kind of service

  49. flow

    hmm? I don't see a problem, smack obviously did

  50. lovetox

    which routes the iq then to correct module

  51. lovetox

    im asking you flow

  52. lovetox

    how you did it

  53. flow

    you only have an issue if there is a clash in the node name

  54. flow

    and to prevent those we have https://github.com/xsf/registrar/blob/master/nodes.xml

  55. flow

    lovetox, smack's entity caps manager tells the service discovery manager to return X on a disco info request to node Y

  56. lovetox

    ok so modules register their nodes in some kind of service

  57. flow

    yap

  58. lovetox

    yeah seems good, sigh, more work, it never ends

  59. flow

    its similar to how modules can register for IQ requests

  60. flow

    just in this case, it's limited to a particular IQ and involves nodes (the often unknown and misunderstood concept of XMPP)

  61. lovetox

    ok thanks :)

  62. flow

    always happy to help :)