Claudia requires aws-sdk dependency, AWS does not

Expected behaviour:

Claudia should create or update a function that uses aws-sdk without it being installed in node_modules, especially when using the --use-local-dependencies flag.
Lambda provides this dependency as part of the environment, so not installing it saves lambda disk space, and this practice is encouraged by Amazon. Clauda should not require that it is installed.

What actually happens:

Error: Cannot find module 'aws-sdk'
    ...
cannot require ./lambda after clean installation. Check your dependencies.

Steps to reproduce the problem:

Use aws-sdk as a devDependency, and try to update.

Claudia uses its dependencies locally, and you should not include Claudia as a production dependency, only as a development one. Claudi Bot builder does not use aws-sdk, so it does not need it.
If your code requires aws-sdk, and you do not want to deploy it, use it as an optional dependency (npm install aws-sdk -O) and then deploy using --no-optional-dependencies, this will exclude AWS SDK from the final package.
--use-local-dependencies just copies whatever you have locally. It's your job then to make sure development dependencies are not installed.

--use-local-dependencies just copies whatever you have locally. It's your job then to make sure development dependencies are not installed.

Yea, that's my problem. Dev dependencies are not installed, and claudia throws an error. It shouldn't do that.

Claudia is trying to load your lambda.js module, so something there is requiring aws-sdk. Try loading it from the node console to see exactly what.

My code is loading the aws-sdk, and it isn't there because it doesn't need to be there. It will run once it is in AWS Lambda, because that specific dependency is provided as part of the environment. You are not supposed to install it with the lambda, it is a waste of disk space.

The following libraries are available in the AWS Lambda execution environment, regardless of the supported runtime you use, so you don't need to include them:
ImageMagick – Installed with default settings.
AWS SDK – AWS SDK for JavaScript version 2.6.3

OK. this is expected behaviour (--local-dependencies are not intended to be used with --no-optional-dependencies, this is to allow people to manually package binaries etc). AWS SDK is not removed by default so users can control the version of the AWS SDK deployed with the package.
Once I fix the .npmrc problem you reported, I assume you'll just be able to use --no-optional-dependencies and exclude aws-sdk and imagemagick if you want.

I don't think this should be expected behavior. Amazon has made specific exceptions for this rather large dependency so that developers can reduce disk space usage. Claudia should make a similar exemption.

it does make the exception, you can exclude it with --no-optional-dependencies. but claudia needs to load your lambda module to validate the package, without it it can't work. force-removing aws-sdk is too complicated, because of transitive dependencies.

So in order to validate the package it must ensure that something that doesn't need to be there is there? I don't think that's a very developer-friendly solution. It might be difficult to get around, but I am sure there is a way. You could provide a stub or Claudia's version of the sdk. You should be validating that the package will work in lambda (it will), not that it works locally.

as I mentioned in the other comment, you can achieve what you want by using aws-sdk as an optional dependency (npm install aws-sdk -O) and deploy with --no-optional-dependencies), but not mix it with --use-local-dependencies. I assume the problem with .npmrc is blocking you at the moment, but I'll fix that soon (and you can work around it by using your user-home-dir .npmrc)

That's the issue though, I want to --use-local-dependencies because its more efficient and deterministic than letting Claudia re-install everything.
You are telling me that if I want to --use-local-dependencies, that claudia does not and will not allow me to work without an optional dependency that Amazon encourages everyone to ignore.
You are saying that the best practices used by Amazon are exclusive to the best practices used by Claudia. That's a big deterrent to using Claudia.

If you aren't going to fix this, will you provide a flag to skip validation? I don't see another way to use this tool.

if you are using the claudia api builder or bot builder, your lambda function needs to be loaded so claudia can get the configuration. skipping validation won't make a difference in that case. we can skip validation for event-driven services.

I don't understand your comment. What configuration are you getting by loading the lambda locally? Shouldn't the claudia.json contain all the info needed to deploy?

if you're using claudia api builder or bot builder, the api definitions are in the code, so claudia needs to load your lambda module to read the configuration. if you're not using api builder or bot builder, this is not needed and we can skip validation with a flag

Oh, gotcha. Well, looks like I can't use this then. Thanks for the explanation.

if you lazy-load aws-sdk (eg inside a function, not in the requires at the start of a file), then it will not be required for loading the module, so you can achieve exactly what you want, use local deps and still not include aws-sdk. claudia just needs to load the module to get the config out, it does not need to execute it.

I'm sure there are several solutions I as an app developer can implement to make a Lambda claudia-complaint. My point was that claudia should be able to handle any lambda that runs in AWS. There shouldn't be claudia-specific constraints. Its your tool and you can decide that this case is too much work for Claudia to try to tackle.

WHY USE CLAUDIA?
AWS Lambda and API Gateway are incredibly flexible, but they can be tedious to set up, especially for simple scenarios. Running Node.js functions requires you to iron out quite a few quirks, that aren't exactly well documented. Claudia automates all those steps for you.

You might want to reword your mission statement though.

Hello! Not sure if I'm doing it wrongly, but here is a use-case that should imho work differently:
mkdir test
cd test
nvm use 12.13.0
npm init -f
npm i -D claudia
npm i -S claudia-api-builder
npm i -O aws-sdk
npx claudia pack --no-optional-dependencies

Resulting zip file is 8.5Mb, in includes aws-sdk in node_modules.
Here is package.json for reference:
{
  "name": "test",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "claudia": "^5.11.0"
  },
  "dependencies": {
    "claudia-api-builder": "^4.1.2"
  },
  "optionalDependencies": {
    "aws-sdk": "^2.594.0"
  }
}

I also noticed that there are two 'npm install' commands in the output, one without --no-optional.
Moreover, if I run
npx claudia pack --no-optional-dependencies --force

after that, the existing zipfile will be included in the new zipfile, resulting size is 17Mb.

can you please try wiping out your node_modules dir and then run
npm i --production --no-optional
and let me know if your node_modules has aws-sdk

after that, the existing zipfile will be included in the new zipfile, resulting size is 17Mb.

that's because you don't have a files section set in package.json, so claudia thinks the whole local directory needs to be packaged.

@gojko node_modules does contain aws-sdk after wiping node_modules and running npm i --production --no-optional
Here is the list of directories in node_modules:
aws-sdk
base64-js
buffer
claudia-api-builder
events
ieee754
isarray
jmespath
punycode
querystring
sax
url
uuid
xml2js
xmlbuilder

I wonder if this use-case is reproducible on your box.

@vbichkovsky I think that's a bug with NPM then, it's not really in scope of Claudia to solve it. We have to rely on NPM to package the right dependencies. Perhaps submit that as a bug report there?

try yarn maybe instead of npm

Put this as package.json in an empty directory

{
  "name": "claudiaawsexclude",
  "version": "0.0.0-experiment.0",
  "description": "Check whether claudia ignores aws-sdk",
  "optionalDependencies": {
    "aws-sdk": "^2.612.0"
  },
  "dependencies": {
    "js-yaml": "^3.13.1"
  },
  "devDependencies": {
    "claudia": "^5.12.0"
  }
}

run npm install --no-optional: aws-sdk is not in node_modules

start over, and pack

> rm -Rf node_modules/ package-lock.json
> npm install
> npx claudia pack --no-optional-dependencies

Inspect the .zip: aws-sdk is in node_modules
> node --version
v13.5.0
> npm --version
6.13.4

@jandockx can you please try npm install --production --no-optional instead of npm install --no-optional. my machine with your package actually includes claudia in node_modules, and aws_sdk within it, totally wrong. I still think it's a NPM bug.

> ls -al
total 24
drwxr-xr-x   4 jand  staff   128 Feb  6 15:41 .
drwxr-xr-x  19 jand  staff   608 Feb  6 09:15 ..
-rw-r--r--@  1 jand  staff  6148 Feb  6 09:41 .DS_Store
-rw-r--r--@  1 jand  staff   289 Feb  6 09:34 package.json
> npm install --production --no-optional
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN<EMAIL_ADDRESS>No repository field.
npm WARN<EMAIL_ADDRESS>No license field.

added 178 packages from 102 contributors and audited 358 packages in 5.097s
found 0 vulnerabilities

> ls -al node_modules/
total 0
drwxr-xr-x   8 jand  staff  256 Feb  6 15:41 .
drwxr-xr-x   6 jand  staff  192 Feb  6 15:41 ..
drwxr-xr-x   5 jand  staff  160 Feb  6 15:41 .bin
drwxr-xr-x   8 jand  staff  256 Feb  6 15:41 argparse
drwxr-xr-x   3 jand  staff   96 Feb  6 15:41 claudia
drwxr-xr-x   8 jand  staff  256 Feb  6 15:41 esprima
drwxr-xr-x  10 jand  staff  320 Feb  6 15:41 js-yaml
drwxr-xr-x  12 jand  staff  384 Feb  6 15:41 sprintf-js

Indeed, an unwanted claudia. But still no aws-sdk.

@jandppw aws-sdk is under claudia in this case, in claudia/node_modules

> ls -al node_modules/
total 0
drwxr-xr-x   8 jand  staff  256 Feb  6 16:24 .
drwxr-xr-x   6 jand  staff  192 Feb  6 16:24 ..
drwxr-xr-x   5 jand  staff  160 Feb  6 16:24 .bin
drwxr-xr-x   8 jand  staff  256 Feb  6 16:24 argparse
drwxr-xr-x   3 jand  staff   96 Feb  6 16:24 claudia
drwxr-xr-x   8 jand  staff  256 Feb  6 16:24 esprima
drwxr-xr-x  10 jand  staff  320 Feb  6 16:24 js-yaml
drwxr-xr-x  12 jand  staff  384 Feb  6 16:24 sprintf-js

> npm list js-yaml
<EMAIL_ADDRESS>/Users/jand/Scratchpad/tmp/claudiaawsexclude
└──<EMAIL_ADDRESS>
> npm list sprintf-js
<EMAIL_ADDRESS>/Users/jand/Scratchpad/tmp/claudiaawsexclude
└─┬<EMAIL_ADDRESS>  └─┬<EMAIL_ADDRESS>    └──<EMAIL_ADDRESS>
> npm list argparse
<EMAIL_ADDRESS>/Users/jand/Scratchpad/tmp/claudiaawsexclude
└─┬<EMAIL_ADDRESS>  └──<EMAIL_ADDRESS>
> npm list esprima
<EMAIL_ADDRESS>/Users/jand/Scratchpad/tmp/claudiaawsexclude
└─┬<EMAIL_ADDRESS>  └──<EMAIL_ADDRESS>
> npm list claudia
<EMAIL_ADDRESS>/Users/jand/Scratchpad/tmp/claudiaawsexclude
└── (empty)

> npm list aws-sdk
<EMAIL_ADDRESS>/Users/jand/Scratchpad/tmp/claudiaawsexclude
└── UNMET OPTIONAL DEPENDENCY<EMAIL_ADDRESS>
I agree npm is doing incomprehensible stuff here. It should not have included claudia (but it didn't include aws-sdk).
node_modules/claudia/node_modules is quite large. But:
> ls -al node_modules/claudia/node_modules/aws-sdk
ls: node_modules/claudia/node_modules/aws-sdk: No such file or directory

BTW, claudia is also included with npm install --production, and then the aws-sdk is there too.
I don't see how this can result in claudia including aws-sdk in the package, but you know your code better, obviously.

I agree with @kyeotic here. For me, it's been a case with ioredis package, where Claudia tries to validate it , because it's trying to run the api on local. For it to work, in another tab, I've to stop/start Redis multiple times, until Claudia gets to go to the next step. This is extremely annoying, because even with me toggling Redis on/off, sometimes it takes a long time for Claudia to get to the next step.
The validation code is in this file: /Users/<username>/.nvm/versions/node/v13.2.0/lib/node_modules/claudia/src/tasks/validate-package.js (or similar) I'm just going to do return dir; at the top of the function to completely avoid package validation. @gojko Will doing so have any side-effects? Is there any other place where it tries to do validation? Both create and update use the same validate-package.js file, so I'm assuming this'll remove the validation part. Is that correct?
Claudia is great, but it really needs the skip-validation flag.

@kandarpdave claudia can't work if it cannot load the api module, since the configuration of the api is in that module. validation itself is not so much of a problem, but the API module has to be instantiatable inside the context when claudia is deploying. I suggest lazy-loading the redis connection when you actually need it, and not in the global module config

Trying to understand why the API module has to be instantiatable. Can you explain? Why can't Claudia just deploy if the handler (and everything else needed for lambda) has been created already? It looks like the validation step "starts" the module. Would removing the step and having return dir; at the top of the function have any side-effects?

(Because someone else might want to figure out where claudiaJS is installed on their machine, run command -v claudia and it'll print a path possibly to the shortcut, and from there you can get to the original location where claudia is installed. On my another machine, it's at /Users/<username>/.config/yarn/global/node_modules/claudia/bin/cmd.js)

@kandarpdave api configuration (your routes, handler details etc) are in the module; claudia needs to load the module to read out the configuration.


disable_eager_execution with keras.Model fail

hi, when i want to disable eager mode and use keras  module:
 tf.compat.v1.disable_eager_execution();
...
keras.Model(inputs, outputs, "name");

however, it turns out throw a exception
ystem.NullReferenceException: Object reference not set to an instance of an object.
   at Tensorflow.Graphs.SubGraphUtility.lift_to_graph(Tensors init_tensors, FuncGraph graph, List`1 sources, Boolean add_sources, Boolean handle_captures, Graph base_graph, Dictionary`2 op_map)
   at Tensorflow.Keras.BackendImpl.eval_in_eager_or_function(Tensors outputs)
   at Tensorflow.Keras.Utils.base_layer_utils.<>c__DisplayClass5_1.<CreateKerasHistoryHelper>b__0(NameScope <p0>)
   at Tensorflow.Binding.tf_with[T](T py, Action`1 action)
   at Tensorflow.Keras.Utils.base_layer_utils.CreateKerasHistoryHelper(Tensors tensors, List`1 processed_ops, List`1 created_layers)
   at Tensorflow.Keras.Utils.base_layer_utils.CreateKerasHistoryHelper(Tensors tensors, List`1 processed_ops, List`1 created_layers)
   at Tensorflow.Keras.Utils.base_layer_utils.create_keras_history(Tensors inputs)
   at Tensorflow.Keras.Engine.Functional._init_graph_network(Tensors inputs, Tensors outputs)
   at Tensorflow.Keras.Engine.Functional..ctor(Tensors inputs, Tensors outputs, String name)
   at Tensorflow.Keras.KerasInterface.Model(Tensors inputs, Tensors outputs, String name)

so i check out soure code, and found that in "src\TensorFlowNET.Core\Graphs\SubGraphUtility.cs"
            // When lifting from one FuncGraph to another, we will need to capture the
            // relevant tensors as well.
            var inverse_captures = new Dictionary<Tensor, Tensor>();
            Tensor[] internal_captures = null;
            if (base_graph is FuncGraph base_func_graph)
            {
                var captures = base_func_graph.captures;
                foreach (var (external_capture, internal_capture) in captures)
                    inverse_captures[internal_capture] = external_capture;
                internal_captures = base_func_graph.internal_captures;
            }

            graph.as_default();
            var source_ops = new List<Operation>();
            // Add the sources in the same order as the original graph.
            foreach (var s in internal_captures)
            {
                if (sources.Contains(s))
                {
                    sources.Remove(s);
                    source_ops.Add(s.op);
                    _copy_source(s: s,
                        graph: graph,
                        op_map: op_map,
                        handle_captures: handle_captures,
                        inverse_captures: inverse_captures,
                        base_graph: base_graph);
                }
            }

In fact, the var "base_graph" is not "FuncGraph", so the "internal_captures" still null.
So is that a bug or something wrong ?

It doesn't need to tf.compat.v1.disable_eager_execution() in keras.

It doesn't need to tf.compat.v1.disable_eager_execution() in keras.

In that case, the tensorflow.net in eager mode which is slow significantly. because not use gpu to do that.

I'm not really understand. As I know, the GPU usage has nothing to do with eager mode or not.

I thought in eager mode, the tensorflow.net just use cpu to do the predict, is that right ? I found that by dotTrace(jetbrains tool)

It depends on which version you installed CPU or GPU


[Question] Embeds?

Checks

[ ] I confirm that I have searched for existing issues before reporting to avoid duplicate reporting.

Description
Can the bot print embeds instead of regular messages?

Well, ok, i found one #14
Guess im fricked up

bump


1.4 compatibility + 1.3 backward compatibility

(I made this pull request a couple of days ago, but I stupidly sent it to my own fork, instead of the divio repo. And then I wondered why nobody replied.....)
These changes now seem to work with 1.4, and also preserve 1.3 backward compatibility. I ran ./runtests.sh and corrected the problems that exposed. test_po_sanity fails with this code, but it also fails with the current develop branch. I hope this is useful.

I have updated the version checking as suggested in previous comments, and I have verified that all tests pass with the Django 1.4 beta 1 (EXCEPT for the previously mentioned test_po_sanity).


Outdated readme

Currently the readme has:
colors: {   // optional, defaults to green
  blue:        ["#8cb9ff","#69a3ff","#428bff","#1872ff","#0058e2"], // this first entry is considered default
//...
},

But these values aren't optional. If you take colors object out you get a render error.
Intensity is also not optional. This also throws a render error if its missing. With the values 1-5 not actually changing anything.

Actually after some trial and error. It I just needed to also remove the intensity and color from the push from the example. My bad.
Though, intensity does seem to still be required to at least show the item.

yes it seems your right, ill fix it in the next version

@Richardsl could we also get some more information on how "intensity" works? In the example you're feeding it stuff like e.g. "25 minutes" which doesn't line up with the comment "optional, what color intensity to use for entry, will autoscale. Default 4 (1-5)". I also couldn't get the color to change when passing it an intensity.

You need at least 2 entries with different intensities in order for the intensity to change, or else it will default to intensity 4 aka the second most intense color in you colors array.
added following paragraph to readme:
Intensity:
The "Intensity" means which intensity of color to use, for instance from light-green to dark-green.
The plugin currently supports five intensities, and they will be distributed between the highest and lowest number you pass to "intensity".
e.g if the number range 0-100 is used, numbers between 1-20 would map to the ligthest color, 40-60 would map to mid intensity color, and 80-100 would map to max intensity.
Dataview's time variables are supported without any conversion, as they return milliseconds på default.
e.g [time:: 1 hours, 35 minutes] => intensity: page.time

Dataview's time variables are supported without any conversion, as they return milliseconds på default.
e.g [time:: 1 hours, 35 minutes] => intensity: page.time

Oh thats convenient, I didn't know that about dataviewjs. Very useful. Thanks so much for clarifying this!


Adding many model edit intercepts for Shawn's work

adding many intercepts for different code snippets
For testing I ran the each request in the front end on tera-model-edit where I would change the message depending on the intercept. I would also run the code in the notebook section to ensure it changed model as expected
	kernelManager.sendMessage('add_parameter_request', message).register('add_parameter_response', (data) => {
		console.log(data);
	});

Didn't test, looks fine.


Add SIMD SORT as an option

Hi, are there any plans to add https://github.com/intel/x86-simd-sort as an optional feature?

No plans. I'd probably wait to see if std sorting implements something like that, and then see if we can follow suit in parallel.


Compiler2: Add memoize instruction

As @seven1m already said, maybe we could fix that up in the other instructions, as it is only a problem with the c++ backend
other than that maybe telling the reasoning in the commit message would be a good idea

I'm hoping we can make the CppBackend smarter rather than make instructions that kind of leak the implementation of the C++ generation out to the IR.


Prepare for 2.0 release

This is the one.
Mid-April 2015, I wrote down in an issue https://github.com/artsy/mobile/issues/31#issue-70116307 that we really should start automating some of the cultural rules we were establishing in Artsy.
6 Months later in September, I wrote the first commit https://github.com/danger/danger/commit/54bff6406a9f3a880f00e14c13a2314f9e7173e0. Within a hour or so I had ripped enough code from CocoaPods to make a working prototype https://github.com/danger/danger/commit/0a429b426f6d803ec1ecc7b9c662620bad559043. By the end of the day, it did all of the basics https://github.com/danger/danger/commit/f574143f96f7b3260e30915591d702612c511812. By start of 2016 it was in production at Arsty https://github.com/artsy/eigen/pull/1013.
@KrauseFx and I played "who owns Danger" for a while, and eventually managed to get an org for the project. My origin remote for Danger still points to https://github.com/krausefx/danger/.
Since then we've expanded to support:

Running on  Circle, Travis, Jenkins, Buildkite, Semaphore, TeamCity, Xcode Bots, Drone, Surf.
An amazing plugin system, bootstrapped by @KrauseFx  and @dbgrandi
Windows ;)
All sorts of work flows
25 contributors, over 1000 commits across the projects

and soon GitLab and Bitbucket.
My last month of work on Danger - started with some README driven design, https://github.com/danger/danger.systems/commit/a7f0cb2628b44c6b356ad031a6c7ca558e00eecd covering all of the concept for http://danger.systems. This has been one of the biggest automation project I've worked on, it's ready in case Danger gets big. Danger Systems is a really cool project that should really help ease the amount of support requests we get. More docs = 👯 .
I even have a Danger spotify playlist.

Thanks everyone who has helped out, this would be such a different project without you all.

Why 2.0? Well, it's a final homage to Danger. She's the real 1.0 - can't try to replicate her.
I want to wait till tomorrow to merge this, and announce Danger is ready. 👍

          1 Warning

:warning:
.gemspec modified

  Generated by :no_entry_sign: danger

what is up with these fails?

lib/danger/commands/init_helpers/interviewer.rb:75:24: C: Omit parentheses for ternary conditions.
          the_answer = (i == 0) ? answer.underline : answer
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/danger/commands/init_helpers/interviewer.rb:75:25: C: Use i.zero? instead of i == 0.
          the_answer = (i == 0) ? answer.underline : answer
                        ^^^^^^
lib/danger/danger_core/dangerfile.rb:52:5: C: When using method_missing, define respond_to_missing?.
    def method_missing(method_sym, *arguments, &_block) ...
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/danger/danger_core/dangerfile.rb:198:17: C: Use (status[:errors] + status[:warnings] + status[:messages] + status[:markdowns]).count.zero? instead of (status[:errors] + status[:warnings] + status[:messages] + status[:markdowns]).count == 0.
      return if (status[:errors] + status[:warnings] + status[:messages] + status[:markdowns]).count == 0
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/danger/plugin_support/plugin.rb:20:5: C: When using method_missing, define respond_to_missing? and fall back on super.
    def method_missing(method_sym, *arguments, &block) ...
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
lib/danger/request_source/github.rb:114:19: C: Use errors.count.zero? instead of errors.count == 0.
        status = (errors.count == 0 ? 'success' : 'failure')
                  ^^^^^^^^^^^^^^^^^
70 files inspected, 6 offenses detected

Interesting that only Travis failed the build.

I think it's not using the bundle'd rubocop, those linters got added in the last few days. I've bumped our bundler version, and fixed them

Alright, I'm calling this green, it works locally and it looks like travis/pr seems to have locked on two of our ruby versions.


how can i modify the code to train on 3D data like x = torch.randn(3, 3, 64, 64, 64)

Thanks for your great job. I want to test the code on the 3D data， Could you please give me some advice on how to change the code?

same question


Add a github action to check commit messages.

This never fails, only posts a comment, so that we can still have
an all-green signal and use "Squash and Merge" as appropriate.

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Choose reviewer(s) and mention them in a comment (R: @username).
[ ] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI.

I would actually prefer a status to a comment. Some heuristic like "these commits look OK" perhaps? I understand that this will not allow a statement like "try squash & merge" but instead will just say "these commits do not look OK". That can be a prompt for the committer to squash, or the contributor to improve their commits.

IIRC, status can only be pass/fail. The intent is to make the comitter (merger) think about whether to use merge or squash (some developers prefer the push-lots-of-commits, and sometimes it's preferable to not fix up history manually (and wait for all the tests to (hopefully) pass again), if a single commit in the PR is reasonable; I'm not sure a comment about these commits looking OK or not would convey that (and might be interpreted negatively by the author as well).
Forcing all authors to present a set of clean commits, and then fix history after review, is a different, higher bar that I don't think we want to be pursuing right now.

I agree with your sentiment. I think it could be conveyed by an appropriate status message. Or potentially two statuses, one that says "Success! this is ready for squash+rebase" or "Success! this looks good for merge, preserving commits".
Squash + merge in order to avoid a test re-run holds nearly the same level of risk as git rebase -i && git push -f so I don't think avoiding test reruns should really be a consideration. In risky cases, re-running is better. In non-risky cases, merging after a manual fixup is OK with me. This has not been a source of problems so I don't think we need to optimize for it.

For example, status could be "Is each commit self-contained?" and the result is yes/no. I think the author and reviewer can both interpret this appropriately.

Could you clarify what you mean by "status?" I prefer that everything
be green before merging (and never read the actual messages if they
are)/ This is also the issue with git rebase -i && git push -f
(though partially because are tests are flaky and I want to keep the
green bit in history.)
On Thu, Apr 22, 2021 at 2:58 PM Kenn Knowles @.***> wrote:

For example, status could be "Is each commit self-contained?" and the result is yes/no. I think the author and reviewer can both interpret this appropriately.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

I mean that a GitHub status is a combination of a text description and a yes/no/pending. My suggestion was that the text description be a more informal sentence "Is each commit self-contained?" and the yes/no status answers that question. I understand your preference to have everything green before merging. So then the "no" answer to that question would look like a failure of CI, and GitHub would aggregate the results in to a red commit in the git commit history. I don't have a solution for that. Comments are Ok but spammy. See codecov and coveralls comments in the past.

Yeah, agree about the spammy potential for comments (which is why I limited this to approved PRs with more than one commit).

I wonder if this is https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/ (though that makes testing much harder). It seems commenting on a PR should not require write permissions though...


Supporting multi-language support in the templates

Hi,
I'm using node-email-templates in my project and facing one issue regarding multi-language support for auto-generated emails which are sent from my backend node.js express on successful events like successful registration, password-reset, etc. Can anyone give me some pointers on how to implement it ?
I'm not able to find any example for implementing it. Also, in my frontend I'm using angular translate for handling multi-lingual translations. Is there any similar node module which can be used with node-email-templates for supporting multi-lingual ?
Thanks

Anyone who can help me with this ?

Hi Mukul. I think this needs to be resolved at the template level, probably by creating helpers. Not sure what template engine you're using but I remember using handlebars for this by creating a helper, something similar to this http://stackoverflow.com/questions/7760332/how-to-make-i18n-with-handlebars-js-mustache-templates

Hi Jeduan,
First of all I would like to thank you for taking out time to answer my query. I'm using Jade template with css for styling. Following are my code snippets which I have taken from one of the example:
body(bgcolor='#f6f6f6')
  // body
  table.body-wrap(bgcolor='#f6f6f6')
    tr
      td
      td.container(bgcolor='#FFFFFF')
        // content
        .content
          table
            tr
              td
                p Hi,
                p Please confirm your email address by clicking the link below.
                p We may need to send you critical information about our service and it is important that we have an accurate email address.
                table
                  tr
                    td.padding
                      p
                        a.btn-primary(href='http://www.xyz.com') Confirm Email Address
                p Thanks, have a lovely day.
                p -- Team XYZ
                p
                  a(href='http://twitter.com/xyz') Follow @leemunroe on Twitter
        // /content
      td

I have created similar directory structure and using a corresponsing style.css.
In my controller, I'm sending mail using following code:
exports.sendContactFormMail = function (req, res, next) {
  var mailOptions = {
    to: config.supportEmail,
    subject: req.body.subject,
    from: req.body.name + ' <' + req.body.email + '>',
    text: req.body.message + " From: "+ "Email: " + req.body.email + " | Contact No.: " + req.body.phone
  };
  console.log(mailOptions);
  transporter.sendMail(mailOptions, function(err, info){
    if (err) {
      console.log(err);
      return res.send(500);
    }else{
      console.log('Message sent: ' + info.response);
      return res.send(200);
    }

    //transporter.close();
  });
};

As I have mentioned in my question, I'm using angular-translate in the front-end. Using that transations are really easy to implement in the application. You can simply put all the string in different languages and using {{"som_string"|translate}}, it does automatic conversion. Is there anything similar that I can use for my express backend for automatic translations of email-templates? If not, is there any other way to implement same?
P.S.: I have no idea of handlebars, so understanding that code will be a bit difficult.

You can check out some library like i18next with jade. http://i18next.com/node/pages/doc_templates.html

Please reopen if you couldn't resolve this issue


Xenko launcher doesn't work

Release Type: Official release / lancher 3.0.8
Version: Xenko 3.1 / launcher 3.0.8
Platform(s): Windows 10
Describe the bug
Once Xenko has been installed the launcher doesn't allow any options and any actions other than closing it or clicking on some links in the bottom left card.
To Reproduce
Install Xenko and open the launcher
Expected behavior
Being able to add a new project or do something to integrate with VS 2019.
VS 2019 and VS 2019 preview are both installed.
Screenshots

Log and callstacks
The event viewer does not contain any stacktraces.

By some magical process the launcher has suddenly upgraded to version 3.09 and is now showing options.
There was apparantly a wait time of about 5 mintues before anything happened.
It would be a lot more user friendly to show the users that something is happening while the laucher is upgrading itself or veryifing that it's the latest version. Or something.
Because now I filed an error report apparantly for nothing.

I'd like to add that this issue almost made me reconsider trying out Xenko.
It felt very immature that something appeared to go wrong with the installation process.
The fact that it actually went right but needed some time for a background porcess, I'm assuming, is positive. But there's a risk of losing new users if this process isn't visible with a progress bar or something like that.

Thanks for the report.
Please note that this is not the typical/expected behavior:

Latest launcher is 3.0.9 but current one in XenkoSetup.exe is 3.0.8 which then auto-upgrade (we should upgrade XenkoSetup.exe, but usually it's not supposed to be bothering, cf next point)
As soon as launcher starts, it querys the various nuget feeds to check if a new version is available. This is supposedly very fast if there is normal internet connectivity (it's just a few HTTPS requests).
If there is any new version, it should then display the self-update popup and then start download (5 mb). So the download time should not affect the popup display.

I am not sure as to why it would take 5 minutes to do this small HTTPS check from step 2.
Could it be that your internet was unstable? Or that you have some failing nuget feeds that blocks everything else?
Note that we don't block UI until this quick check is done because we want Xenko to be usable even without internet connectivity.
Anyway, I will soon release an updated XenkoSetup.exe.

Hi Xen2,
First of all, thanks for replying to this topic even though I closed it - I think its very professional that you did so. Gives me a very postiive impression. :)
My internet connection was stable and working at the time. I verified this because I noticed succesful NuGet requests after restarting and using fiddler to determine if the launcher was doing anthing.
I also noticed it quering a NuGet repository that I typically only use for work. And which is unvailable unless I start my work VPN. I didn't think anything of it at the time because the other requests appeared to be succeeding.
Could it be the case that it was trying to query an unreachable repository?
This repository is listed at the bottom of my NuGet feeds in Visual Studio. It typically shouldn't be used. So I'm not sure why it was being queried.

As far as I know, all feeds that are enabled are used by default. That's how nuget works. You need to disable it in such case.


Made some corrections to the step 2 README

Hey Richard, amazing tutorial man, learnt a lot. Just made some corrections in the step 2 readme. Please check and merge. Thanks!

Thanks for the heads up! Changes made.


feat(examples): add HTTP hello world

This adds an example that builds a HTTP hello world example

Thanks for the additional review @guybedford ! Addressed the outstanding points


Fix docs for StateResetter

Q
A

Is bugfix?
✔

New feature?
❌

Breaks BC?
❌

Fixed issues
#346

👍


Feature/initial walletconnect provider

Initial WalletConnect provider implementation.
The WalletConnect implementation doesn't extend the existing BaseWallet class as the paradigm for WalletConnect is a bit different: there is the concept of a requester and a signer. The library thus provides implementations for each of these use-cases. The detailed flows and code-snippets are available in packages/walletconnect/README.md

Any plans to publish to npm?


Sliceable doAfter

About the PR
change the way food is sliced - food is now sliced whole after a small doafter than requires multiple clicks on a single entity
Why / Balance

new entities appearing after each click prevented cutting the food further, which led to pixelhunting of the corner of the sprite, where you can often click to cut the whole dish.
we don't have a visualization of half sliced food, and a full circle of cheese is no different than a circle of cheese with only one slice left in it. This causes dissonance. Now the food is either fully whole or fully sliced.

Media
https://github.com/user-attachments/assets/50f131ee-07dc-4120-bcc0-29c1c9bd0c0d
Changelog
:cl:

tweak: change the way food is sliced - food is now sliced whole after a small doafter than requires multiple clicks on a single entity

As someone who plays a lot of chef, this is an incredible upgrade thank you.

The pixel-hunt problem is real, but I gotta admit that there's something satisfying about CHOP CHOP CHOP CHOP

Feel like stuff like meat shouldn't have a do-after. Gives more control

The pixel-hunt problem is real, but I gotta admit that there's something satisfying about CHOP CHOP CHOP CHOP

This
Maybe it should have a chain of short do-afters with each slicing off one piece? And to have it play the chopping sound on each. Basically make it similar to how magazines are reloaded. This would both remove pixel hunting for most cases and keep the aesthetic part unscathed.

Maybe it should have a chain of short do-afters with each slicing off one piece? And to have it play the chopping sound on each. Basically make it similar to how magazines are reloaded. This would both remove pixel hunting for most cases and keep the aesthetic part unscathed.

I don't think the doAfter sequence is a good idea, given that it can be interrupted, and again the second problem arises

Feel like stuff like meat shouldn't have a do-after. Gives more control

it's easily customizable through yml, anyone can did it now.

but I gotta admit that there's something satisfying about CHOP CHOP CHOP CHOP

I guess I just need to find a better default sound than the lonely CHOP right now


intermittent erroneous (epoch time) values on certain browsers

We deployed this and got erroneous values that look like epoch times. This happened on more than 1% of real users across a wide variety of browsers. Some of the browsers were old (Firefox 45) but Safari 11 showed up a lot. In our office we have Safari 11.1 running on an iMac that produces the bug 100% of the time.
Here's a test page to make it easy:
https://stevesouders.com/tests/fid.php
On our 100% reproducible office iMac when we step through the code we get true for "if (eventTimeStamp > now)" test, but when we look at the values neither is an epoch timestamp. Instead, we get values that are very close but nevertheless eventTimeStamp is greater than now by a few ms, for example eventTimeStamp = 2078 and now = 2067.
So the test for "if (eventTimeStamp > now)" seems too broad. Instead, it should also be necessary that eventTimeStamp is greater than the minimum epoch time, navigationStart, or really any epoch time in the past. If that is true, then using +new Date works. If not, bail.

Thanks for the report.
@philipwalton - can you dig in here?

It looks like this issue wasn't actually about epoch times; rather, it was becauase in Safari 11.1 there were cases where event.timeStamp was greater than the value of performance.now() when callled inside the event listener (i.e. the event was from the future).
I've created #5 to fix the problem, and in cases where the computed FID value would be negative, I clamp it at 0. It's not ideal, but I don't think there's a better option. The good news is it looks like the bug is no longer happening in Safari 12 preview.

Super! Thanks for the fix.
FYI - We saw this issue on browsers other than Safari 11.1.
Also, with this fix people will get results saying FID=0, but really we don't know what the value should be. Certainly, it's not zero. In our code we just bail and don't report a result when this anomaly occurs because it's clear the builtin timers for the browser are unreliable.

I think it's fine to do either, and I think each has trade-offs.
From what I can tell (at least in Safari), the time mismatch between performance.now() and event.timeStamp is (or at least seems to be) constant and always a small amount. I.e. when I was seeing negative values, they were always small, but if I added a blocking while loop for a second or more, I always see large positive values.
This leads me to believe that all values are probably off by a similar (and small) amount, and any value that gets reported as zero is likely close enough to zero that it won't affect high percentiles in reporting. On the other hand, if you don't report these values at all it may skew your percentiles. I'm not sure which is best.
@tdresser let me know if you have any thoughts here...

Not reporting these values seems riskier to me than reporting them as being 0, due to fear of biasing percentiles, as you mentioned.
Assuming the error is fairly tightly bounded, I agree with Philip's proposal above.

BTW, I started seeing additional bogus values, so I decided it was safer (and easier) to not report any negative values or any values greater than the delta between when the event occurred and when the event listeners were added.
This change was added in #7 and released in 0.1.2.


performance & quality drop (3x) when setting top_p = 1.0 vs. 0.99

Performance when generating with top_p = 1.0 is about 3x slower than with top_p at anything(?) else, to duplicate try 0.99 and 1.0.
I've seen this bug with both the exllama gui and the text-gen-webui, a sample performance:
top_p=1.0 Output generated in 27.11 seconds (12.10 tokens/s, 328 tokens, context 49, seed 444648765)
top_p=0.99 Output generated in 11.62 seconds (31.83 tokens/s, 370 tokens, context 49, seed<PHONE_NUMBER>)
The top_p=1.0 also seems to produce drastically poorer results sometimes as well... I'm not sure what might be happening there, but here is a looney example from a normally very good model (TheBloke_Wizard-Vicuna-30B-Uncensored-GPTQ):
A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.

USER: A recipe for easy chocolate cake.
ASSISTANT: Ingredients:
- 1 cup all-purpose flour
- 1/2 cup granulated sugar
- 3/4 cup unsweetened cocoa powder
- 1 tsp baking soda
- 1 tsp salt
- 1/2 cup vegetable oil
- 50 grams canola oil
- Roughly chopped dark chocolate (at least 6 oz)
- 2 large eggs
- 1 tsp vanilla extract
- 1 cup water
Instructions:
1. Preheat your oven to 350°F (180°C). Grease a 9x13 inch pan with cooking spray or butter and flour.
2. In a medium bowl, mix together the flour, sugar, cocoa powder, baking soda, and salt until well combined. Set aside.
3. In another bowl, whisk together the oil, vegetable oil, eggs, and vanilla extract until creamy. Add wet ingredients into dry ingredients and stir until it’s just moistened. Gently fold rough chopped target="_blank" data-qa="true">
4. Pour batter in greased pan and smooth out top with a spatula or back of most can dipper fan site memory foam side travel marketing pinboard plus ideas epochtransduction credit peaceful solve ways relationship lose bond light building car west rightoffscreen eXtreme target two links and years pondchildhood free online festival style throwMore nobatsevidenc rebate some use joke birdhit sku

In step 4 it just loses it at the end, but it's bad at the end of step 3 also.
This is a typical output (using the same parameters, but with top_p=0.99):
USER: A recipe for easy chocolate cake.
ASSISTANT: Ingredients:
- 1 cup all-purpose flour
- 3/4 cup granulated sugar
- 2 teaspoons baking powder
- 1/2 teaspoon salt
- 1/2 cup unsweetened cocoa powder
- 1 egg
- 1/2 cup milk
- 1/2 cup vegetable oil
- 1 tablespoon vanilla extract
Instructions:
1. Preheat oven to 350°F (175°C). Grease a 9-inch square pan with cooking spray or butter.
2. In a large bowl, whisk together flour, sugar, baking powder, and salt until well combined. Add in cocoa powder and mix again.
3. In another small bowl, beat the egg then add milk, vegetable oil, and vanilla extract. Mix well.
4. Pour wet ingredients into dry ingredients and stir until just combined. Do not overmix.
5. Pour batter into prepared pan and smooth out top with a spatula.
6. Bake for 35-40 minutes or until a toothpick inserted into center comes out clean. Let cool completely before frosting. Enjoy!

Different implementations are going to perform differently in extreme cases. You could also turn up the temperature and magnify any differences that way.
But chasing perfectly deterministic behavior with CUDA gets expensive since you can't use the most efficient parallel algorithms then. And language models are designed to deal with some amount of noise anyway. Dropout during training is essentially just a whole lot of strong, artificial noise added to the network so it learns to be resilient and avoid tipping points where small deviations can have large cascading effects.
And whatever small amount of noise makes it through the model therefore shouldn't change the overall shape of the output, though it might make it a little fuzzier. Fuzziness doesn't matter when you're gating the output anyway, either with top-p or top-k or some other sampling filter, because then you're left with only the part of the distribution that has a high signal-to-noise ratio.
The tail end, where the noise can overshadow the signal, is not what you want to rely on in any case. That's where the model basically goes, "well, if you didn't like any of the two hundred tokens I suggested as the most likely continuation, maybe the next one is, oh, I don't know, 'ham'? Does that make sense in a chocolate cake recipe? Apparently you don't care!"
Those settings also look a little strange if you're going for determinism. with a top-k of 1 the model is as deterministic as it can be (given the non-associative floating point operations as mentioned), and none of the other parameters contribute anything at all. With top-k at 0 and the others at 1, none of the filters do anything, and that's arguably the least deterministic form of sampling.

Thanks for the detailed explanation, it's so much clearer for me now! My headache just went away, lol.


High CPU load when connection to panel lost

I noticed minor problem with scenerio, I have panels connected via HUB USB RaidSonic IcyBox 7 where each has a on/off switch:

all 3 panels are connected and switch turned on
start DCSFlightpanels, no problem everything working wit DCS
turn switches off / disconnect panels (don't really matter if DCS is on or off)
DCSFlightpanels use ~40% CPU
turn switches on / connect panels
load back to normal

Probably there is some polling of searching for device which cause so high load but since it isn't proper way of using I thing is a minor issue.
But I thing you can tak a look and see some optimization when connection to panel is lost.

DCSFP does not handle attach detach of devices. I had it at some point but removed it for some reason.  I don't remember any more but is this an issue? How often does this happen with healty H/W?

hmmm... it is not really a issue just observation... if I follow steps it happens every time... to be honest probably nobody will start DCSFP without panels connected ;)

Do you mean that if you unplug before starting DCSFP or while DCSFP is running?

unplug panels while DCSFP is working

Yeah OK. I have to think about it. I have this vague memory I had a lot of problems with attaching and detaching panels, there is a lot going on in the background and DCSFP had problems reacting properly.
It isn't supposed to be like that - to be clear. At the moment though there are more pressing issues. But this issue can stay so I won't forget it.

Yes, lets keep it open to track issue and agreed it is not top blocker at the moment.
In general it looks like common problem of dead connection - how often check/detect if device is connected back or how long keep context in case just minor connection problem.
As I said, I belie just small users disconnect panel device while DCSFP is working and even so they probably connected it back. So, nobody noticed this behavior.

Next release will have graceful panel detachment.


build(snap): upgrade base to core20

This PR upgrades the snap base from core18 to core20.
Also, it removes passthrough since install-mode is now available as apps.<app-name>.install-mode; see https://snapcraft.io/docs/snapcraft-yaml-reference
Signed-off-by: Farshid Tavakolizadeh<EMAIL_ADDRESS>

If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/device-mqtt-go/blob/main/.github/Contributing.md
PR Checklist
Please check if your PR fulfills the following requirements:

[x] I am not introducing a breaking change (if you are, flag in conventional commit message with BREAKING CHANGE: describing the break)
[x] I am not introducing a new dependency (add notes below if you are)
[ ] I have added unit tests for the new feature or bug fix (if not, why?)
[x] I have fully tested (add details below) this the new feature or bug fix (if not, why?)
[ ] I have opened a PR for the related docs change (if not, why?)

Testing Instructions

$ snapcraft
...
Snapped edgex-device-mqtt_2.0.1-dev.11_amd64.snap
$ sudo snap install ./edgex-device-mqtt_2.0.1-dev.11_amd64.snap --dangerous
edgex-device-mqtt 2.0.1-dev.11 installed
$ sudo snap services edgex-device-mqtt
Service                        Startup   Current   Notes
edgex-device-mqtt.device-mqtt  disabled  inactive  -
$ sudo snap start edgex-device-mqtt
Started.

New Dependency Instructions (If applicable)

Codecov Report

Merging #324 (2f4bb9e) into main (ea5b921) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #324   +/-   ##
=======================================
  Coverage   21.66%   21.66%
=======================================
  Files           5        5
  Lines         480      480
=======================================
  Hits          104      104
  Misses        363      363
  Partials       13       13

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ea5b921...2f4bb9e. Read the comment docs.


Only R1 reads mapped for paired-end read input?

Hello,
I input 2 paired-end read files for the --reads option, separated by a space, but only the name of the R1 reads were shown in the mplog.log file and in all output files/folders.
Does this mean that only R1 reads were mapped?
Do I need to use the option --check_mate_pairing in order for both R1 and R2 reads are used in mapping?
Thank you very much!
Best,
Yuqia

Hi Yuqia
Both of the reads (R1 and R2) are being used. That's only the naming and no other option is needed. Using   --debug option you can see the exact command line that is run using aligner.
Best regards,
Sina

Many thanks Sina!
Best,
Yuqia


Give (==>) its own kind

Currently, the kind of type "Foo" ==> "Bar", as revealed by ghci, is:
>>> :kind! "Foo" ==> "Bar"
"Foo" ==> "Bar" :: *

However, for my current use case, I'd like to specify that a type has a phantom argument of the form a ==> b, where a and b are both Symbols. In particular, I'd like to rule out other sorts of argument, such as Types, Type -> Types, etc.
That's where this PR comes in. With this declaration
infix 6 :==>
infix 6 `To`
-- ...
data a :==> b = a `To` b

and with the DataKinds extension, we've defined four things:

Name
Level
Sort

(:==>)
Type
(kind) Type -> Type -> Type

(:==>)
Kind
(sort) Kind -> Kind -> Kind

To
Value
(type) a -> b -> (a :==> b)

'To
Type
(kind) a -> b -> (a :==> b)

We don't really care about value-level To and type-level (:==>), but afaik we still need them to get the one-level-up variants.
Now, the promoted 'To corresponds to the current (==>), with the difference that the kind of "Foo" 'To "Bar" is Symbol :==> Symbol:
>>> :kind! "Foo" '`To` "Bar"
"Foo" '`To` "Bar" :: Symbol :==> Symbol

Finally, we define (==>) as the promoted 'To, so we don't need to add a tick everywhere:
infix 6 ==>
-- ...
type (==>) = 'To

Notes

I initially tried to define data a :==> b = a ==> b, but this isn't allowed by GHC since value constructors which are symbolic operators need to begin with :. That's why we need both the data and the type declarations (plus getting rid of the tick).

I'm not entirely happy about the name To, but it's not very important since I'd expect users to mostly use (==>) and (:==>).

Maybe To could be named MapsTo in accordance with the ↦ symbol from mathematics.

yeah! With that in mind, I'd even go for |-> or |=> instead of ==>!

I'm not in favor of this.
In brief: I don't see a value-add for the library users to encode things in this way. But I do see a cost in using 3 definitions where 1 suffices. I think it makes this feature significantly harder to understand.
In more detail: What you're proposing is essentially a different way to approach the design of the library from the one its currently implemented with. It's a stylistic choice. Its a discussion we can have, but I did consider this approach and decided against it so far. (If we did adopt it though, we should probably to do so everywhere and not just in this one place.)
There are several uninhabited data types in this package, each of which could have been defined as an inhabited data type used in promoted form. But they don't need to be. One reason I didn't take that approach is, as you note, promoted data generates an additional definition that isn't needed. We need a type operator, so we define just that, the operator as a type. I believe this makes the functionality much more decipherable than needing to interpret all definitions with data type promotion in mind. Then there is the further addition of the type synonym, which IMO brings us still further from a crisp API.
The approach Ive taken so far is in line with other prominent type-level Haskell libraries like servant, where i.e. :>, :<|> are plain type operators, not promoted data constructors.

I'd like to specify that a type has a phantom argument of the form

There are a couple ways to achieve this:

You can do as we do elsewhere in this library, where the valid and supported forms of the various type-level syntaxes are encoded in the type class instances.

You can certainly use a user-defined data type in promoted form. Defining custom data types is envisioned to be pretty common pattern for using this library anyway.

Now of course, I happen to know some backstory as to exactly what you're trying to do. :) And that it relates to a feature we certainly do want to have in this library, namely flattening subfields of objects. So I think the best way to proceed would be to discuss that directly instead. Because, while acknowledging there is some out-of-channel context missing here, the discussion on this PR doesn't motivate it in terms of this library's functionality.

Alright! Thanks for sharing your thoughts on this.
However, I still want to point out that your first suggestion doesn't quite work in this case, as my use-case needs to apply a type family to the phantom argument, and that only works if it has the right kind. Your second suggestion is indeed the approach that was taken, but I thought there might be some benefit in providing the kind with the library. Since that isn't the case, I'll close the PR.


hang on weave status and exiting containers

Using this code: https://github.com/errordeveloper/weave-demos/compare/master...tobowers:feature/upgrade-weave-1.0.1 (which is modified quartet to bring up a 3 node swarm cluster) on an OSX machine using docker 1.7, swarm 0.2 and machine 0.3 I can get a swarm cluster to spin up and get containers to run.
When I do a weave status against the swarm manager:
13:47 ~/code/weave-demos (feature/upgrade-weave-1.0.1)$ eval $(docker-machine env --swarm dev-1)
13:47 ~/code/weave-demos (feature/upgrade-weave-1.0.1)$ weave status
weave router 1.0.1
Our name is 6a:8e:3e:37:4e:e7(dev-1)
Encryption off
Peer discovery on
Sniffing traffic on &{14 65535 ethwe ea:95:36:8f:5d:49 up|broadcast|multicast}
MACs:
Peers:
6a:8e:3e:37:4e:e7(dev-1) (v24) (UID<PHONE_NUMBER>378662741)
  -> 62:a6:fc:b4:8f:18(dev-3) [<IP_ADDRESS>:40225]
  -> ba:63:04:30:a7:0e(dev-2) [<IP_ADDRESS>:6783]
ba:63:04:30:a7:0e(dev-2) (v40) (UID<PHONE_NUMBER>543269591)
  -> 6a:8e:3e:37:4e:e7(dev-1) [<IP_ADDRESS>:33260]
  -> 62:a6:fc:b4:8f:18(dev-3) [<IP_ADDRESS>:46586]
62:a6:fc:b4:8f:18(dev-3) (v21) (UID<PHONE_NUMBER>249072286)
  -> 6a:8e:3e:37:4e:e7(dev-1) [<IP_ADDRESS>:6783]
  -> ba:63:04:30:a7:0e(dev-2) [<IP_ADDRESS>:6783]
Routes:
unicast:
6a:8e:3e:37:4e:e7 -> 00:00:00:00:00:00
ba:63:04:30:a7:0e -> ba:63:04:30:a7:0e
62:a6:fc:b4:8f:18 -> 62:a6:fc:b4:8f:18
broadcast:
62:a6:fc:b4:8f:18 -> []
6a:8e:3e:37:4e:e7 -> [ba:63:04:30:a7:0e 62:a6:fc:b4:8f:18]
ba:63:04:30:a7:0e -> []
Direct Peers:
Reconnects:

Allocator range [<IP_ADDRESS>-<IP_ADDRESS>)
Owned Ranges:
 <IP_ADDRESS> -> 62:a6:fc:b4:8f:18 (dev-3) (v4)
 <IP_ADDRESS> -> ba:63:04:30:a7:0e (dev-2) (v2)
 <IP_ADDRESS> -> 6a:8e:3e:37:4e:e7 (dev-1) (v0)
Allocator default subnet: <IP_ADDRESS>/24

weave DNS 1.0.1
Listen address :53
Fallback DNS config &{[<IP_ADDRESS> <IP_ADDRESS>] [mdx.med] 53 1 5 2}

Local domain weave.local.
Interface &{18 65535 ethwe 22:6f:d8:fc:f2:c1 up|broadcast|multicast}
Zone database:

weave proxy is running

The command just hangs there.
I see that docker itself is still running.
If I run a container, it works (but I do see extra /w in the command:
eda6f7fc2a1b        centos:6                     "/w/w /bin/bash -l"    29 seconds ago      Up 28 seconds                                                                      dev-3/evil_brown

However, when I exit the container, it hangs.
I see from changelogs that version 0.10 (or so) of weave attempted to address these problems?
I'm running weave 1.0.1 (both the script from the cluster create and also the containers).

@tobowers Firstly, you should take a look at reworked quartet guide, it's on the website now (feel free to jump to chapter 4 right away). Secondly, you shouldn't run weave status agains Swarm master, it's designed to work again individual hosts only.


How to work with another /basepath?

I'm serving my app from a base path of /myapp so looking to set up routes and matchers that are always relative to that. I can't quite get the hang of the setup.

<a use:route href={`/`}>Home
<a use:route href={`/new`}>New

<Router base="/" {routes} pre={debug} />

If I do the above, all good. But my base in vite.config.js is set to "/myapp".
How would I amend the above to accommodate the basepath and also match the routes? I've tried all manner of combinations of putting the myapp prefix in the paths in the routes array, the base prop on the . Is there any info on doing this that I've missed?
Many thanks!

I'm also just using use vite and I'm not why the content does not change when I click a url. @wa-rren-dev  did you manage to find a fix?

my issue was that i was doing:
  const routes: Route[] = [
    {
      path: '/swings',
      component: SwingStrategies
    }
  ]

instaed i should have done
  const routes: Route[] = [
  {
    path: 'swings',
    component: SwingStrategies
  }
]

I'm also just using use vite and I'm not why the content does not change when I click a url. @wa-rren-dev did you manage to find a fix?

I didn't find a fix! Ended up stepping down to Svelte 4 for a few reasons.

I got ya covered @wa-rren-dev! See #9.
Thanks for the feedback and the support <3

I'm also just using use vite and I'm not why the content does not change when I click a url. @wa-rren-dev did you manage to find a fix?

I didn't find a fix! Ended up stepping down to Svelte 4 for a few reasons.

Please come back to the light of svelte 5!!!

@mateothegreat Amazing thank you! Was thinking of porting to typescript so I'll give this a go when I do

@mateothegreat Amazing thank you! Was thinking of porting to typescript so I'll give this a go when I do

No problem man, you're welcome! Ping me and let me know how it goes!!


[7.x] Scoped resource routes

This PR adds the ability to make resource routes scoped.
For a while, we have the ability to scope routes when using Implicit Route Model Binding. This is very useful because it provides a quick and easy route key customization and respects the parent-child relations as well:
Route::get('api/users/{user}/posts/{post:slug}', function (User $user, Post $post) {
    return $post;
});

This PR implements the same, but for resource routes, so if we wish to use the same functionality for a resource URL structure, we don't need to define the routes one-by-one to use this feature or writing a custom route binding resolution logic for each model.

Usage:
// Using the default route keys
Route::resource('users.tasks', TasksController::class)->scoped();

// Customizing some route keys (only the task gets replaced)
Route::resource('users.tasks', TasksController::class)->scoped([
    'task' => 'slug',
]);

If we type hint our models in the controller methods using implicit route model binding, it will behave the same as the closure-based route above.
TasksController extends Controller
{
    // ...

    public function show(User $user, Task $task)
    {
        //
    }

   // ...
}

I don't think there is any breaking change so I chose the 7.x branch.
Also, if the PR is accepted, I'll open a PR for the docs as well.

I'm not sure why did the tests fail.
@driesvints If you'll have some time, could you restart the tests, please? Thanks!

@iamgergo seems you got it.
Did you test this with route caching btw?

@driesvints Well, I ran the php artisan route:cache command and it was working well. Or you meant something else?
Also, in the latest commit, I fixed the null column value by getting the default one using the getRouteKeyName method.

@iamgergo yep that's what I meant.


Upgrade minimum OS : iOS 15 / macOS 12

Describe the feature
iOS 15.X is now the leading system of WebSSH' users :

In order to speed up development and tests : iOS 14 and macOS 11 support will be dropped aside WebSSH 17 release.

Done

Test


Sketch out a design for the monorepo structure

I am thinking something like a core monorepo that contains most of the things, and then a bunch of separate repos for "applied Polymath": a firebase-configured thingy, a remix-configured thingy, etc.

On the other hand, maybe all of them should be in there: why keep some separate?

What's a good rubric here? Why would I keep a project outside of a monorepo?

I could see experimental stuff outside and then bring it in when it's blessed?

sounds good. Let's figure out how the dependencies will work. For the hypotheticl structure:
polymath-ai/core -- main repo where all the cool stuff happens
polymath-ai/core/packages/cli -- the cli
polymath-ai/core/packages/client -- the client library

Can cli depend on client?

https://turbo.build/repo/docs/handbook/sharing-code#anatomy-of-a-package looks like it.
Let me play with this a bit.

it can!

Sounds like changeset is an important part of the workflow.

I like core and experiments.
Do items like architecture fit in core? Or it's own thing?
Where does a kit fit in? Do we need 3?

Here's what I am thinking, looking at current repos:
format: [monorepo dir] <-- from [polymath-ai repo]
/core/cli
/core/client
/core/config <-- from configuration
/kits/remix-starter <-- from polymath-remix
/kits/firebase-starter <-- from firebase-fun
/kits/cloudflare-starter <-- from cloudflaring-fun.
WDYT?

architecture stays out of the monorepo, since it's not Node-specific.

Ah,so the mono repo is for all things node (or even js in case at some point we ditch the node apis).
What do you think about having one repo that's got all of the docs and decisions for the protocol / spec / vision etc that's neutral to impl.
Then we have a monorepo for the js world, one for python, and room for other potentially (maybe just a client in rust say... no time soon...).
And now I get kit. A kit implements full web endpoints that you can grab to get started faster with.

Yes! The one with all the docs and decisions -- is the architecture. Does that make sense? I already migrated https://github.com/polymath-ai/architecture/blob/main/format.md here.

I got some of the repos wrong. Let me do this again:
/core/cli
/core/client
/core/config <-- from configuration
/kits/remix <-- from polymath-remix
/experimental/firebase <-- from firebase-fun
/experimental/cloudflare <-- from cloudflaring-fun.

Maybe like seeds instead of experimental -- make it more playful and with fewer letters

Perfect. I will move over GLOSSARY and the poem etc lol


Occasional Bluebird failures?

Every so often snippet generation will fail with blank output. The following gets written to STDERR:
✖ code_sample_322968423736805296.json20150921-8796-1364q6w fail: Catch filter must inherit from Error or be a simple predicate function

    See http://goo.gl/o84o68

(Note that code_sample_322968423736805296.json20150921-8796-1364q6w is just the name of the Tempfile I'm using)
Input JSON looks something like:
{"method":"GET","url":"http://testurl.com/test","httpVersion":"HTTP/1.1","headers":[{"name":"accept","value":"application/json"},{"name":"ApiKey","value":"YOUR API KEY HERE"}],"cookies":[],"queryString":[],"postData":{},"headersSize":-1,"bodySize":-1}

But the error seems intermittent - if I re-run httpsnippet with the same JSON usually it works fine.

fixed in v1.16.5


How to run (de)lombok with big classpath?

I'm developing a gradle plugin which contains a task for running delombok.
I currenty invoke delombok using a command like this:
(one argument per line for better readability)
/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/bin/java
-Dfile.encoding=UTF-8
-Djava.io.tmpdir=/Volumes/Daten/git/gradle-plugins-test/lombok/build/tmp/delombok
-Duser.country=DE
-Duser.language=de
-Duser.variant
-cp /Users/larsgrefer/.gradle/caches/modules-2/files-2.1/org.projectlombok/lombok/1.18.0/c4647d46f0742746ac07ce4abeeee9b2fb18d147/lombok-1.18.0.jar
lombok.launch.Main
delombok
--format=pretty
--target=/Volumes/Daten/git/gradle-plugins-test/lombok/build/delombok/main
--classpath=/Users/larsgrefer/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-api/1.8.0-beta2/ba136e771a794f77ab41fa879706e5cbd5b20f39/slf4j-api-1.8.0-beta2.jar:/Users/larsgrefer/.gradle/caches/modules-2/files-2.1/org.projectlombok/lombok/1.18.0/c4647d46f0742746ac07ce4abeeee9b2fb18d147/lombok-1.18.0.jar
/Volumes/Daten/git/gradle-plugins-test/lombok/src/main/java

On big project this command can exceed 32767 characters which causes errors on windows: https://blogs.msdn.microsoft.com/oldnewthing/20031210-00/?p=41553
What I've tried so far:
Classpath Manifest
A common and well known workaround for such problems when invoking java applications with a long classpath, is to create a single jar which contains the actual classpath in its MANIFEST.MF.
Unfortunately this does'nt work for delombok's --classpath-option
Calling lombok.launch.Main.main() directly
Since the gradle task from which I want to run delombok is a java process itself, i've tried to directly invoke lomboks main()-method. Unfortunately this isn't an option too, because lombok internally calls System.exit().
Possible solutions
Support argfiles
Other java tools like javac, javadoc and ajc allow you to put all your command line arguments into an file, which can be passed to the process instead of the actual arguments: https://docs.oracle.com/javase/8/docs/technotes/tools/windows/javac.html#BHCCFGCD
Provide an API
It would be great to have a java API to invoke (de)lombok directly without the need of creating an additional java process

As far as I can see, we only call System.exit() if something goes wrong, or if you pass the help parameter.

lombok.core.Main#main(String[] args) calls System.exit() in every case

@rzwitserloot is going to implement the @filename syntax soon. In the meantime, we we will only call System.exit if the return code is not zero.

Since Java 9 the java command natively supports @argument files, so implementing this in lombok would only be necessary for java 8.
A nicer option would be a java API for invoking lombok, so I don't have to start an additional process

delombok specifically now supports @args.txt. Check it out in edge: https://projectlombok.org/download-edge


[test] Make RISC-V compliace call out to Meson, not Make.

...except that the files I've changed are not part of RISC-V compliance. I'm very confused as to why these files are in the vendor directory to begin with.

...except that the files I've changed are not part of RISC-V compliance. I'm very confused as to why these files are in the vendor directory to begin with.

These files are added in the 0001-test-Add-OpenTitan-target-to-riscv-compliance-testin.patch patch in sw/vendor/patches/riscv_compliance.  You must make the changes there.  Clone riscv_compliance, apply the patches, git format-patch them into the patches directory, and add them into the change.

@mcy do you plan to follow up on the review comments for this PR? Otherwise, please close this PR.

I think this needs to be started over from scratch, since I've broken how to call Meson a couple of times since.


request help: path like /api/*/action

Issue description
using apiroute crd to set path with /api/*/action will get an error
how to set path like /api/*/action with apiroute
Environment

your apisix-ingress-controller version 1.3.0
your Kubernetes cluster version 1.18
if you run apisix-ingress-controller in Bare-metal environment, also show your OS version (uname -a).

http://apisix.apache.org/docs/ingress-controller/concepts/annotations/#rewrite-target

Currently, APISIX doesn't support an infix wildcard match.

Currently, APISIX doesn't support an infix wildcard match.

any plan to add this support?

We need some discussion, or can rewrite meet your needs?

We need some discussion, or can rewrite meet your needs?

rewrite can do this.
I'm using nginx-ingress now, for example , I'm using this to spec different backends
/api/srv-1/.*/action1 =>  backend1:port
/api/srv-1/.*/action2 =>  backend2:port

There is a word around solution, you can use the regex match in the exprs.


Clean directory after recompile: round two

Hi,
This time I've added the watch functionality as an option instead of a default. Use {watch: true} to turn on deletion before recompilation.
This fixes issue #31, but not #29 because the origin of that issue wasn't because of my original pull request.

Coverage decreased (-3.4%) to 90.385% when pulling a643b038533368c0bc13fa09f6ea02bbf4330db4 on tylerhou:master into b4c1ab1bc49293e8e928bac72601ad73bdfee7a7 on johnagan:master.

Note that coverage decreased because I'm not sure how to write a test to test for the watch option, given how the tests are currently set up.

Is there any plans to merge this PR into master?

Anything we can do to expedite this ticket? It would be quite helpful for one of my projects :)

I'll bring this in this week. Sorry for the delay

Just so you know there's an alternative pull request which has tests (which might have a bug in it). #35

@tylerhou good call. thanks!

Coverage decreased (-3.3%) to 90.476% when pulling 60d1c558777e27f411e81ea95a1da706a11ef6de on tylerhou:master into 1e77c650233ac8e6cc603c8bbc248ee6f7a73455 on johnagan:master.

Thanks @tylerhou for keeping this one alive ✨


Save the distortion coefficients, camera intrinsic and extrinsic parameters in to EEPROM

Start with the Why:
As @Luxonis-Brandon mentioned EEPROM is big enough to store it I’m sure. So, if possible we should add the following information:

distortion coefficients of left/right/RGB
left intrinsic
right intrinsic
RGB intrinsic
Assuming right camera as the reference frame. extrinsic to left and RGB camera or from right to left and RGB.

Returning the above information using API helps the users in simulating and working with their own experiments without the necessity of calibrating again and storing this information on the host.
The How:
Currently, we are writing only Homography matrix to the EEPROM. So, we just need to load this additional information and provide a function to return it.  See more information from here on saving some of these.
The What:
This feature might help in converting the to point cloud externally, use different filtering, feature extraction techniques may be which are not available inside myriad X currently.

Thanks.  @saching13 is actually looking into this.  To save these in EEPROM and make them requestable easily through the API for such purposes.

So the EEPROM is plenty big enough to store it I’m sure.  So at least:

left/right rectification
left intrinsic
right intrinsic
RGB intrinsic
And probably extrinsics as well if possible between the cameras.

And then we should make all of these accessible easily via the API.

This is now implemented in https://github.com/luxonis/depthai/pull/190


containerized-lifecycle-3.1/1.1-introduction-to-containers-and-docker

Summary

Move content from original index article
Resize image

Included in https://github.com/dotnet/docs/pull/17863 b/c of related change in toc


PTX-13378: Fixing logic to fetch the telemetry status

https://jenkins.pwx.dev.purestorage.com/job/Torpedo/view/Operator Release Cloud Dashboard/job/tp-nextpx-gke-op-ms/

@jrivera-px Lets say if heap file is generated and .stack is not, in that case the file list will be 1 stack file from previous run and will cause the test to fail, I can keep a 10 sec sleep so that we dont run into this condition?


presets: setting cmake.buildToolArgs in configuration leads to build failures

Brief Issue Summary
-- is missing in the cmake build command line.
Simple repro case attached (cmake-presets-build-tool-args.tar.gz)
Steps to reproduce:

uncompress the archive
open the folder with vscode
configure & try to build with cmake => FAIL (see log below)
remove either CMakePresets.json or .vscode/settings.json and try again => SUCCESS

CMake Tools Diagnostics
No response
Debug Log
[main] Building folder: cmake-presets-build-tool-args
[main] Configuring project: cmake-presets-build-tool-args
[driver] NOTE: You are configuring with preset Default Config, but there are some overrides being applied from your VS Code settings.
[proc] Executing command: /usr/bin/cmake -S/home/jallard/cmake-presets-build-tool-args -B/home/jallard/cmake-presets-build-tool-args/build/default -G Ninja
[cmake] -- Configuring done (0.0s)
[cmake] -- Generating done (0.0s)
[cmake] -- Build files have been written to: /home/jallard/cmake-presets-build-tool-args/build/default
[build] Starting build
[driver] NOTE: You are building with preset default, but there are some overrides being applied from your VS Code settings.
[proc] Executing command: /usr/bin/cmake --build /home/jallard/cmake-presets-build-tool-args/build/default -n
[build] Unknown argument -n
[build] Usage: cmake --build <dir>             [options] [-- [native-options]]
[build]        cmake --build --preset <preset> [options] [-- [native-options]]
[build] Options:
[build]   <dir>          = Project binary directory to be built.
[build]   --preset <preset>, --preset=<preset>
[build]                  = Specify a build preset.
[build]   --list-presets[=<type>]
[build]                  = List available build presets.
[build]   --parallel [<jobs>], -j [<jobs>]
[build]                  = Build in parallel using the given number of jobs.
[build]                    If <jobs> is omitted the native build tool's
[build]                    default number is used.
[build]                    The CMAKE_BUILD_PARALLEL_LEVEL environment variable
[build]                    specifies a default parallel level when this option
[build]                    is not given.
[build]   -t <tgt>..., --target <tgt>...
[build]                  = Build <tgt> instead of default targets.
[build]   --config <cfg> = For multi-configuration tools, choose <cfg>.
[build]   --clean-first  = Build target 'clean' first, then build.
[build]                    (To clean only, use --target 'clean'.)
[build]   --resolve-package-references={on|only|off}
[build]                  = Restore/resolve package references during build.
[build]   -v, --verbose  = Enable verbose output - if supported - including
[build]                    the build commands to be executed.
[build]   --             = Pass remaining options to the native tool.
[proc] The command: /usr/bin/cmake --build /home/jallard/cmake-presets-build-tool-args/build/default -n exited with code: 1
[driver] Build completed: 00:00:00.012
[build] Build finished with exit code 1

Additional Information
I already have a simple fix, will submit a PR...

@JeremieA Thank you for your GitHub issue! We are trying to reproduce your issue, but in the process we have the following problem and we wanted to check with you, is this the expected result?
Repro steps:

Download and open this project(cmake-presets-build-tool-args.tar.gz) by VSCode
Click F1 to run "CMake: Build" command
Re-run "CMake: Build" command

Actual result:
Both builds fail with the following error in the output window
Output window:
[main] Building folder: cmake-presets-build-tool-args
[main] Configuring project: cmake-presets-build-tool-args
[proc] Executing command: "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.EXE" -SC:/Users/v-cathyzhang/Desktop/cmake-presets-build-tool-args/cmake-presets-build-tool-args -BC:/Users/v-cathyzhang/Desktop/cmake-presets-build-tool-args/cmake-presets-build-tool-args/build/default -G Ninja
[cmake] CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
[cmake] CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
[cmake] -- Configuring incomplete, errors occurred!
[proc] The command: "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.EXE" -SC:/Users/v-cathyzhang/Desktop/cmake-presets-build-tool-args/cmake-presets-build-tool-args -BC:/Users/v-cathyzhang/Desktop/cmake-presets-build-tool-args/cmake-presets-build-tool-args/build/default -G Ninja exited with code: 1

@Yingzi1234 thanks for trying to reproduce it.
I should have mentioned that my repro case was only tested on Linux.
It should work on Windows by replacing the presets file with this version: CMakePresets.json
After updating the file and opening the folder in VSCode, the "Ninja/MSVC v143" configure preset needs to be selected.
Here is the output in this case:
[main] Building folder: cmake-presets-build-tool-args
[main] Configuring project: cmake-presets-build-tool-args
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" -DCMAKE_C_COMPILER=cl -SF:/cmake-presets-build-tool-args -BF:/cmake-presets-build-tool-args/build/ninja_msvc -G "Ninja Multi-Config"
[cmake] -- The C compiler identification is MSVC 19.36.32534.0
[cmake] -- Detecting C compiler ABI info
[cmake] -- Detecting C compiler ABI info - done
[cmake] -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/cl.exe - skipped
[cmake] -- Detecting C compile features
[cmake] -- Detecting C compile features - done
[cmake] -- Configuring done (1.5s)
[cmake] -- Generating done (0.0s)
[cmake] -- Build files have been written to: F:/cmake-presets-build-tool-args/build/ninja_msvc
[build] Starting build
[driver] NOTE: You are building with preset ninja_msvc, but there are some overrides being applied from your VS Code settings.
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.EXE" --build F:/cmake-presets-build-tool-args/build/ninja_msvc -n
[build] Unknown argument -n
[build] Usage: cmake --build <dir>             [options] [-- [native-options]]
[build]        cmake --build --preset <preset> [options] [-- [native-options]]
[build] Options:
[build]   <dir>          = Project binary directory to be built.
[build]   --preset <preset>, --preset=<preset>
[build]                  = Specify a build preset.
[build]   --list-presets[=<type>]
[build]                  = List available build presets.
[build]   --parallel [<jobs>], -j [<jobs>]
[build]                  = Build in parallel using the given number of jobs.
[build]                    If <jobs> is omitted the native build tool's
[build]                    default number is used.
[build]                    The CMAKE_BUILD_PARALLEL_LEVEL environment variable
[build]                    specifies a default parallel level when this option
[build]                    is not given.
[build]   -t <tgt>..., --target <tgt>...
[build]                  = Build <tgt> instead of default targets.
[build]   --config <cfg> = For multi-configuration tools, choose <cfg>.
[build]   --clean-first  = Build target 'clean' first, then build.
[build]                    (To clean only, use --target 'clean'.)
[build]   --resolve-package-references={on|only|off}
[build]                  = Restore/resolve package references during build.
[build]   -v, --verbose  = Enable verbose output - if supported - including
[build]                    the build commands to be executed.
[build]   --             = Pass remaining options to the native tool.
[proc] The command: "C:\Program Files\CMake\bin\cmake.EXE" --build F:/cmake-presets-build-tool-args/build/ninja_msvc -n exited with code: 1
[driver] Build completed: 00:00:00.065
[build] Build finished with exit code 1

@gcampbell-msft @JeremieA We can reproduce this issue on latest version, you can get the details below.
ENV:
VSCode version: 1.89.1
CMake tools version: v1.18.39(pre-release)
C/C++ version: v1.20.5
Repro steps:

Open this project cmake-presets-build-tool-args.zip with VSCode
Click F1 to run "CMake: Build" command
Select the configure preset "Ninja/MSVC v143"

Actual result:
The build will fail.
Output window:
[proc] The command: C:\Windows\System32\where.exe cl exited with code: 1
[preset] Configure preset ninja_msvc: No toolset version specified for cl.exe, using latest by default
[preset] Using developer environment from Visual Studio (instance fafbec2e, version 17.9.34902.65, installed at "C:\Program Files\Microsoft Visual Studio\2022\Community")
[proc] Executing command: chcp
[visual-studio] Patch Windows SDK path from C:\Program Files (x86)\Windows Kits\10\bin\x64 to C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64 for C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat
[proc] The command: C:\Windows\System32\where.exe ninja exited with code: 1
[preset] Ninja is not set on PATH, trying to use C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja\ninja.exe
[main] Configuring project: cmake-presets-build-tool-args
[proc] Executing command: "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.EXE" -DCMAKE_C_COMPILER=cl "-SC:/Users/v-cathyzhang/Desktop/cmake-presets-build-tool-args (1)/cmake-presets-build-tool-args" "-BC:/Users/v-cathyzhang/Desktop/cmake-presets-build-tool-args (1)/cmake-presets-build-tool-args/build/ninja_msvc" -G "Ninja Multi-Config"
[cmake] -- The C compiler identification is MSVC 19.39.33523.0
[cmake] -- Detecting C compiler ABI info
[cmake] -- Detecting C compiler ABI info - done
[cmake] -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.39.33519/bin/Hostx64/x64/cl.exe - skipped
[cmake] -- Detecting C compile features
[cmake] -- Detecting C compile features - done
[cmake] -- Configuring done (10.4s)
[cmake] -- Generating done (0.0s)
[cmake] -- Build files have been written to: C:/Users/v-cathyzhang/Desktop/cmake-presets-build-tool-args (1)/cmake-presets-build-tool-args/build/ninja_msvc
[main] Building folder: cmake-presets-build-tool-args
[build] Starting build
[driver] NOTE: You are building with preset ninja_msvc, but there are some overrides being applied from your VS Code settings.
[proc] Executing command: "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.EXE" --build "C:/Users/v-cathyzhang/Desktop/cmake-presets-build-tool-args (1)/cmake-presets-build-tool-args/build/ninja_msvc" -n
[build] Unknown argument -n
[build] Usage: cmake --build <dir>             [options] [-- [native-options]]
[build]        cmake --build --preset <preset> [options] [-- [native-options]]
[build] Options:
[build]   <dir>          = Project binary directory to be built.
[build]   --preset <preset>, --preset=<preset>
[build]                  = Specify a build preset.
[build]   --list-presets[=<type>]
[build]                  = List available build presets.
[build]   --parallel [<jobs>], -j [<jobs>]
[build]                  = Build in parallel using the given number of jobs.
[build]                    If <jobs> is omitted the native build tool's
[build]                    default number is used.
[build]                    The CMAKE_BUILD_PARALLEL_LEVEL environment variable
[build]                    specifies a default parallel level when this option
[build]                    is not given.
[build]   -t <tgt>..., --target <tgt>...
[build]                  = Build <tgt> instead of default targets.
[build]   --config <cfg> = For multi-configuration tools, choose <cfg>.
[build]   --clean-first  = Build target 'clean' first, then build.
[build]                    (To clean only, use --target 'clean'.)
[build]   --resolve-package-references={on|only|off}
[build]                  = Restore/resolve package references during build.
[build]   -v, --verbose  = Enable verbose output - if supported - including
[build]                    the build commands to be executed.
[build]   --             = Pass remaining options to the native tool.
[proc] The command: "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.EXE" --build "C:/Users/v-cathyzhang/Desktop/cmake-presets-build-tool-args (1)/cmake-presets-build-tool-args/build/ninja_msvc" -n exited with code: 1
[driver] Build completed: 00:00:00.431
[build] Build finished with exit code 1

Verified on CMake Tools v1.18.43(pre-release), this issue was fixed:

FYI: This "fix" broke our build.  In order to pass command line options to ninja, we were adding "--" to the command line using the setting "CMake: Build Tool Args".  Now it is added twice, causing the build to fail.  Perhaps it was a bug not to include it in the first place, but some users whose configuration worked around the issue may be left wondering why their builds suddenly fail.

@blackworm27 Could you show me what you have as arguments in your "CMake: Build Tool Args"? Couldn't you simply remove the "--" from your defined arguments?

Couldn't you simply remove the "--" from your defined arguments?

Sorry if I was unclear.  I have no current issue; I did indeed remove the extra "--" from the arguments when I diagnosed my broken build, and now can build without any problems.  I only wanted to flag the fact that those who previously worked around this issue by manually adding "--" to the arguments, now face broken builds with the update, without necessarily understanding the cause.  Perhaps the fix could be improved by checking for the presence of a manually-added "--" before automatically adding the "--".


Difference between Pytorch and Tensorflow

Hi,
Is there a specific reason on why you decided to implement this model in Tensorflow and not in Pytorch?

Hi,
Is there a specific reason on why you decided to implement this model in Tensorflow and not in Pytorch?

I believe Tensorflow was more developed at that time. And that may be the reason.


How to specify e.g. audience, expiresIn in options

If I'm reading the README correctly, I should be able to:
jwt.sign("", key, {
    algorithm: "RS256",
    audience: c.projectID,
    expiresIn: "24h"
});

But this generates errors.
Error: invalid expiresIn,audience option for string payload

Instead I must:
jwt.sign({
    aud: c.projectID,
    exp: Math.floor(Date.now()/1000 + 24*3600),
}, key, {
    algorithm: "RS256"
});

And I don't know why... I think the code support this

When you pass a string of buffer to sign it does not set items like audience and expiresIn, since the payload is already considered a JSON string.
The following will work:
jwt.sign({}, key, {
    algorithm: "RS256",
    audience: c.projectID,
    expiresIn: "24h"
});

The documentation in this regard could be greatly improved, as it only mentions that exp will not be set:

payload could be an object literal, buffer or string representing valid JSON. Please note that exp is only set if the payload is an object literal. Buffer or string payloads are not checked for JSON validity.


Add table remove function support

Purpose

Describe the problems, issues, or needs driving this feature/fix and include links to related issues.

Fixes #
Approach

Describe how you are implementing the solutions along with the design details.

Samples

Provide high-level details about the samples related to this feature.

Remarks

List any other known issues, related PRs, TODO items, or any other notes related to the PR.

Check List

[ ] Read the Contributing Guide
[ ] Required Balo version update
[ ] Updated Change Log
[ ] Checked Tooling Support (#)
[ ] Added necessary tests

[ ] Unit Tests
[ ] Spec Conformance Tests
[ ] Integration Tests
[ ] Ballerina By Example Tests

[ ] Increased Test Coverage
[ ] Added necessary documentation

[ ] API documentation
[ ] Module documentation in Module.md files
[ ] Ballerina By Examples

Codecov Report

Merging #18383 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master   #18383   +/-   ##
=======================================
  Coverage   14.86%   14.86%
=======================================
  Files          48       48
  Lines        1265     1265
  Branches      201      201
=======================================
  Hits          188      188
  Misses       1063     1063
  Partials       14       14

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 65255a3...0318150. Read the comment docs.


Plugin version

Team,
I have successfully build gem file but I like to know for which version of logstash is this plugin is supported?
Also, I would like to run this Plugin with latest version of ELK stack v7?
Looking forward to hearing from you.
Many Thanks,
Madhu

Neal,
This is a beta project and is unsupported. You're welcome to submit pull requests and we will review.
Thanks.


update orderbook_sync

enhancement for issue #23

Fixed in #60 — thanks a lot @amazingandyyy!

Nice! LGTM 👍  good job!


Lost of .jsx extension

Looks like #38 merged pull request has moved reactSuffix from .jsx to .js, breaking some user build rules or code editor conf based on the extension.
Example: scripts/component/main.js is still a JSX file but with the .js extension.
Any particular reason for this change? /cc @andrewliebchen

It's a hot topic and I welcome thoughts, maybe this should be configurable and therefore an option when running Yeoman....?
https://github.com/facebook/react/issues/832
https://github.com/kriasoft/react-starter-kit/issues/52#issuecomment-72844613

Making it an option is a nice idea!

Oh indeed, it looks clear that Facebook is pushing forward the .js extension (see latest reactjs conf videos, or their code example).
And some code editor plugins are experimenting other ways to detect JSX file.
In the end, I'm in favor of keeping .js as the default and only option:

to continue this convention adoption effort
to avoid confusing new react user with an extra subtle option

to avoid confusing new react user with an extra subtle option
@cedricss agreed. So, I will close this and stick with how it is for now but reopen if the consensus changes.


[v1.14] gh: datapath-verifier: also run on 6.1 kernel

Backport of

https://github.com/cilium/cilium/pull/29349

/ci-verifier

ci-verifier is green.


(don't merge) Limit the Travis tests to scripted dependency-management/publish-local

This is a PR for debugging Travis failures on scripted dependency-management/publish-local

The comments should now show up in chat.


RegisteredClientRepository and OAuth2AuthorizationService should have a method to query all active entries.

It is currently not possible to get a list of all registered clients and/or active authorizations (with their corresponding tokens).
RegisteredClientRepository should have a method to get all registered clients. And the OAuth2AuthorizationService should have a method to get all (active) authorizations or all (active) authorizations for a given principal.

@bschoenmaeckers A findAll() operation is not needed by the framework at the moment and I'm not anticipating it will be needed.
I see this more of an admin operation, where admins want to view all granted tokens and possibly revoke some. This would be the responsibility of the admin app to extend OAuth2AuthorizationService and provide the extension operations.
I'm going to close this as it's not needed by the existing framework components.

Makes sense! I missed the latest commit which made both JDBC implementations non-final so this should be possible now.

Makes sense! I missed the latest commit which made both JDBC implementations non-final so this should be possible now.

Nevermind... 473dedb

@bschoenmaeckers We reverted the commit for now but it will be merged in 3 separate commits and the classes will be made non-final.

@jgrandja Will the findBy methods be accessible to the subclasses as well? This would make it considerable easier to make custom query methods.

Yes, we'll make the methods protected wherever it makes sense. cc/ @sjohnr

Excellent!

Yes, I will fold that in, as that makes a lot of sense for the use case under discussion here. Thanks @bschoenmaeckers!

@bschoenmaeckers After discussion, and considering previous comments on this issue, I won't be making any changes related to this. Reason being (as @jgrandja mentioned) this is a product feature needed by an admin application, and should not be provided by the framework. I recommend extending the interface and providing the findAll() functionality in your own application. Sorry about the confusion here.

Hi @sjohnr, I understand your decision. But it will still help to make some helper methods and getters in the JDBC implementation accessible by subclasses. Are you still planning to that or not? Thanks anyway!

Yes, I am working on that now. Again, sorry for the confusion :smile:, I was just referring to the findAll() discussion.

I use JdbcTemplate to findAll
@Component
public class CustomRegisteredClientRepo {

  @Autowired
  private JdbcTemplate jdbcTemplate;

  public Page<CustomClient> findAll(Pageable page) {
    Order order = !page.getSort().isEmpty() ? page.getSort().toList().get(0) : Order.by("id");

    SqlRowSet rs = jdbcTemplate.queryForRowSet("SELECT * FROM oauth2_registered_client ORDER BY "
        + order.getProperty() + " " + order.getDirection().name() + " LIMIT " + page.getPageSize()
        + " OFFSET " + page.getOffset());

    long count =
        jdbcTemplate.queryForObject("select count(*) from oauth2_registered_client", long.class);

    List<CustomClient> list = new ArrayList<CustomClient>();

    while (rs.next()) {
      CustomClient client = new CustomClient();
      client.setId(rs.getString("id"));
      client.setClientId(rs.getString("client_id"));
      list.add(client);
    }
    return new PageImpl<CustomClient>(list, page, count);
  }
}


cannot run make.m with Microsoft Visual C++ 2013

Hello,
Here is the error message I get:

make
=> Creating Libraries
Building with 'Microsoft Visual C++ 2013 Professional'.
MEX completed successfully.
Building with 'Microsoft Visual C++ 2013 Professional'.
MEX completed successfully.
=> Creating Functions
Building with 'Microsoft Visual C++ 2013 Professional'.
MEX completed successfully.
Building with 'Microsoft Visual C++ 2013 Professional'.
MEX completed successfully.
Building with 'Microsoft Visual C++ 2013 Professional'.
MEX completed successfully.
Building with 'Microsoft Visual C++ 2013 Professional'.
Error using mex
LINK : fatal error LNK1104: cannot open file  'libboost_filesystem-vc120-mt-1_60.lib'

Error in make (line 63)
mex(flags{:},ipaths,lpaths,libraryObjects{:},drivers{k})

Solved! I had to change the BOOST_ROOT subpath in make.m


sqlite: remove some allocs

@crawshaw, you fine with this bumping minimum required Go version to 1.20?
Feel free to merge if happy.