Build fails when janet-source depends on native module in project and (declare-executable) is used

If a project.janet file contains both a (declare-native) module and janet-source-code that depends on it, the build fails, but only if an executable is to be build:
Exampel project.janet extracted from jeff
(declare-project
  :name "jeff"
  :author "Josef Pospíšil<EMAIL_ADDRESS>tionis<EMAIL_ADDRESS>  :description "Janet Extended Fuzzy Finder"
  :license "MIT"
  :url "https://tasadar.net/tionis/jeff"
  :repo "git+https://tasadar.net/tionis/jeff"
  :dependencies ["spork"
                 "https://github.com/MorganPeterson/jermbox.git"])

(declare-native
 :name "fzy"
 :source ["fzy.c"])

(declare-source
  :source ["jeff"])

(declare-executable
   :name "jeff"
   :entry "jeff/cli.janet"
   :install true)

I also ran into this bug.

I looked into this a little bit.
For jeff's case [1], jpm --verbose build shows:
$ jpm --verbose build
cc -c fzy.c -DJANET_BUILD_TYPE=release -std=c99 -I/home/user/.local/include/janet -I/home/user/.local/lib/janet -O2 -fPIC -o build/fzy.o
generating meta file build/fzy.meta.janet...
generating executable c source build/jeff.c from jeff/cli.janet...
error: error: could not find module ../build/fzy:
    build/fzy.jimage
    build/fzy.janet
    build/fzy/init.janet
    build/fzy.so
  in require-1 [boot.janet] on line 2934, column 20
  in import* [boot.janet] on line 2973, column 15
  in _thunk [jeff/scorer.janet] (tailcall) on line 1, column 1
  in dofile [boot.janet] (tailcall) on line 2911, column 7
  in source-loader [boot.janet] on line 2922, column 15
  in require-1 [boot.janet] on line 2942, column 18
  in import* [boot.janet] (tailcall) on line 2973, column 15
  in dofile [boot.janet] (tailcall) on line 2911, column 7
  in source-loader [boot.janet] on line 2922, column 15
  in require-1 [boot.janet] on line 2942, column 18
  in import* [boot.janet] (tailcall) on line 2973, column 15
  in dofile [boot.janet] on line 2911, column 7
  in <anonymous> [/home/user/.local/lib/janet/jpm/cc.janet] on line 293, column 24
  in <anonymous> [/home/user/.local/lib/janet/jpm/rules.janet] on line 20, column 22

So at this stage there is no fzy.so in the build directory.  But creating the executable is attempted and I guess as part of that, the import form for fzy in this file doesn't work out.
Perhaps the order of execution is not quite right?
For reference, a subsequent invocation of jpm --verbose build does produce fzy.so (not sure why):
$ jpm --verbose build
cc -c fzy.c -DJANET_BUILD_TYPE=release -DJANET_ENTRY_NAME=janet_module_entry_fzy -std=c99 -I/home/user/.local/include/janet -I/home/user/.local/lib/janet -O2 -o build/fzy.static.o
generating executable c source build/jeff.c from jeff/cli.janet...
error: error: could not find module fzy:
    /home/user/.local/lib/janet/fzy.jimage
    /home/user/.local/lib/janet/fzy.janet
    /home/user/.local/lib/janet/fzy/init.janet
    /home/user/.local/lib/janet/fzy.so
  in require-1 [boot.janet] on line 2934, column 20
  in import* [boot.janet] on line 2973, column 15
  in _thunk [jeff/scorer.janet] (tailcall) on line 1, column 1
  in dofile [boot.janet] (tailcall) on line 2911, column 7
  in source-loader [boot.janet] on line 2922, column 15
  in require-1 [boot.janet] on line 2942, column 18
  in import* [boot.janet] (tailcall) on line 2973, column 15
  in dofile [boot.janet] (tailcall) on line 2911, column 7
  in source-loader [boot.janet] on line 2922, column 15
  in require-1 [boot.janet] on line 2942, column 18
  in import* [boot.janet] (tailcall) on line 2973, column 15
  in dofile [boot.janet] on line 2911, column 7
  in <anonymous> [/home/user/.local/lib/janet/jpm/cc.janet] on line 293, column 24
  in <anonymous> [/home/user/.local/lib/janet/jpm/rules.janet] on line 20, column 22
cc -std=c99 -I/home/user/.local/include/janet -I/home/user/.local/lib/janet -O2 -o build/fzy.so build/fzy.o -shared -lpthread

However, although there is now a fzy.so, a further jpm --verbose build doesn't succeed:
$ jpm --verbose build
generating executable c source build/jeff.c from jeff/cli.janet...
error: error: could not find module fzy:
    /home/user/.local/lib/janet/fzy.jimage
    /home/user/.local/lib/janet/fzy.janet
    /home/user/.local/lib/janet/fzy/init.janet
    /home/user/.local/lib/janet/fzy.so
  in require-1 [boot.janet] on line 2934, column 20
  in import* [boot.janet] on line 2973, column 15
  in _thunk [jeff/scorer.janet] (tailcall) on line 1, column 1
  in dofile [boot.janet] (tailcall) on line 2911, column 7
  in source-loader [boot.janet] on line 2922, column 15
  in require-1 [boot.janet] on line 2942, column 18
  in import* [boot.janet] (tailcall) on line 2973, column 15
  in dofile [boot.janet] (tailcall) on line 2911, column 7
  in source-loader [boot.janet] on line 2922, column 15
  in require-1 [boot.janet] on line 2942, column 18
  in import* [boot.janet] (tailcall) on line 2973, column 15
  in dofile [boot.janet] on line 2911, column 7
  in <anonymous> [/home/user/.local/lib/janet/jpm/cc.janet] on line 293, column 24
  in <anonymous> [/home/user/.local/lib/janet/jpm/rules.janet] on line 20, column 22

I tried modifying the import form like: (import ../build/fzy :prefix "" :export true) and then invoked jpm --verbose build again.  This time it did succeed in building jeff (though if one tries after jpm clean, it still seems necessary to run jpm build 3 times).  Not really a work-around, but just reporting.

[1] Modified the project.janet file to re-enable the declare-executable bits.

If the import form issue could be figured out (e.g. have something that installs fzy.so somewhere?), the following bits added to project.janet, might be a work-around:
(rule "jeff/cli.janet" [])

(add-dep "jeff/cli.janet" "build/fzy.a")
(add-dep "jeff/cli.janet" "build/fzy.so")

Locally, with (import ../build/fzy :prefix "" :export true) and the above changes to project.janet, jpm build succeeds (and the resulting executable does at least start up).

Ok, it looks like this scenario is covered in Chapter Nine: Xenofunctions [1] of the Janet for Mortals book by @ianthehenry.
If I understand the method described there correctly, what would work here is to make the import form in scorer.janet:
(import /build/fzy :prefix "" :export true)

and adapt a portion of project.janet to have the following bits:
(def native-module
  (declare-native
    :name "fzy"
    :source ["fzy.c"]))

(declare-source
  :source ["jeff"])

(declare-executable
  :name "jeff"
  :entry "jeff/cli.janet"
  :deps [(native-module :static)]
  :install true)

That worked for me.
@tionis If you try this out, please let me know how it goes for you.

[1] Search for the text:

But let’s try it anyway. I’m going to add an executable with a native dependency

Sorry, I don't know how to link to the relevant part of the chapter.

This is indeed a working hotfix.
But this is still a roundabout way to solve this.
So maybe the right way to solve this would be to make some changes in the way jpm orchestrates builds, so that it either detects such cases or simply always builds the native-module artifacts first?

Never mind, using (import /build/fzy) breaks the uses of jeff as library

Thanks for reporting back.
Too bad about the not being usable as a library :(
I think there's something in the Janet Guide about this type of situation but I haven't quite grokked that part yet.

The bit of text I had in mind is this:

Write a native Janet module that imports and re-exports the environment of a private native module, then declare-source it in our project.janet.

I think this is the easiest thing to do, but note that we will no longer be able to mix and match an executable with a library written in this way.

For a really dumb reason: in order to refer to a locally built native module from an executable, you need to use something like (import /build/set), while to import an installed native module you need to use (import set). You can sort of hack this by symlinking your jpm_tree/lib to the build/ directory but… is it worth it?

I'm not sure if the above text has a solution in it, but it seemed close.

So the problem is, don't use (import /build/fzy) in the scripts, use (import fzy). And yes, if you do use a native dependency in an executable, you need to explicitly tell jpm to add it as a dependency to the script.

Ok, so that's the intended behavior?
In that case, this should be mentioned in the documentation.

Yes, there should be some environment set up so that you can import things in the build directory as if they were installed. However, there may be some issues here when building native scripts.

Hm, when using
(def fzy
  (declare-native
    :name "fzy"
    :source ["fzy.c"]))

(declare-source
  :source ["jeff"])

(declare-executable
  :name "jeff"
  :entry "jeff/cli.janet"
  :deps [(fzy :static)]
  :install true)

in the project.janet
And doing a (import fzy) in the scorer.janet i still get a compile error:
compiling fzy.c to build/fzy.o...
generating meta file build/fzy.meta.janet...
generating /home/tionis/.local/lib/janet/.manifests/jeff.jdn...
compiling fzy.c to build/fzy.static.o...
creating native module build/fzy.so...
creating static library build/fzy.a...
generating executable c source build/jeff.c from jeff/cli.janet...
error: could not find module fzy:
  /home/tionis/.local/lib/janet/fzy.jimage
  /home/tionis/.local/lib/janet/fzy.janet
  /home/tionis/.local/lib/janet/fzy/init.janet
  /home/tionis/.local/lib/janet/fzy.so
error: build fail
in pdag [/home/tionis/.local/lib/janet/jpm/dagbuild.janet] (tailcall) on line 79, column 23
in run-main [boot.janet] on line 3838, column 16
in cli-main [boot.janet] on line 3986, column 17

@tionis It works for me if I use a full path with the @ construct, e.g.
(import @/home/user/src/jeff/build/fzy :prefix "" :export true)

Then jpm --verbose build gives:
$ jpm --verbose build
cc -c fzy.c -DJANET_BUILD_TYPE=release -std=c99 -I/home/user/.local/include/janet -I/home/user/.local/lib/janet -O2 -fPIC -o build/fzy.o
generating meta file build/fzy.meta.janet...
cc -c fzy.c -DJANET_BUILD_TYPE=release -DJANET_ENTRY_NAME=janet_module_entry_fzy -std=c99 -I/home/user/.local/include/janet -I/home/user/.local/lib/janet -O2 -o build/fzy.static.o
cc -std=c99 -I/home/user/.local/include/janet -I/home/user/.local/lib/janet -O2 -o build/fzy.so build/fzy.o -shared -lpthread
ar rcs build/fzy.a build/fzy.static.o
generating executable c source build/jeff.c from jeff/cli.janet...
found native /home/user/src/jeff/build/fzy.so...
found native /home/user/.local/lib/janet/jermbox.so...
found native /home/user/.local/lib/janet/spork/utf8.so...
compiling build/jeff.c to build/build___jeff.o...
cc -c build/jeff.c -DJANET_BUILD_TYPE=release -std=c99 -I/home/user/.local/include/janet -I/home/user/.local/lib/janet -O2 -o build/build___jeff.o
linking build/jeff...
cc -std=c99 -I/home/user/.local/include/janet -I/home/user/.local/lib/janet -O2 -o build/jeff build/build___jeff.o /home/user/src/jeff/build/fzy.a /home/user/.local/lib/janet/jermbox.a /home/user/.local/lib/janet/spork/utf8.a /home/user/.local/lib/libjanet.a -lm -ldl -lrt -pthread -rdynamic

tionis and I both seem to have $HOME/.local-based setups.  Is it possible that's a problem?

I'm on janet 1.28.0-dev-57b751b9 and latest jpm with following env:
JANET_BINPATH=~/.local/bin
JANET_HEADERPATH=~/.local/include/janet
JANET_LIBPATH=~/.local/lib/janet
JANET_PATH=~/.local/lib/janet
JANET_PROFILE=~/.config/janet/profile.janet

Maybe @bakpakin means with @build-dir to insert a hard-coded build path like you did?

With hardcoded paths use as a library works fine, too

Yeah, the full path makes the leading at sign redundant.
Try putting (print "build-dir: " :build-dir) before your imports in the entry file of the executable - it should display the current directory with /build appended, not nothing.

Do you mean (print "build-dir: " (dyn :build-dir))?
It seems the dynamic binding is empty.

With tionis' code, I get:
$ jpm build
compiling fzy.c to build/fzy.o...
generating meta file build/fzy.meta.janet...
compiling fzy.c to build/fzy.static.o...
creating native module build/fzy.so...
creating static library build/fzy.a...
generating executable c source build/jeff.c from jeff/cli.janet...
build-dir: build/
error: could not find module @build-dir/fzy:
    /fzy.jimage
    /fzy.janet
    /fzy/init.janet
    /fzy.so

Ah yes if I insert it in jeff/cli.janet I also get build-dir: build/

So, if I understand the problem correctly, the best way to tackle this is to add a note in the documentation to add the module as :dep to declare-executable.
And also add some environment monkey patching to jpm during executable compilation so that janet can find the native module?

When I add a similar form to jeff/scorer.janet as well, I see a blank value like tionis did for that file:
$ jpm build
compiling fzy.c to build/fzy.o...
generating meta file build/fzy.meta.janet...
compiling fzy.c to build/fzy.static.o...
creating native module build/fzy.so...
creating static library build/fzy.a...
generating executable c source build/jeff.c from jeff/cli.janet...
build-dir: build/
build-dir 2:
error: could not find module @build-dir/fzy:
    /fzy.jimage
    /fzy.janet
    /fzy/init.janet
    /fzy.so

May be that's expected?

The real fix should be patching module/paths so the built files in the build/ directory are available for import.

Is this an easy fix?
Will you implement this, or should I work on a Pull Request?

I don't know if this an easy fix, but I will work on it. The general issue is the declare-executable does not spawn a new Janet process that runs in a consistent, monkey-patched environment - rather, imports the module into the same environment as process that jpm is running in to do analysis on the image.

I tried the changes in af002e6e.
Worked better :+1:

Oh nevermind, it compiles, but when using (import @build-dir/fzy) using it as a library is broken

Possibly a new issue might make sense.
Not sure.

Oh I already reverted the commit and added a bin script as a workaround.
So really Jeff ist currently only used as library and as such the import statement in scorer is currently just (import fzy)

So, the (import @build-dir/module-name) problem was fixed during compilation, but fails when used as library

So, may be you mean this sort of thing?
$ janet
Janet 1.28.0-dev-176e816b linux/x64/gcc - '(doc)' for help
repl:1:> (import jeff)
error: could not find module @build-dir/fzy:
    /fzy.jimage
    /fzy.janet
    /fzy/init.janet
    /fzy.so
  in require-1 [boot.janet] on line 2934, column 20
  in import* [boot.janet] on line 2973, column 15
  in _thunk [/home/user/.local/lib/janet/jeff/scorer.janet] (tailcall) on line 2, column 1
  in dofile [boot.janet] (tailcall) on line 2911, column 7
  in source-loader [boot.janet] on line 2922, column 15
  in require-1 [boot.janet] on line 2942, column 18
  in import* [boot.janet] (tailcall) on line 2973, column 15
  in dofile [boot.janet] (tailcall) on line 2911, column 7
  in source-loader [boot.janet] on line 2922, column 15
  in require-1 [boot.janet] on line 2942, column 18
  in import* [boot.janet] on line 2973, column 15
  in _thunk [/home/user/.local/lib/janet/jeff/init.janet] (tailcall) on line 1, column 1
  in dofile [boot.janet] (tailcall) on line 2911, column 7
  in source-loader [boot.janet] on line 2922, column 15
  in require-1 [boot.janet] on line 2942, column 18
  in import* [boot.janet] on line 2973, column 15
  in _thunk [repl] (tailcall) on line 1, column 1

Yes exactly

@tionis I'm not sure if the following is appropriate, but I have a patch for jpm that gave seemingly good results here:
diff --git a/jpm/cc.janet b/jpm/cc.janet
index 9617754..dc702e2 100644
--- a/jpm/cc.janet
+++ b/jpm/cc.janet
@@ -290,7 +290,7 @@ int main(int argc, const char **argv) {
         (create-dirs dest)

         # Monkey patch stuff
-        (def token (do-monkeypatch bd))
+        (def token (do-monkeypatch (string bd ":all::native:")))
         (defer (undo-monkeypatch token)

           # Load entry environment and get main function.

That seems to work [1] if I've got the following for jeff's project.janet:
(declare-project
  :name "jeff"
  :author "Josef Pospíšil<EMAIL_ADDRESS>tionis<EMAIL_ADDRESS>  :description "Janet Extended Fuzzy Finder"
  :license "MIT"
  :url "https://tasadar.net/tionis/jeff"
  :repo "git+https://tasadar.net/tionis/jeff"
  :dependencies ["spork"
                 "https://github.com/MorganPeterson/jermbox.git"])

(def fzy
  (declare-native
    :name "fzy"
    :source ["fzy.c"]))

(declare-source
  :source ["jeff"])

(declare-executable
  :name "jeff"
  :entry "jeff/cli.janet"
  :deps [(fzy :static)]
  :install true)

Would you mind trying that out?

[1] By "works", I mean that:

jpm build works (ofc after jpm deps succeeds)
jpm install works (even after jpm clean)
Subsequently doing (import jeff) from a janet repl works
Subsequently doing (import fzy) from a janet repl works
Subsequently launching jeff --help works

Thanks for trying it out and reporting back :)

There is a slightly related point I think is worth considering and it has to do with collision of things in JANET_PATH.
It's true that a number of other projects have already placed .a, .so, and .maeta.janet files at the root of JANET_PATH, but I think this is asking for trouble eventually because two different projects may end up choosing the same name for "native" bits.
I think it's also a bit on the cluttered side AND when manually having to repair problems (hopefully not so often) it is more error-prone to have to pick out individual files from a sea of others :)
What some folks have done instead is to place all of their bits in a single directory.  Some examples of this include:

https://github.com/ianthehenry/jimmy
https://github.com/ml-2/stx
https://github.com/sogaiu/janet-tree-sitter (though a very hack method)

It may be a bit more work to arrange and it's also possible there will be a collision, but I think it's less likely and it's tidier.
To examine a specific case, at the time of this writing, for stx, once installed, there is a single directory under JANET_PATH named stx that contains:

init.janet
native.a
native.meta.janet
native.so

init.janet makes use of native.so like:
(import "stx/native" :prefix "" :export true)

IIUC, there's no technical reason everything has to be in one directory though.  I think having the "native" parts live in a separate sibling directory should work too.  I don't know if you think that might apply for fzy.so and friends but I thought I'd point out the possibility.
If it turns out the potential collision concerns of the sort mentioned above are warranted, perhaps something approrpiate could eventually be recommended via janet-lang.org docs.

@iarebatman If this issue is still relevant for you, perhaps you can try bdf59999a to see if things work better for your situation.
A summary of what was changed in tionis' jeff project is here [1].
In particular, the tip from @ianthehenry about :deps for declare-executable (also echoed by bakpakin here) might be relevant [2].
If you do try things out, please let us know how it goes for you :)

[1] The patch to jpm mentioned in the comment was not what made it into jpm -- it was a bit different (hopefully an improvement).
[2] For import, we're using (import fzy :prefix "" :export true) and not (import /build/fzy :prefix "" :export true) as was suggested by adapting the tip here originally.  Though see here for some thoughts about where to put native bits.

@tionis If this has still been working for you may be it's ok to close this.  What do you think?

It's working fine for me, I do think however that we should document somewhere that something like :deps [(fzy :static)] is required to compile executables with native deps.
I'm not sure where, though, as we probably don't want to explain every special case in the main docs?

I do think however that we should document somewhere that something like :deps [(fzy :static)] is required to compile executables with native deps.

Yes, I agree.
I'm not sure either, but I do find the current text at the official docs a bit misleading:

jpm is smart enough to figure out from the one entry file what libraries and other code your executable depends on, and bundles them into the final application for you.

One idea is to link to an suitable example as is done in other parts of the docs...I don't yet have a good idea for one though (^^;

Sounds good, I'll close this issue and will open a new one, so it's a bit clearer that just the documentation is missing.


Pushes format function to lowest level in BigQueryIO

This likely shuffles a lot fewer data, and also will at some point allow using a format function that formats to an Avro GenericRecord, rather than to the inefficient JSON TableRow. (though that will be usable only with BATCH_LOADS method, but that's fine)
Also makes sure that getSchema() is called once per destination rather than once per element (https://issues.apache.org/jira/browse/BEAM-3083).
R: @steveniemitz
CC: @reuvenlax

Is this update safe?
On Thu, Oct 26, 2017 at 5:18 PM, Eugene Kirpichov<EMAIL_ADDRESS>wrote:

This likely shuffles a lot fewer data, and also will at some point allow
using a format function that formats to an Avro GenericRecord, rather than
to the inefficient JSON TableRow. (though that will be usable only with
BATCH_LOADS method, but that's fine)
Also makes sure that getSchema() is called once per destination rather
than once per element (https://issues.apache.org/jira/browse/BEAM-3083).
R: @steveniemitz https://github.com/steveniemitz
CC: @reuvenlax https://github.com/reuvenlax
You can view, comment on, or merge this pull request online at:
https://github.com/apache/beam/pull/4047
Commit Summary

Pushes format function to lowest level in BigQueryIO

File Changes

M sdks/java/core/src/main/java/org/apache/beam/sdk/coders/
Coder.java https://github.com/apache/beam/pull/4047/files#diff-0 (5)
M sdks/java/core/src/main/java/org/apache/beam/sdk/coders/
ShardedKeyCoder.java
https://github.com/apache/beam/pull/4047/files#diff-1 (7)
M sdks/java/core/src/main/java/org/apache/beam/sdk/values/
ShardedKey.java https://github.com/apache/beam/pull/4047/files#diff-2
(4)
A sdks/java/io/google-cloud-platform/src/main/java/org/
apache/beam/sdk/io/gcp/bigquery/AddShardToKeys.java
https://github.com/apache/beam/pull/4047/files#diff-3 (49)
M sdks/java/io/google-cloud-platform/src/main/java/org/
apache/beam/sdk/io/gcp/bigquery/BatchLoads.java
https://github.com/apache/beam/pull/4047/files#diff-4 (95)
M sdks/java/io/google-cloud-platform/src/main/java/org/
apache/beam/sdk/io/gcp/bigquery/BigQueryHelpers.java
https://github.com/apache/beam/pull/4047/files#diff-5 (14)
M sdks/java/io/google-cloud-platform/src/main/java/org/
apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java
https://github.com/apache/beam/pull/4047/files#diff-6 (20)
M sdks/java/io/google-cloud-platform/src/main/java/org/
apache/beam/sdk/io/gcp/bigquery/CreateTables.java
https://github.com/apache/beam/pull/4047/files#diff-7 (33)
D sdks/java/io/google-cloud-platform/src/main/java/org/
apache/beam/sdk/io/gcp/bigquery/GenerateShardedTable.java
https://github.com/apache/beam/pull/4047/files#diff-8 (48)
M sdks/java/io/google-cloud-platform/src/main/java/org/
apache/beam/sdk/io/gcp/bigquery/PrepareWrite.java
https://github.com/apache/beam/pull/4047/files#diff-9 (15)
M sdks/java/io/google-cloud-platform/src/main/java/org/
apache/beam/sdk/io/gcp/bigquery/StreamingInserts.java
https://github.com/apache/beam/pull/4047/files#diff-10 (64)
M sdks/java/io/google-cloud-platform/src/main/java/org/
apache/beam/sdk/io/gcp/bigquery/StreamingWriteFn.java
https://github.com/apache/beam/pull/4047/files#diff-11 (65)
M sdks/java/io/google-cloud-platform/src/main/java/org/
apache/beam/sdk/io/gcp/bigquery/StreamingWriteTables.java
https://github.com/apache/beam/pull/4047/files#diff-12 (72)
M sdks/java/io/google-cloud-platform/src/main/java/org/
apache/beam/sdk/io/gcp/bigquery/TagWithUniqueIds.java
https://github.com/apache/beam/pull/4047/files#diff-13 (28)
M sdks/java/io/google-cloud-platform/src/main/java/org/
apache/beam/sdk/io/gcp/bigquery/WriteBundlesToFiles.java
https://github.com/apache/beam/pull/4047/files#diff-14 (14)
M sdks/java/io/google-cloud-platform/src/main/java/org/
apache/beam/sdk/io/gcp/bigquery/WriteGroupedRecordsToFiles.java
https://github.com/apache/beam/pull/4047/files#diff-15 (16)
M sdks/java/io/google-cloud-platform/src/test/java/org/
apache/beam/sdk/io/gcp/bigquery/BigQueryIOTest.java
https://github.com/apache/beam/pull/4047/files#diff-16 (8)

Patch Links:

https://github.com/apache/beam/pull/4047.patch
https://github.com/apache/beam/pull/4047.diff

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/apache/beam/pull/4047, or mute the thread
https://github.com/notifications/unsubscribe-auth/AUGE1e9iMtoZ1dZ6QjoqLSTpjF_ImICuks5swSFxgaJpZM4QIYz2
.

Unfortunately I can only give the same answer as in previous BigQueryIO refactorings: it's most likely not update-safe, but there also most likely is no way to get where we want to be while keeping it update-safe, and I'm suggesting to ignore this issue because we don't have a general approach to making any but trivial changes update-safe, nor a strict requirement to do that.

We should think about this then. This transform is largely used by Dataflow
users, many of whom do rely on update. It is also probably the most common
sink used by streaming Dataflow users, so we risk making the majority of
pipelines not updatable. The previous time I believe we were able to limit
the scope sufficiently.
On Thu, Oct 26, 2017 at 5:47 PM, Eugene Kirpichov<EMAIL_ADDRESS>wrote:

Unfortunately I can only give the same answer as in previous BigQueryIO
refactorings: it's most likely not update-safe, but there also most likely
is no way to get where we want to be while keeping it update-safe, and I'm
suggesting to ignore this issue because we don't have a general approach to
making any but trivial changes update-safe, nor a strict requirement to do
that.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/apache/beam/pull/4047#issuecomment-339841236, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AUGE1fPnene8LVYS2tmCZJ0cOEq_rkpvks5swSg_gaJpZM4QIYz2
.


api v1

@cloderic @matthieu-boussard please review
Connects to craft-ai/craft-ai#604

DON'T REMOVE THE BRANCH


http dispatcher error processing events without a correlation id

Found this when trying to run S1P demo using redis-writer with http.
In this case the upstream java vote-stream-processor is emitting events every 2s.
Those events don't have a correlation id.
The sidecar eventually panics with the following error
default/redis-writer-56fb49c4d9-qdbc2[sidecar]: 2018/02/19 20:48:45 Wrapper received Message{{"_list":"demo:votes-windows","_time":1519073323372}, map[timestamp:[1519073325372]]}
default/redis-writer-56fb49c4d9-qdbc2[sidecar]: 2018/02/19 20:48:47 Wrapper received Message{{"_list":"demo:votes-log","_time":1519073325367}, map[timestamp:[1519073327367]]}
default/redis-writer-56fb49c4d9-qdbc2[sidecar]: 2018/02/19 20:48:47 Wrapper received Message{{"_list":"demo:votes-windows","_time":1519073325372}, map[timestamp:[1519073327373]]}
default/redis-writer-56fb49c4d9-qdbc2[sidecar]: 2018/02/19 20:48:47 Error invoking http://localhost:8080: Post http://localhost:8080: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
default/redis-writer-56fb49c4d9-qdbc2[sidecar]: 2018/02/19 20:48:47 Error calling synch dispatcher Post http://localhost:8080: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
default/redis-writer-56fb49c4d9-qdbc2[sidecar]: 2018/02/19 20:48:47 Wrapper about to forward <nil>
default/redis-writer-56fb49c4d9-qdbc2[sidecar]: 2018/02/19 20:48:47 <<< %!s(<nil>)
default/redis-writer-56fb49c4d9-qdbc2[sidecar]: panic: runtime error: invalid memory address or nil pointer dereference
default/redis-writer-56fb49c4d9-qdbc2[sidecar]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x83ba6a]
default/redis-writer-56fb49c4d9-qdbc2[sidecar]:
default/redis-writer-56fb49c4d9-qdbc2[sidecar]: goroutine 31 [running]:
default/redis-writer-56fb49c4d9-qdbc2[sidecar]: github.com/projectriff/function-sidecar/vendor/github.com/projectriff/message-transport/pkg/transport/kafka.encodeMessage(0x0, 0x0, 0xc4204be240, 0xc4205da000, 0x100, 0x23, 0xc63120)
default/redis-writer-56fb49c4d9-qdbc2[sidecar]: 	/go/src/github.com/projectriff/function-sidecar/vendor/github.com/projectriff/message-transport/pkg/transport/kafka/wireformat.go:79 +0x3a
default/redis-writer-56fb49c4d9-qdbc2[sidecar]: github.com/projectriff/function-sidecar/vendor/github.com/projectriff/message-transport/pkg/transport/kafka.toKafka(0x0, 0x0, 0xc420282fd0, 0xf, 0x0)
default/redis-writer-56fb49c4d9-qdbc2[sidecar]: 	/go/src/github.com/projectriff/function-sidecar/vendor/github.com/projectriff/message-transport/pkg/transport/kafka/wireformat.go:36 +0x39
default/redis-writer-56fb49c4d9-qdbc2[sidecar]: github.com/projectriff/function-sidecar/vendor/github.com/projectriff/message-transport/pkg/transport/kafka.(*producer).Send(0xc420144960, 0x7ffc71886789, 0x5, 0x0, 0x0, 0x0, 0x0)
default/redis-writer-56fb49c4d9-qdbc2[sidecar]: 	/go/src/github.com/projectriff/function-sidecar/vendor/github.com/projectriff/message-transport/pkg/transport/kafka/producer.go:35 +0x39
default/redis-writer-56fb49c4d9-qdbc2[sidecar]: github.com/projectriff/function-sidecar/pkg/carrier.Run.func2(0xc19400, 0xc420166540, 0x7ffc71886789, 0x5, 0xc19540, 0xc420144960)
default/redis-writer-56fb49c4d9-qdbc2[sidecar]: 	/go/src/github.com/projectriff/function-sidecar/pkg/carrier/carrier.go:48 +0x14b
default/redis-writer-56fb49c4d9-qdbc2[sidecar]: created by github.com/projectriff/function-sidecar/pkg/carrier.Run
default/redis-writer-56fb49c4d9-qdbc2[sidecar]: 	/go/src/github.com/projectriff/function-sidecar/pkg/carrier/carrier.go:41 +0xbb

switching the redis-writer function to use grpc instead of http fixes the issue.
default/redis-writer-6ff59f6fcc-t6xzr[sidecar]: 2018/02/19 20:52:06 Sidecar for function 'redis-writer' (function-replicas->dummy) using grpc dispatcher starting
default/redis-writer-6ff59f6fcc-t6xzr[sidecar]: 2018/02/19 20:52:06 Rebalanced: &{Type:rebalance start Claimed:map[] Released:map[] Current:map[]}
default/redis-writer-6ff59f6fcc-t6xzr[sidecar]: 2018/02/19 20:52:06 Rebalanced: &{Type:rebalance OK Claimed:map[function-replicas:[0]] Released:map[] Current:map[function-replicas:[0]]}
default/redis-writer-6ff59f6fcc-t6xzr[main]: Node started in 117ms
default/redis-writer-6ff59f6fcc-t6xzr[main]: gRPC loaded in 97ms
default/redis-writer-6ff59f6fcc-t6xzr[main]: HTTP loaded in 68ms
default/redis-writer-6ff59f6fcc-t6xzr[main]: gRPC running on localhost:10382
default/redis-writer-6ff59f6fcc-t6xzr[main]: HTTP running on http://localhost:8080
default/redis-writer-6ff59f6fcc-t6xzr[main]: Function invoker started in 287ms
default/redis-writer-6ff59f6fcc-t6xzr[main]: RIFF 1: Result: <Buffer 7b 22 5f 6c 69 73 74 22 3a 22 64 65 6d 6f 3a 76 6f 74 65 73 2d 6c 6f 67 22 2c 22 5f 74 69 6d 65 22 3a 31 35 31 39 30 37 33 35 32 33 33 36 37 7d>
default/redis-writer-6ff59f6fcc-t6xzr[main]: RIFF 1: Result: <Buffer 7b 22 5f 6c 69 73 74 22 3a 22 64 65 6d 6f 3a 76 6f 74 65 73 2d 77 69 6e 64 6f 77 73 22 2c 22 5f 74 69 6d 65 22 3a 31 35 31 39 30 37 33 35 32 33 33 37 ... >
default/redis-writer-6ff59f6fcc-t6xzr[sidecar]: 2018/02/19 20:52:07 <<< Message{{"_list":"demo:votes-log","_time":1519073523367}, map[Content-Type:[text/plain]]}
default/redis-writer-6ff59f6fcc-t6xzr[sidecar]: 2018/02/19 20:52:07 <<< Message{{"_list":"demo:votes-windows","_time":1519073523373}, map[Content-Type:[text/plain]]}
default/redis-writer-6ff59f6fcc-t6xzr[main]: RIFF 1: Result: <Buffer 7b 22 5f 6c 69 73 74 22 3a 22 64 65 6d 6f 3a 76 6f 74 65 73 2d 6c 6f 67 22 2c 22 5f 74 69 6d 65 22 3a 31 35 31 39 30 37 33 35 32 35 33 36 37 7d>
default/redis-writer-6ff59f6fcc-t6xzr[sidecar]: 2018/02/19 20:52:07 <<< Message{{"_list":"demo:votes-log","_time":1519073525367}, map[Content-Type:[text/plain]]}

@jldec I'm pretty sure I've fixed this problem as the diagnostics are clear, but I don't know how to run the S1P demo, so I haven't verified the fix.


Solution of Maximum Rectangular Area in a Histogram using stack

Can you also add time complexity and space complexity for your code.

yes sure. creating another pull request.


Use authentication decorators

Once this PR in ACA-Py is merged, endpoints will not be protected by the middleware and decorators will need to be added to the route handlers to explicitly require tenant or admin authentication.

@loneil — did we want to let this issue get closed?

@loneil — did we want to let this issue get closed?

No that would be a GH auto-close. I believe this still will need doing to sync up with the work Emiliano did in ACA-Py once there's a planned release.
I'm setting pin status so GH keeps it.


[Feature] Get Block by Hash Endpoint

🚀 Feature
A get_block_by_hash endpoint.
We need a get_block_by_hash endpoint to be able to search a block detail by hash on the explorer.

This is already available via GET /testnet3/block/<hash>.


Icebreaker: "This card action is disabled because you've blocked."

Greetings,
I have a customer who is getting the following error with his new laptop.

Customer can access Icebreaker on his old laptop and on his phone, but not on his new laptop.

Hi @jeiler1 ,
Thanks for raising the query.  The same kind of issue already opened i.e., #298 . Please follow up in the same issue. This can considered as duplicate.


How to use this library? [integer literal is too large]

Hi, I've looking to assign a big number to an integer in rust with this lib. The docs doesn't clearly mentions how to initialise it.
Following is my code
use num_bigint::BigInt;
fn main (){
    let int: BigInt  =<PHONE_NUMBER>9999999999999999999999999999999999999999;
print!("integer is {}", int)
}

but it returns this error
error: integer literal is too large
 --> src\main.rs:3:24
  |
3 |     let int: BigInt  =<PHONE_NUMBER>9999999999999999999999999999999999999999;
  |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: could not compile `rust` due to previous error

I'm new to rust I wanna know how to use it properly. Can you please help?

You can't directly write that as a numeric literal because we're not integrated in the language or compiler, but you can parse that number from a string:
    let int: BigInt = "99999999999999999999999999999999999999999999999999"
        .parse()
        .unwrap(); // for unknown input, might want to handle errors better here

Do you know any resource/guide that could help me to understand doing arithmetic operations like add, sub, mul, etc with big numbers in rust.
I want to know more about this library but there's nothing in README.md.

I don't know any better resources, and no doubt we could use more documentation if someone has the time and still for writing that. But generally, once you get over this hurdle of creating big numbers, the rest of the normal Rust operators should work fine. Another difference from primitive integers is that BigInt and BigUint are not Copy-able, so they must be explicitly Cloned (by calling .clone()) to duplicate them. Many operators also work on references so you can avoid excessive clones, like:
let x: BigInt = ...;

// Multiply by reference to create a new `BigInt`, and `x` will still be usable afterward.
let square = &x * &x;

Another tip: for numbers that are initially small enough for a primitive integer type, you can also convert them using the From trait, like BigInt::from(42_i32).

Thanks I'll try that 👍🏻

I want to help with the docs. Where do I start?

That's an open-ended question! Find something that's confusing and try to clear it up from your perspective as a newer user, or add documentation that you think is completely absent. For this particular issue, the main documentation on struct BigInt and struct BigUint is very minimal right now, and could at least use some examples of different ways to construct them.

Thanks for the advice! But should I add stuff to the READMEs, a new folder named "docs", or should I edit in docs.rs?
If it's in docs.rs, I need to create an account there (I don't have one, currently). And even after I create an account, I don't know where to "post" my edits (it seems similar to a wiki, so maybe the "edit" button only shows up after login?)

It would be most visible on docs.rs, but the way you do that is by editing the inline doc comments, here in the code.
See https://doc.rust-lang.org/book/ch14-02-publishing-to-crates-io.html#making-useful-documentation-comments
and https://doc.rust-lang.org/rustdoc/how-to-write-documentation.html

Thanks again! While reading some more docs, I noticed that cargo test can use doc-comment examples as tests! This, an the fact that cargo doc and docs.rs auto-generate HTML documentation from doc-comments is a blessing. I've fallen in love with a CLI tool, lol.
(The following is a tangent topic) When I first searched my xorsum crate on docs.rs, I didn't find it, so my conjecture that "docs.rs may be automatic, and not a manually edited wiki" was droped from my brain. But I searched it again and found it! It seems like it has finally got out of the queue.
(The following is on-topic again) So if I understood correctly, to edit docs, I just need to open PRs where I edit doc-comments of any rust-num repo (then await approval and possible merge)? It's that easy?! Then I'm going to start right now!
Should I open a monolithic PR? (these usually have big diffs) Or should I open multiple small PRs (1 for each file edited)?

Ok, understood :)


Select element does not work

Hello! I have a problem with the plugin, as you can see in the picture I only selected the second colum and changed the color of the font to orange. But something is wrong because the plugin detected the colum select someting else:

Seem's that you have in css-stylesheet rules with hiest priority than in plugin's styles.
You can see used css-attributes/selectors in https://github.com/likemusic/CKEditorTableCellsSelection/blob/master/styles/tablecellsselection.css


useDrag and OrbitControls don't work well together

I'm trying to get useDrag and OrbitControls to play well together, but it's not working.
The scenario I'm trying to achieve is to be able to drag an three js object using useDrag and at the same time be able to use OrbitControls. All of this while using react-three-fiber.
The codesandbox is the following: https://codesandbox.io/s/react-three-fiber-gestures-forked-lpfv3?file=/src/App.js:1099-1127
The behavior I want : When I drag the object, I don't want the orbit camera to change. I want the object alone to be dragged.
The actual behavior: When I drag the object, it doesn't get dragged, the camera is the one that moves.

This seems to work:
<orbitControls args={[camera, gl.domElement]} ref={orbitRef} enableRotate={!dragging} />

But I'm not an expert in THREE nor r3f. @drcmda maybe there's a better way without using state? I thought event.stopPropagation() would work but it doesn't...

Thanks, that did help. I tried using the "enabled" property, but it didn't work. Didn't know about the "enableRotate" one. @dbismut , any ideas on how to make the dragging behavior better?
Right now, when I drag, it's kinda slow, so the mouse and the object are far from each other. How do I make it faster and make the ball actually follow the mouse and stick to it?

Actually, on some more testing, it doesn't work right away. You have to manually set enableRotate to false first, then later assign it !dragging for it to work. If you just start from scratch with enableRotate={!dragging} it's not going to work. That's some really work behavior.

@ikteru Please use the discord channel if you need specific help. Closing as not an issue with the lib.


feat: add token support

Fixed tokens in a decklist throwing exceptions, and added a toggle for token pricing.
When trying to check my latest deck's price I noticed the app would break when I included tokens in my list. After playing with the code for a bit I've noticed it was the issue with tokens being converted to double-faced ones that later couldn't be handled (ex. Treasure -> Dinosaur // Treasure). I've fixed it by running a search for that specific card excluding double-sided and other weird card types. After that, I figured a toggle similar to the one existing for basic lands would be nice, as I don't include tokens in my budget estimates.
If you have any ideas on how to improve my code, I will gladly apply them as I'm a newbie at JS.

Hey, sorry, I missed this when you first opened it. I’ll try to take a look this week.

Can you provide me a full decklist, including tokens, so I can see what kind of input you're expecting for this? That'd help me work through the code changes.

Try this, I believe it's what I've pasted
1x Abrade
1x Access Tunnel
1x Ancient Cellarspawn
1x Anger
1x Arcane Signet
1x Army of the Damned
1x Artist's Talent
1x Bedevil
1x Big Score
1x Bitter Reunion
1x Bojuka Bog
1x Boneyard Parley
1x Breach the Multiverse
1x Call Forth the Tempest
1x Cathartic Pyre
1x Cathartic Reunion
1x Chainer, Nightmare Adept
1x Chaos Warp
1x Command Tower
1x Crashing Drawbridge
1x Cruel Entertainment
1x Cynical Loner
1x Dark Ritual
1x Dauthi Trapper
1x Demand Answers
1x Disrupt Decorum
1x Dragon's Rage Channeler
1x Dragonskull Summit
1x Dualcaster Mage
2x Elemental
1x Faithless Looting
1x Feed the Swarm
1x Fellwar Stone
1x Fevered Suspicion
1x Filth
1x Fish
1x Foreboding Ruins
1x Geier Reach Sanitarium
1x Goblin Game
1x Grab the Prize
1x Graven Cairns
1x Guttersnipe
1x Horror
1x Hostile Negotiations
1x In Garruk's Wake
1x Key to the City
1x Lightning Greaves
1x Magar of the Magic Strings
1x Mind Stone
1x Mindblaze
6x Mountain
6x Mountain
6x Mountain
6x Mountain
2x Pest
1x Profane Transfusion
1x Rakdos Charm
1x Rakdos Signet
1x Ripples of Undeath
1x Rise of the Dark Realms
1x Rise of the Eldrazi
1x Rising of the Day
1x Rogue's Passage
1x Savage Beating
1x Sazacap's Brew
1x Sedgemoor Witch
1x Silver Shroud Costume
1x Skull Storm
1x Smoldering Marsh
1x Sol Ring
1x Sulfurous Springs
6x Swamp
6x Swamp
6x Swamp
6x Swamp
1x Swiftfoot Boots
1x Tainted Peak
1x Talisman of Indulgence
1x Terminate
1x Thrill of Possibility
1x Treasure
1x Twinferno
1x Unmarked Grave
1x Whims of the Fates
1x Whispersilk Cloak
1x Withering Torment
1x Worst Fears
1x Young Pyromancer
1x Zephyr Boots
1x Zombie

I haven't forgotten about this, just mulling over the desired behavior here. Hoping to have this done tonight.

np, no need to hurry :)

any updates?

I’m figuring out how to handle a weird edge case, but it’s in progress! Just don’t have a lot of extra time to devote to it, so I have to do it a little at a time.

okay, glad to hear it's going forward :)
if theres anything i can help with just lmk

Uhg, this is in, but I’m having issues with GitHub actions building and deploying the site. Hopefully it’ll be deployed tonight some time.

Okay, looks like it's up and running now!
https://crookedneighbor.github.io/mana-tithe/
If you see anything amiss, feel free to open an issue or PR.

let's go, thank you


Wrong starter template description (and typo)

What?
The following is a rather ambiguous (slightly misleading) sentence as it gives the impression you can take any public Github astro project and start a new project based on it (i.e., copy the files as a "template")

You can also start a new astro project based on an existing GitHub repostory by passing a --template argument to the create astro command.

In reality, this does not seem to be the case.
How?

it appears (as I suspected), the creation from an "existing Github repository" command/description only works with existing starter templates
e.g.,
✅ this works:
npm create astro@latest -- --template satnaing/astro-paper

❌ this does not work:
npm create astro@latest -- --template ohansemmanuel/astrojs-ditch-the-runtime-react

Suggestion
If the assumption above is correct i.e., this works for existing templates, then it's perhaps worth reconsidering rewording the sentence to:

You can also start a new astro project based on an existing starter template GitHub ~repostory~ repository by passing a --template argument to the create astro command.

Hmm. Interesting I’m not actually clear what the difference between those two repos is that makes one fail, I think theoretically they should both work. It might be the branch name? Noticing that the one that fails uses master instead of main for the primary branch. Wonder if create astro specifically expects to copy from main.

@delucis you're right. create astro seems to specifically copy from main.
I added a main branch and this worked:

Is this worth documenting? Or perhaps create astro tweaked to copy from the default branch?

Let me check with the core team. Maybe we can use the default branch in create astro. Feels like a bug to me, but if we can’t fix it, at that point it might make sense to document.

As a side note, it looks like you can also specify the branch name after a # in the command, e.g.
npm create astro@latest -- --template ohansemmanuel/astrojs-ditch-the-runtime-react#master

It looks like this could be a limitation of the underlying tool Astro uses: https://github.com/unjs/giget/

It looks like this could be a limitation of the underlying tool Astro uses

That makes sense. It does work with the branch name after a #.
Thanks for the input @delucis - Please feel free to either close this issue or consider a possible next step: documenting this limitation (with a small note after the instructions)

Opened to #2413 address this. Thanks for raising this issue @ohansemmanuel!


Spelling error in https://opensource.creativecommons.org/community/

Describe the bug
In the list of slack channels, on page
https://opensource.creativecommons.org/community/
there is a missing 'l' in toolkit in the link to 'CC Platform Tookit'
To Reproduce

Go to https://opensource.creativecommons.org/community/
Scroll down to the Slack channels table.
In the third entry from the bottom
The link to the #cc-outreachy-platform-toolkit that is in the right column is misspelled.  An 'l' needs to be added to change 'tookit' to 'toolkit'

Screenshots

Desktop (please complete the following information)

OS: macOS Mojave Version 10.14.6
Safari
Version 13.0.4

I would like to be assigned to this issue.

@terrifricker please go ahead and submit a PR fixing it.


Fix execution order on adjacent triggers

Please check if the PR fulfills these requirements

[x] The commit message follows our guidelines

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Fixes #1219

What is the current behavior? (You can also link to an open issue here)
As #1219 mentions, adjacent triggers will have an incorrect order for executing "On Enter"/"On Leave" scripts.

What is the new behavior (if this is a feature change)?
This is now resolved such that "On Leave" executes before the next "On Enter" script.

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
None that I'm aware of.

Other information:

Wait...this should have been a PR for GBVM. Sorry! Closing here; will submit a PR for GBVM.


How to avoid errors when chain of objects in field mapping contains nulls?

Hello.
First, thank you for this component, it is very useful!
I have a problem with a complex mapping paths. In some cases i need to show properties of related objects at the grid column. For example:
columns:
  foo_bar_baz:
    type: text
    options:
      field: [ foo.bar.baz ]

When there are bar contains a NULL, it will cause a DataMappingException that can not be catched and grid can not be built. Is there a way to supress this errors just to display the empty values?
The only way that I could find is overriding a class name of service datagrid.data_mapper.chain through the application parameters. But it's dirty, is there a better way?

As I testing, unfortunately there is no easy way to do this for now. You can create getFooBarBaz() (or getBarBaz() - depends on which level)  method and mapping as fooBarBaz if structure of your models allow this.
Second way, as you mention, is to override ChainMapper service definition (in services or compiler-pass) and add your custom mapper to the chain.
Note that you use field in the example, but i think i'ts a mistake. You should use field_mapping option.
Currently datagrid uses symfony's property accessor to get value:
$accessor->getValue($object, 'foo.bar.baz');

Maybe PropertyAccessorMapper should split path by dots or there should be some new mapper that do it this way. At least there should be an ease way to add custom mapper to chain mapper. I create an issue for this.
Please leave this issue open for now.
Maybe others will have some better solution @fsi-open

Second way, as you mention, is to override ChainMapper service definition (in services or compiler-pass) and add your custom mapper to the chain.

Thank you, I did so.

At least there should be an ease way to add custom mapper to chain mapper. I create an issue for this.

IMO, it would be the most flexible way.

Data mappers will be removed in 2.0


Render Crash?

I get this crash when I try to open the creative tab that has Portality's items
https://pastebin.com/2iTRTrJT

https://github.com/Chisel-Team/ConnectedTexturesMod/issues/63


Remove outdated TODO

I think we decided in https://github.com/sveltejs/kit/issues/568 that we're not going to do this

Telling people to manually do this during the handle hook makes sense I think, but this might be good to document somewhere as part of the work of removing the TODO. Maybe in an FAQ? in a migration guide?
Separately, is there a way for code in handle to know whether pre-rendering is currently happening or whether we are at runtime? (We could maybe do something with env vars, but that sounds ugly.) The idea being that people probably don't want to be minifying HTML on the fly at runtime, just at build time.

is there a way for code in handle to know whether pre-rendering is currently happening or whether we are at runtime?

Yep: https://kit.svelte.dev/docs#modules-$app-env
import { prerendering } from '$app/env';

export async function handle({ request, render }) {
  const response = await render(request);

  if (prerendering && response.headers['content-type'] === 'text/html') {
    response.body = minify_html(response.body);
  }

  return response;
}


i2c: revise timing calculation

Look-up tables were used for determining the delay loop counts before.
Based on these hand-tuned values, the loop overhead was estimated for
each option -- 80 and 160 MHz, fast and slow GPIO access. Instead of the
great number of tunable parameters one now only has to tune the overhead
values if the code is changed.
Functions were added to the API which allow setting an arbitrary
frequency. API backward compatibility is retained.

You tested if frequency signals are good  for each option and frequency ?
Nice update. I guess, this soft i2c library will be the best of the esp8266 ^^

@Zaltora: I tested with some configurations. Probably I should still check all the combinations (80MHz/register access, 80MHz/GPIO API, 160MHz/register access and 160MHz/GPIO API).
However, the formula that was introduced here produces the very same delay values that were hand-tuned and hardcoded before (if not even more precise!) The linear delay formula and coefficients are based on those hand-tuned values but the number of parameters is reduced.

Thank you!


Minor fixes in client_middleware.clj

Looks like there were some leftovers in the docstring from the time when Aleph used Slingshot.
I took the liberty of removing a few currently unused functions. I will drop this commit if they are still needed.
Since by default the requests don't have :as key (as I understand, it has to be provided explicitly), in common case coerce-response-body will do nothing, which makes it unnecessary to put it on the executor in such case.

@alexander-yakushev I don't think Aleph ever used slingshot, that's just a copy-paste from https://github.com/dakrone/clj-http/blob/eee52198d7776e3e6d965fbade9296918efc8cca/src/clj_http/client.clj#L248-L250 :) Thanks for catching that!
Regarding removed functions. I don't worry a lot about dissoc-in and update because it's very unlikely you would use them in your code. But parse-content-type is kinda different. It's public, so someone could use it just as aleph.http.client-middleware/parse-content-type. If we want to remove them from the code, I think it would be fair at least to make function as deprecated as a first step and give users some time to adjust if necessary.


chore: update to crd gen v 0.0.10

partial of #2292, this pr adds optional fields and default values, the validation is still missing

@odubajDT I commented on the issue here a list of the refs that are currently pointing to bad documentation, with the new 0.10.0 version anyhow links are borken.

@odubajDT I commented on the issue here a list of the refs that are currently pointing to bad documentation, with the new 0.10.0 version anyhow links are borken.

Thank you!


io_context should process all posted works before shutting down

Removed the stop statement while shutting down io_context so that it can indeed process all posted works before shutting down. Failing to do this may cause some posted requests, e.g., notifying any outstanding invocation requests to be not completed before shutdown, but they are expected to be completed with target_disconnected exception with close reason "Hazelcast client is shutting down".
Added a new test invocation_should_not_block_indefinitely_during_client_shutdown which can be run indefinitely and observe that it is not being blocked in any run. An example way to reproduce the problem without this PR fix is :
    for ((;;)) { /Users/ihsan/Desktop/work/src/hazelcast-cpp-client/cmake-build-arm-debug/hazelcast/test/src/client_test --gtest_filter=IssueTest.invocation_should_not_block_indefinitely_during_client_shutdown ; }
This run blocks after several runs in master branch but runs indefinite time with this PR fix with no problem.
I am hoping that this may fix the issues #852 and #857 .

Linux test PASSed.

Linux test PASSed.

Windows test PASSed.

Windows test PASSed.

I pushed the same branch on my fork and ran nightly builds manually:
https://github.com/yemreinci/hazelcast-cpp-client/actions/runs/813547700
https://github.com/yemreinci/hazelcast-cpp-client/actions/runs/813548133
https://github.com/yemreinci/hazelcast-cpp-client/actions/runs/813548957


Fatal Exception: FSCalendar date out of bounds exception.

I'm getting this exception:
Fatal Exception: FSCalendar date out of bounds exception
Target date 2016/10/09 beyond bounds [2016/10/16 - 2016/10/09]
[FSCalendar scrollToDate] in the case for FSCalendarScopeWeek (line 1261 in my code). It's worth noting that I am using dates that are in the local timezone, so maybe the check is not taking that into consideration.

@glub Can you help with a stack trace?

Fatal Exception: FSCalendar date out of bounds exception
0  CoreFoundation                 0x185fd01c0 __exceptionPreprocess
1  libobjc.A.dylib                0x184a0855c objc_exception_throw
2  CoreFoundation                 0x185fd0108 -[NSException initWithCoder:]
3  FSCalendar                     0x100406578 FSCalendarAssertDateInBounds (FSCalendar.m:28)
4  FSCalendar                     0x100408568 -[FSCalendar scrollToDate:animated:] (FSCalendar.m:1261)
5  FSCalendar                     0x100408d80 -[FSCalendar scrollToPageForDate:animated:] (FSCalendar.m:1334)
6  FSCalendar                     0x100403f90 -[FSCalendar layoutSubviews] (FSCalendar.m:439)
7  UIKit                          0x18be1654c -[UIView(CALayerDelegate) layoutSublayersOfLayer:]
8  QuartzCore                     0x1892de40c -[CALayer layoutSublayers]
9  QuartzCore                     0x1892d30e8 CA::Layer::layout_if_needed(CA::Transaction*)
10 UIKit                          0x18be2afbc -[UIView(Hierarchy) layoutBelowIfNeeded]
11 FSCalendar                     0x1004119b4 -[FSCalendarAnimator performTransitionCompletion:animated:] (FSCalendarAnimator.m:373)
12 FSCalendar                     0x100410d38 -[FSCalendarAnimator performScopeTransitionFromScope:toScope:animated:] (FSCalendarAnimator.m:292)
13 FSCalendar                     0x100403ec4 -[FSCalendar layoutSubviews] (FSCalendar.m:439)
14 UIKit                          0x18be1654c -[UIView(CALayerDelegate) layoutSublayersOfLayer:]
15 QuartzCore                     0x1892de40c -[CALayer layoutSublayers]
16 QuartzCore                     0x1892d30e8 CA::Layer::layout_if_needed(CA::Transaction*)
17 UIKit                          0x18be2afbc -[UIView(Hierarchy) layoutBelowIfNeeded]
18 UIKit                          0x18bed3430 -[UINavigationController _layoutViewController:]
19 UIKit                          0x18bed0d14 -[UINavigationController _layoutTopViewController]
20 UIKit                          0x18bee9c6c -[UINavigationController navigationTransitionView:didEndTransition:fromView:toView:]
21 UIKit                          0x18bee9938 -[UINavigationTransitionView _notifyDelegateTransitionDidStopWithContext:]
22 UIKit                          0x18bee9590 -[UINavigationTransitionView _cleanupTransition]
23 UIKit                          0x18be51b48 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:]
24 UIKit                          0x18be4fd24 +[UIViewAnimationState popAnimationState]
25 UIKit                          0x18bedce1c -[UINavigationTransitionView transition:fromView:toView:]
26 UIKit                          0x18bed2b6c -[UINavigationController _startTransition:fromViewController:toViewController:]
27 UIKit                          0x18bed1c38 -[UINavigationController _startDeferredTransitionIfNeeded:]
28 UIKit                          0x18bed17ec -[UINavigationController __viewWillLayoutSubviews]
29 UIKit                          0x18bed1750 -[UILayoutContainerView layoutSubviews]
30 UIKit                          0x18be1654c -[UIView(CALayerDelegate) layoutSublayersOfLayer:]
31 QuartzCore                     0x1892de40c -[CALayer layoutSublayers]
32 QuartzCore                     0x1892d30e8 CA::Layer::layout_if_needed(CA::Transaction*)
33 QuartzCore                     0x1892d2fa8 CA::Layer::layout_and_display_if_needed(CA::Transaction*)
34 QuartzCore                     0x18924fc64 CA::Context::commit_transaction(CA::Transaction*)
35 QuartzCore                     0x1892770d0 CA::Transaction::commit()
36 QuartzCore                     0x189277af0 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*)
37 CoreFoundation                 0x185f7d7dc CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION
38 CoreFoundation                 0x185f7b40c __CFRunLoopDoObservers
39 CoreFoundation                 0x185f7b89c __CFRunLoopRun
40 CoreFoundation                 0x185eaa048 CFRunLoopRunSpecific
41 GraphicsServices               0x18792d198 GSEventRunModal
42 UIKit                          0x18be84628 -[UIApplication _run]
43 UIKit                          0x18be7f360 UIApplicationMain
44 SITU                           0x100054c10 main (FoodCategory+CoreDataProperties.swift:14)
45 libdispatch.dylib              0x184e8c5b8 (Missing)

I'd rather have an assert than an exception since asserts are disabled in release code and I can't catch this exception (easily).

@glub Is this the latest in master?

I'm using the latest cocoapod version (2.4.0).

I have the same expiation with a FSCalendarScopeMonth with a minimumDate in more than one month. Seems to be related to timezone.
First investigation :
When view is initialized
In layoutSubviews _needsAdjustingMonthPosition is YES
So [self scrollToPageForDate:_pagingEnabled?_currentPage:(_currentPage?:self.selectedDate) animated:NO]; is called
_pagingEnabledis YES and _current_page is 2016-09-30 22:00:00 +0000
Then in FSCalendarAssertDateInBounds:
date is 2016-09-30 22:00:00 +0000
minimum_dateis 2016-10-31 23:00:00 +0000
minOffset = -31 => invalid
I try to fix that and propose a pull request

@mhausherr It would be nice to swap in an "assert" in place of the exception so production/release code doesn't crash. :)

This commit a6a39cc fix the consequence of the problem but not the root cause:
The error is not impacted by the timezone but only by the presence of minimumDateForCalendarin the data source.
If minimumDateForCalendar is after today you get an out of bound. The solution is to set currentPage  default to minimumDate if minimumDate is after today

I've tried updating to the commit you mentioned, and inside the data source method for minimumDate I set currentPage to the same value I'm returning in minimumDate but to no avail

Fixed.

I founded the way to solve its
You just open FSCalendar.m and fix code like this

(void)scrollToDate:(NSDate *)date animated:(BOOL)animated
{
if (!_minimumDate || !_maximumDate) {
return;
}
// Add this line
if(![FSCalendarUtils betweenDate:date minDate:_minimumDate maxDate:_maximumDate]) {
return ;
}
...

*Note that FSCalendarUtils was a file I added later
##------##
FSCalendarUtils.h
#import <Foundation/Foundation.h>
@interface FSCalendarUtils : NSObject
+(BOOL)betweenDate:(NSDate *)date minDate:(NSDate *)minDate maxDate:(NSDate *)maxDate;
@end
##------##
FSCalendarUtils.m
+(BOOL)betweenDate:(NSDate *)date minDate:(NSDate *)minDate maxDate:(NSDate *)maxDate {
BOOL condition1 = ([date compare:minDate] == NSOrderedSame) || ([date compare:minDate] == NSOrderedDescending);
BOOL condition2 = ([date compare:maxDate] == NSOrderedSame) || ([date compare:maxDate] == NSOrderedAscending);
BOOL isBetween = condition1 && condition2;

return isBetween;

}

'FSCalendar date out of bounds exception', reason: 'Target date 2019/08/08 beyond bounds [2019/08/10 - 2019/08/15]
Team, please check it No has given a proper answer

@shantaramk  did you resolve it, seems like a dead end?
I'm still experiencing this

What is the Latest pod version

This error only happy when you are set the min date, just remove it or make the selected date more than min date


Print Bill issue

after bill generation the bill is nit getting printed but if i get into transactions and there print the bill it gets printed if any solutions or am i doing something wrong ?

Did you click the print button found on the bill?

Did you click the print button found on the bill?

Ofc sir

Ofc sir it's not showing me any popup or nothing when I clicked the button
I see.  Can you take me through the exact steps you are taking to print the receipt?

Also is that button only supports thermal printer? cuz I am testing it on normal printer
You can use any printer.

I see. Can you take me through the exact steps you are taking to print the receipt?

Ofc sir it's not showing me any popup or nothing when I clicked the button

I see. Can you take me through the exact steps you are taking to print the receipt?

Also is that button only supports thermal printer? cuz I am testing it on normal printer

You can use any printer.

Adding the products and then paid the bill the pop up of bill appeared with the print button but when I clicked the button nothing happened
I can see the same button has been used under transactions bill section but that works only the pos button doesn't works also the transaction page bill shows the html rather than a styled bill
And print button before paying at the side of hold button is also not working for me

Just to confirm:

Did you upload a logo in settings?
Are you seeing any errors in the developer mode?

yeah after adding logo file correctly its working fine thanks for the help


Upgrade compile and target SDK version.

The performance should be better now with #1008.

/gcbrun

@nmhung00 For future PRs please be sure to only create branches in your own fork. Thanks!


Use Lua commenting style

C++ style comments mess up readability on github and many other editors. Hard to tell if parts are really commented...

Aww man, that's gonna be so much work to port over :pensive:

Thanks! This greatly improves readability, and I don't have to download whole repo so I can read it in browser! 👍


New version: GenericSchur v0.3.0

Registering package: GenericSchur
Repository: https://github.com/RalphAS/GenericSchur.jl
Created by: @RalphAS
Version: v0.3.0
Commit: c967b36ac16a10cb44414a91576cd4b95d1f16d4
Reviewed by: @RalphAS
Reference: https://github.com/RalphAS/GenericSchur.jl/commit/c967b36ac16a10cb44414a91576cd4b95d1f16d4#commitcomment-35205063

Please add (at least)
[compat]
julia = "1"

to your project file and retrigger the bot.

[compat] clause has been fixed.


[20.09] python3Packages.pygments: add patch for CVE-2021-27291

Motivation for this change
https://nvd.nist.gov/vuln/detail/CVE-2021-27291
I'm quite confident in patching this:

the changes are entirely changes to regexes, in files which have largely been untouched in 4 years and likely have a fairly stable internal interface.
I've built it successfully with the tests enabled on linux x86_64 and macos 10.14 (I'll do another PR with some hackery to allow us to enable the pygments tests permanently)

Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[ ] NixOS
[x] macOS
[x] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

We should probably add knownVulnerabilities to python2Packages.pygments (`pkgs/development/python-modules/pygments/2_5.nix.
Everything else lgtm.

Hold on I got so caught up in the whole pytest cycle thing I completely forgot about 2.5.x.. sure enough, the patch works fine there too and the tests pass. Will push another commit.

Except python2Packages.pygments would need to go to master first and then be cherry-picked from there. Meh.

Ah yes I'll yank it from here and do that.

Sigh. And this looks staging-bound too.

Result of nixpkgs-review pr 117810 at a5ed349b run on x86_64-linux 1

563 packages marked as broken and skipped:

Literate
adobe-reader
agdaPackages.iowa-stdlib
aldor
aliceml
alliance
amsn
appleseed
arora
autotrace
...

18673 packages skipped due to time constraints:

AusweisApp2
DisnixWebService
EmptyEpsilon
Fabric
MMA
OVMF
OVMF-CSM
OVMF-secureBoot
R
SDL
...

105 packages built successfully:

desktop-file-utils
fontconfig
gd
glib (gnome2.glib ,gnome3.glib)
gtk-doc (gnome2.gtkdoc)
gnome2.libIDL
gts
libva-minimal
python37Packages.Babel
python37Packages.alabaster
python37Packages.apipkg
python37Packages.async_generator
python37Packages.click
python37Packages.execnet
python37Packages.flake8
python37Packages.flaky
python37Packages.freezegun
python37Packages.gunicorn
python37Packages.iso8601
python37Packages.jdcal
python37Packages.jinja2
python37Packages.jsonpickle
python37Packages.junit-xml
python37Packages.mccabe
python37Packages.psutil
python37Packages.py-cpuinfo
python37Packages.pygments
python37Packages.pytest (python37Packages.pytest_5)
python37Packages.pytest-asyncio
python37Packages.pytest-benchmark
python37Packages.pytest-expect
python37Packages.pytest-flake8
python37Packages.pytest-forked
python37Packages.pytest-mock
python37Packages.pytest-relaxed
python37Packages.pytestCheckHook
python37Packages.pytest_xdist (python37Packages.pytest_xdist_1)
python37Packages.pytestcov
python37Packages.pytestrunner
python37Packages.simplejson
python37Packages.webencodings
python38Packages.Babel
python38Packages.alabaster
python38Packages.apipkg
python38Packages.async_generator
python38Packages.backcall
python38Packages.cffi
python38Packages.chardet
python38Packages.click
python38Packages.cryptography
python38Packages.entrypoints
python38Packages.execnet
python38Packages.flake8
python38Packages.flaky
python38Packages.fontforge
python38Packages.freezegun
python38Packages.gflags
python38Packages.google_apputils
python38Packages.gunicorn
python38Packages.html5lib
python38Packages.hypothesis
python38Packages.iso8601
python38Packages.isort
python38Packages.jdcal
python38Packages.jinja2
python38Packages.junit-xml
python38Packages.libevdev
python38Packages.mccabe
python38Packages.psutil
python38Packages.py-cpuinfo
python38Packages.pyasn1-modules
python38Packages.pyftpdlib
python38Packages.pygments
python38Packages.pyopenssl
python38Packages.pyroma
python38Packages.pytest (python38Packages.pytest_5)
python38Packages.pytest-asyncio
python38Packages.pytest-benchmark
python38Packages.pytest-expect
python38Packages.pytest-flake8
python38Packages.pytest-forked
python38Packages.pytest-mock
python38Packages.pytest-relaxed
python38Packages.pytestCheckHook
python38Packages.pytest_xdist (python38Packages.pytest_xdist_1)
python38Packages.pytestcache
python38Packages.pytestcov
python38Packages.pytestrunner
python38Packages.requests
python38Packages.responses
python38Packages.service-identity
python38Packages.simplejson
python38Packages.sphinx
python38Packages.sshpubkeys
python38Packages.text-unidecode
python38Packages.urllib3
python38Packages.validators
python38Packages.webencodings
python38Packages.whoosh
shared-mime-info
tarsnapper
wayland
wayland-protocols
xlibsWrapper (xorg.xlibsWrapper)
xorg.libXft

3 suggestions:

warning: maintainers-missing
Package does not have a maintainer. Consider adding yourself?
Near pkgs/development/python-modules/Pygments/default.nix:35:5:
   |
35 |     maintainers = with lib.maintainers; [ ];
   |     ^

warning: missing-patch-comment
Please add a comment on the line above, explaining the purpose of this patch.
Near pkgs/development/python-modules/Pygments/default.nix:18:5:
   |
18 |     (fetchpatch {
   |     ^

warning: python-include-tests
Consider adding a checkPhase for tests, or if not feasible, pythonImportsCheck.
Near pkgs/development/python-modules/Pygments/default.nix:33:0:
   |
33 |     description = "A generic syntax highlighter";
   | ^

if the 2.5 bump doesn't have breaking changes, I would much rather just take that.

Between 2.6.1 and 2.7.4 there are a lot of "updated lexers", it's hard to know what lies behind all of those.
There is a

Deprecated JsonBareObjectLexer ...

in there

if the 2.5 bump doesn't have breaking changes, I would much rather just take that.

Not sure what the "2.5 bump" means. We have 2.5 as the last version with python2 support. We either backport that patch or mark it as vulnerable IMO.

sorry, I meant a non breaking bump. I'm also okay with a patch.


Devel clean code

Code cleanup, pedal-based arm position update, and StreamDeck integration

Performed a thorough code cleanup to improve readability and maintainability
Added option to send command through a Pedal  to allow arm position updates
Added option to send commands through a StreamDeck for enhanced control flexibility
Included STL and FreeCAD files necessary for constructing the robot arms
Added comprehensive documentation to clarify usage and setup
Fixed some bugs to improve system stability

I think it is OK to keep it open until we are satisfied and we merge at the end.


Fixed ghc lib dir lookup via stack for system installed ghc.

See #42 for a simpler fix.

Thanks, can you merge master back into your fork? I added ghc 8.0.1 tests


Update the readme with AdGuard example

https://github.com/AdguardTeam/FiltersRegistry/pull/752

https://github.com/DeepSpaceHarbor/Macedonian-adBlock-Filters/pull/12


Question: please help with code

Consider following database model:
Person
    name Text
    deriving Show
Order
    number Int
    creator PersonId
    executor PersonId Maybe
    deriving Show

I want to get a list of oreders created by current user and show executor name if it present. How should I write correct esqueleto
function?
I tried this, but it's not work:
getOrders :: Handler [(E.Value Int, E.Value (Maybe T.Text))]
getOrders = runDB $ E.select
    $ E.from $ \(order `E.LeftOuterJoin` mayExec) -> do
        E.on $ order ?. OrderExecutor E.==. E.just (mayExec ^. PersonId)
        return ( order ^. OrderNumber, mayExec ?. PersonName )

hi @meteficha,
I have the same problem like @geraldus,
qryStrainsList ::  SqlBackend -> IO [RawWeedsInfo]
qryStrainsList backend = (flip runReaderT) backend
    $ select
    $ from $ \(strains `LeftOuterJoin` strainsInfo) -> do
        on $ just (strains ^. StrainsId) ==.  strainsInfo ?. StrainsAdditionalInformationStrainId
        return ( strains   ^. StrainsId
                , strains   ^. StrainsName
                , strains ^. StrainsStrainType
                , strains ^. StrainsDescription
                , strainsInfo ?. StrainsAdditionalInformationIncludeType
                , strainsInfo ?. StrainsAdditionalInformationExcludeType
                , strainsInfo ?. StrainsAdditionalInformationSymptoms
                , strainsInfo ?. StrainsAdditionalInformationConditions
                , strains ^. StrainsFlavor
                , strains ^. StrainsThcLevel
                , strains ^. StrainsCbdLevel
                , strains ^. StrainsPhotoPeriod
                , strains ^. StrainsBreeders
          )

But the error is this:
 No instance for (Database.Esqueleto.Internal.Sql.SqlSelect
                   (SqlExpr (Database.Esqueleto.Value (Maybe Text)))
                   (Database.Esqueleto.Value Text))
  arising from a use of select

Your definition of RawWeedsInfo is wrong.  If you use ?., then you need Value (Maybe Text).  Even better yet, use return (strains, strainsInfo).

@meteficha - here it is
type RawWeedsInfo =
  ( Value StrainsId
  , Value Text
  , Value Text
  , Value Text
  , Value (Maybe Text)
  , Value (Maybe Text)
  , Value (Maybe Text)
  , Value (Maybe Text)
  , Value Text
  , Value Text
  , Value Text
  , Value Text
  , Value Text
  )

@MonrealRyan Probably one of the fields you're getting with ^. is of type Maybe Text, then.

@meteficha - here is my model.
Strains
    strainTypeId StrainsTypeId Maybe
    name Text
    description Text Maybe
    flavor Text Maybe
    thcLevel Text Maybe
    cbdLevel Text Maybe
    breeders Text Maybe
    strainType Text Maybe
    photoPeriod Text Maybe
    createdOn UTCTime default=now()
    updatedOn UTCTime Maybe
    deriving Show Generic
StrainsAdditionalInformation
    strainId StrainsId
    includeType Text Maybe
    excludeType Text Maybe
    symptoms Text Maybe
    conditions Text Maybe
    relatedStrains StrainsId Maybe
    deriving Show Generic

@meteficha - i fix the issue. but how come the StrainsId, returns in "strains\".\"\"

@geraldus - hi how did you solve that problem. im using also FpComplete. and my esqueleto version is 2.0.1.

@MonrealRyan Hi!  Unfortunately, I've broken that project using git shell long ago, and it is not possible to recover it.  But can you try specify another version of esqueleto in section Extra Packages of project settings?  I guess it is possible to specify to use esqueleto from Hackage, but I'm not certain.


[$1000] On request money report clicking the down arrow on options to pay with expensify hides the entire button

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Login to ND (account should have permission to pay with Expensify)
Navigate to any request money report (if there is non then on user A request money to user B then login to user B to access request money report)
On request money report there should be a drop down button -> click on down arrow
Notice the dropdown option hides the pay with expensify button

Expected Result:
On opening the drop menu should not hide the button
Actual Result:
On opening the drop menu it hides the entire button
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android / native
[ ] Android / Chrome
[ ] iOS / native
[ ] iOS / Safari
[x] MacOS / Chrome / Safari
[x] MacOS / Desktop

Version Number: 1.3.41-2
Reproducible in staging?:  Needs reproducion (Pay with expensify only for USD)
Reproducible in production?: Needs reproduction
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
https://github.com/Expensify/App/assets/43996225/afa61ddf-a7f0-4452-acf0-b13586f4e88d
Expensify/Expensify Issue URL:
Issue reported by: @dhairyasenjaliya
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1689595589459449
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~01f871dc05dbdb8459
Upwork Job ID:<PHONE_NUMBER>314084864
        2023-07-27Automatic offers:

situchan | Reviewer | 25854538
Nikhil-Vats | Contributor | 25854540
dhairyasenjaliya | Reporter | 25854542

Proposal
Please re-state the problem that we are trying to solve in this issue.
On request money report clicking the down arrow on options to pay with expensify hides the entire button
What is the root cause of that problem?
The root cause is we are passing wrong vertical anchorAlignment on ButtonWithDropdownMenu that makes menu to over laps with button and hide under it
What changes do you think we should make in order to solve the problem?
We need to pass correct vertical``anchorAlignment that shows menu on bottom of the button without hiding that
Currently we are passing ANCHOR_ORIGIN_VERTICAL.BOTTOM instead of that ew just need to pass ANCHOR_ORIGIN_VERTICAL.TOP on below line
https://github.com/Expensify/App/blob/25c8ae5212f433ea7679ba4bd040c79f151a282a/src/components/ButtonWithDropdownMenu.js#L122
What alternative solutions did you explore? (Optional)
N/A

Asking in the Slack threadabout reproduction.

Proposal
Please re-state the problem that we are trying to solve in this issue.
In IOU Report, when caret/arrow/dropdown button is clicked in settlement button in header, the main button gets hidden behind the popover menu.
What is the root cause of that problem?
We are using the wrong vertical alignment for the popover menu here. It should be TOP not BOTTOM.
https://github.com/Expensify/App/blob/9508dfafb2c666893df65acc1289ff37839406cc/src/components/ButtonWithDropdownMenu.js#L122
Also, there is no padding here which we are using on other pages -
https://github.com/Expensify/App/blob/9508dfafb2c666893df65acc1289ff37839406cc/src/components/KYCWall/BaseKYCWall.js#L72
What changes do you think we should make in order to solve the problem?
We need to change line 122 to -
vertical: CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.TOP,

Also, to add the consistent padding of 8px, we need to change line 69 from -
https://github.com/Expensify/App/blob/9508dfafb2c666893df65acc1289ff37839406cc/src/components/ButtonWithDropdownMenu.js#L67-L70
vertical: y + h + 8,

We should make a constant for this 8px in CONST.js and then use it here and in other files.
Design team provided there approval on this 8px padding here.
What alternative solutions did you explore? (Optional)
NA

Result -

Current state -

Position changed Without padding -

Position changed with padding -

I was able to reproduce this and it's definitely a bug!

There are cases where BOTTOM is needed. i.e. ReportPreview.
So no satisfactory proposals yet.

ok, that's just an example. What about MoneyRequestConfirmationList?
It shows button at the footer so dropdown menu might be overlapped with window bottom edge

Yeah, I think it's fine because it's still a dropdown menu, we just happen to show it above the button instead of on-top or below.

@situchan mind checking on @Nikhil-Vats's updated proposal?

@Nikhil-Vats thanks for considering padding. proposal looks good to me.
🎀 👀 🎀 C+ reviewed

FYI: We've closed https://github.com/Expensify/App/issues/22505 as a dupe of this issue. Let's make sure the solution extends to the ThreeDotsMenu as well

The PR was ready to merge within 3 days, but I was OOO. Bonus should apply.

Paid @dhairyasenjaliya $250 for the bug report
Paid @Nikhil-Vats $1500 as the Contributor (with efficiency bonus 🎉 )

@Nikhil-Vats as soon as you finish the BugZero checklist I can complete your payment as well. Thanks!

No PR caused regression. I'd say this is minor UI improvement than bug so no regression test is needed

Thanks @situchan! I completed payment via Upwork.


yarn add netlify-cli fails with "JavaScript heap out of memory"

Describe the bug
Starting from some time within the past 24 hours, yarn add netlify-cli@latest started failing with "JavaScript heap out of memory". This happens on ubuntu 20.04 on GitHub Actions (see my simple repro repo: https://github.com/zmwangx/netlify-cli-ghactions/runs/4479854634), as well as on local macOS dev machine with ample RAM.
npm install netlify-cli doesn't seem to suffer from this problem, and RAM usage doesn't balloon.
To Reproduce

yarn add netlify-cli.

Configuration
N/A.
Expected behavior
yarn add netlify-cli succeeds.
CLI Output
See this test GitHub Actions run that does nothing other than yarn add netlify-cli: https://github.com/zmwangx/netlify-cli-ghactions/runs/4479854634.

yarn's error dump
...
<--- Last few GCs --->

[1566:0x571e060]    72710 ms: Scavenge 2024.2 (2078.9) -> 2021.0 (2079.9) MB, 10.4 / 0.0 ms  (average mu = 0.368, current mu = 0.345) allocation failure
[1566:0x571e060]    72730 ms: Scavenge 2025.5 (2079.9) -> 2022.8 (2082.9) MB, 7.1 / 0.0 ms  (average mu = 0.368, current mu = 0.345) allocation failure
[1566:0x571e060]    72783 ms: Scavenge 2028.4 (2082.9) -> 2025.4 (2100.7) MB, 23.0 / 0.0 ms  (average mu = 0.368, current mu = 0.345) allocation failure

<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
 1: 0xb02ec0 node::Abort() [node]
 2: 0xa181fb node::FatalError(char const*, char const*) [node]
 3: 0xced88e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
 4: 0xcedc07 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
 5: 0xea5ea5  [node]
 6: 0xeb557d v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
 7: 0xeb827e v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
 8: 0xe796aa v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
 9: 0x11f2e86 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
10: 0x15e7879  [node]
/home/runner/work/_temp/d7867e80-8109-416e-9615-2c70737cb77e.sh: line 1:  1566 Aborted                 (core dumped) yarn global add netlify-cli

Additional context
I tried installing older versions of netlify-cli, including even v6.0.0, same issue. But this issue only started happening in my CI builds some time within the last 24 hours, so it's probably some dependency that's causing the problem. I'm not sure how to pin it down though.

Oh this is a dupe of the confusingly titled #3788...

Yup, we see it too since yesterday night!

Thank you @zmwangx and @kirillgroshkov, closing in favor of https://github.com/netlify/cli/issues/3788 (update the title for that issue)


Updated twitter logo to new X logo

Description
updated twitter logo to new one
Fix   #1539
Type of PR

[x] Bug fix
[ ] Feature enhancement
[ ] Documentation update
[ ] Other (specify): _______________

Screenshots / videos (if applicable)
Before:

After:

Checklist:

[x] I have made this change from my own.
[x] I have taken help from some online resources.
[x] My code follows the style guidelines of this project.
[x] I have performed a self-review of my own code.
[ ] I have commented my code, particularly in hard-to-understand areas.
[ ] I have made corresponding changes to the documentation.
[ ] My changes generate no new warnings.
[x] I have tested the changes thoroughly before submitting this pull request.
[x] I have provided relevant issue numbers and screenshots after making the changes.

@biswajit-sarkar-007  Great contribution ! 🎉


fix: update dependencies, some major, fixes #42

Security updates. I ran the tests and everything seemed good.

Are these versions still a concern @jonschlinkert et al?

I'm more curious what security updates we're getting. AFAIK, the only thing is mocha, which is a devDependency and hardly a security concern for this library.

Good q:
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>
More: https://snyk.io/vuln/npm:braces:20180219


Child resource templates should have rdfClass in the state

Currently if you select resourceTemplate:bf2:Monograph:Work.  Then the title sub-template does not have a rdfClass in the Redux state.

The problem with this is that, the resourceURI doesn't seem to be present in the propertyTemplate.


Feature Suggestion - Auto-loading Last Chat Aeolus History in FAF Client

Feature Suggestion:
By automatically loading the last chat history from Aeolus on startup, this will enhance the user experience by providing instant access to recent conversations.
The Message History Size is 500 by default; It would be a nice addition to use that value to autoload the last messages until the size is reached.

This is already the case client side.The chat server just has to be configured to send the history on join

And now the server has been reconfigured. Although restarting it for now also wipes out all the history XD


Use native transitions for sidebar

Summary
Uses native transitions for sidebar
Library does have nativeTranstion prop
https://github.com/react-native-community/react-native-drawer-layout/blob/69d70f00585bc8ccbaeb824f88aa3f205bd0922e/src/DrawerLayout.js#L36
But sets to false by default.
https://github.com/react-native-community/react-native-drawer-layout/blob/69d70f00585bc8ccbaeb824f88aa3f205bd0922e/src/DrawerLayout.js#L73
So passing down true here
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

[x] Has UI changes

Device Information
This PR was tested on: [Android and Ios emulators]
Screenshots
Should have better results on real environment with traffic
Before

After

Build Apps for PR label detected. Will generate the app if build succeeds (checks pass and no conflicts with base branch).

Android build App: https://releases.mattermost.com/mattermost-mobile-pr/PR-2278/PR-2278.apk
iOS build App: itms-services://?action=download-manifest&url=https://releases.mattermost.com/mattermost-mobile-pr/PR-2278/PR-2278.plist

Tested the PR on my iPhone and it looks good

@hmhealey No i was just checking some perf issues and came across this.

Can you create one so that QA know to double check that this doesn't cause any issues?

Tested on android and it looks good to me.

@hmhealey Created ticket for it


How to call a custom action from another custom action

Rasa Core version: 0.9.6
Python version: 3.6.5
Operating system (windows, osx, ...): OSX
Issue:
I have a custom action called ActionUpdate that should only occur when a user responds to an utterance (utter_ask_on_time) that is sent in another action called ActionDailyCheckIn with the intent "affirm".
Would this be the correct way to implement this functionality?:
class ActionDailyCheckIn(Action):
    def name(self):
        return 'action_trigger_daily_check_in'

    def run(self, dispatcher, tracker, domain):
        """
        Sends user a daily check in utterance

        :param dispatcher:
        :param tracker:
        :param domain:
        :return:
        """
        dispatcher.utter_template("utter_ask_on_time", tracker.get_slot('weekly_goal'))
        if tracker.latest_message.intent["affirm"]:
            ActionUpdate.run()
        return[]

Or should I be inserting something like ActionListen right after the dispatcher.utter_template("utter_ask_on_time", tracker.get_slot('weekly_goal')) line?
Content of domain file (if used & relevant):

It is always the job of your Policy to select actions to run. So if you want a sequence of actions, this needs to be reflected in your story, e.g.:
* some_intent
   - action_daily_checkin
* affirm
   - action_update

and you probably also want a story for the deny case:
* some_intent
   - action_daily_checkin
* deny
   - action_other

@amn41
Can I just write the story as...

some_intent

action_daily_checkin
action_update

(i.e. 2 consecutive actions?)
Or, is it mandatory to have bot/human interaction alternatively at each and every step?

what you write is perfectly valid - you can have many steps in between utterances

Thanks! I'll just add more stories.


454 Add tests for save_result in results_io.h

Merge Request - GuideLine Checklist
Guideline to check code before resolve WIP and approval, respectively.
As many checkboxes as possible should be ticked.
Checks by code author:
Always to be checked:

[x] There is at least one issue associated with the pull request.
[x] The branch follows the naming conventions as defined in the git workflow.
[x] New code adheres with the coding guidelines
[x] Make sure that the pre-commit linting/style checks pass.
[x] No large data files have been added to the repository. Maximum size for files should be of the order of KB not MB. In particular avoid adding of pdf, word, or other files that cannot be change-tracked correctly by git.

If functions were changed or functionality was added:

[x] Tests for new functionality has been added
[x] A local test was succesful

If new functionality was added:

[ ] There is appropriate documentation of your work. (use doxygen style comments)

If new third party software is used:

[ ] Did you pay attention to its license? Please remember to add it to the wiki after successful merging.

If new mathematical methods or epidemiological terms are used:

[ ] Are new methods referenced? Did you provide further documentation? Has the glossary been updated?

The following questions are addressed in the documentation if need be:

[ ] Developers (what did you do?, how can it be maintained?)

[ ] For users (how to use your work?)

[ ] For admins (how to install and configure your work?)

For documentation: Please write or update the Readme in the current working directory!

Checks by code reviewer(s):

[ ] Is the code clean of development artifacts e.g., unnecessary comments, prints, ...
[ ] The ticket goals for each associated issue are reached or problems are clearly addressed (i.e., a new issue was introduced).
[ ] There are appropriate unit tests and they pass.
[ ] The git history is clean and linearized for the merge request. All reviewers should squash commits and write a simple and meaningful commit message.
[ ] Coverage report for new code is acceptable.
[ ] No large data files have been added to the repository. Maximum size for files should be of the order of KB not MB. In particular avoid adding of pdf, word, or other files that cannot be change-tracked correctly by git.

Closes #454

Codecov Report
Patch coverage has no change and project coverage change: +0.82 :tada:

Comparison is base (4d1af3a) 92.24% compared to head (4cf9431) 93.07%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #592      +/-   ##
==========================================
+ Coverage   92.24%   93.07%   +0.82%
==========================================
  Files          93       93
  Lines        7290     7290
==========================================
+ Hits         6725     6785      +60
+ Misses        565      505      -60

Impacted Files
Coverage Δ

cpp/memilio/io/result_io.h
100.00% <ø> (+87.69%)
:arrow_up:

... and 4 files with indirect coverage changes
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Markdown support

Is it possible to add support for Markdown?
If it is already supposed to work, please tell me and I will remove this issue but it does not allow me to browse my headers etc. when other plugins such as symbols-outline do. Thank you!

I found the issue, no problem with the plugin


Creating flake8.yml file and updating Pipfile and Pipfile.lock

If apllied it will aoutomate the flake8 tool to check code that submitted to new PRs

please rebase, because I already merged the flake.yml file

Can you please edit the title as well?


Index out of range exception

Hi,
I  get an IndexOutOfRangeException in the following line:
} while(rest[end] == '"');

The line is part of the following block:
     if (isQuoted)
    {
        end = 0;
        var oldEnd = end;
        do{
            if(end>0) {
                replaceDoubleQuotes = true;
            }
            oldEnd = end;
            end = rest[(oldEnd + 1)..].IndexOf(quoteSymbol) + 2 + oldEnd;
        } while(rest[end] == '"');
    }

The reason for this error is a CSV file whose last line doesn't end with a newline character (CR and/or LF).

I'm not sure if I can look at this the next days.
I assume this could be a fix:
  if (isQuoted)
    {
        end = 0;
        var oldEnd = end;
        do{
            if(end>0) {
                replaceDoubleQuotes = true;
            }
            oldEnd = end;
            end = rest[(oldEnd + 1)..].IndexOf(quoteSymbol) + 2 + oldEnd;
            // Actually break the outer loop
            if(end>rest.end){
              break;
            }
        } while(rest[end] == '"');
    }

Or you could use } while (end <= rest.end && rest[end] == '"');


Does routine load will make oom?

These days, I tried to load data to doris from kafka. I created a routine load and I wrote some data to kafka. Then I saw the status of load is RUNNING, and I can execute query from the destination table. Because it is just test, so I just wrote about 200,000 rows, and I didn't stop the routine load. Actually, when 200,000 rows load finished, there is no other data for 'routine load job' to consume, and I didn't stop the 'routine load job'.
The next day, I found BE down. Then I looked over the BE log and I saw a lot of 'kafka consume timeout: xxxxxxxx-xxxxxxxx', and there is an oom error in dmesg, and BE was killed because of oom.
So, does routine load will make oom when there is no other data in kafka for 'routine load job' to consume? Should I stop the routine load when there is no data to kafka to avoid this error?

What's the version of your Doris BE?
And there should be no memory leak even if you didn't stop your routine load job.
Can you provide more information? And if you start BE again, does its memory increase?

kafka consume timeout: xxxxxxxx-xxxxxxxx will apear when there is no data to consume, and that is normal.
It should not make OOM exception. Can you reproduce it ?

@imay @morningman Hi, thanks for reply. I just saw your message. I had restarted BE and started a new ROUTINE LOAD and reset the properties of ROUTINE LOAD. Until now the memory is normal, I will observe it for a while.

@XShun If you find memory is abnormal, you can refer this page to look into memory usage.

@imay Hi, the page is 404.

@imay Hi, the page is 404.

update


custom_check: Avoid use of assert to avoid confusion with assert.equal.

This PR bans the use of assert and replaces it
with assert.ok to avoid confusion with assert.equal.
Fixes #18687.
This replaces every assert with assert.ok except,
frontend_tests/puppeteer_tests/settings.ts
177:    assert(common.get_text_from_selector(page, name_field_selector), "Bot 1");
--------------------------------------------------------------------------------
201:    assert(common.get_text_from_selector(page, name_field_selector), "Bot one");

As this would be removed in https://github.com/zulip/zulip/pull/18744.

Testing plan:
Tested by running node tests and puppeteer tests.
GIFs or screenshots:
Example of the error message,

Merged, thanks @Riken-Shah!

This actually wasn’t checking the Puppeteer tests due to #18784, which is why it didn’t fail before #18744 was merged.


Fixed broken favicon and apple-touch-icon links.

Moved favicon.ico and apple-touch-icon.png to the content/media/images directory and edited layout/base.j2 to reflect these changes.

Thanks @bheesham.

Glad to help! :-D


[HW]

Name: Anisha Shruti A.T
Email<EMAIL_ADDRESS>Linkedin Profile: https://www.linkedin.com/in/anisha-shruti-a-t-72a409202
Attach the homework screenshots below for both step II and Step III:

Executing CRUD operation

Cassandra Data Modeling

Cassandra Query Language

Great job Anisha, thank you.

https://api.badgr.io/public/assertions/gsdS9vfNSRyByPmvTwmkjQ?identity__email=anishashruti.at%40gmail.com


feat: add includRecentGuildActivity param to guild fetch

:tada: This PR is included in version 1.4.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket: