import/no-useless-path-segments doesn't work on absolute imports #237

When using an absolute import import/no-useless-path-segments is ignored:
Absolute import:

Relative import:

That's expected, because only on relative paths can those assumptions be safely applied.

That's expected, because only on relative paths can those assumptions be safely applied.

@ljharb Could you expand on this? I do not see why this rule could not be safely applied to absolute paths. I'm also not seeing anything in the documentation of that rule explaining this.

Because absolute paths aren't portable outside a project, which is why they should never be used regardless. See https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-absolute-path.md

ah. Can you share your eslint config?  If the docs call them absolute imports then in the context of NextJs these are absolute imports.

@halcarleton you're wrong, but it's fine, i've already reached out to vercel employees to fix their incorrect docs. so soon they won't be incorrectly calling them "absolute" anymore.

My bad then, I was referring to project-relative paths, not absolute ones. I'd imagine an absolute path has to start with /, in my example they were all src/. 🤷

@icatalina in that case i would definitely expect it to work.
What's your eslint config? Are you using the TS eslint parser and eslint-import-resolver-typescript?

Just to clarify since the conversation is a little confusing, are imports from aliases supposed to work with the rule? I don't get warned when I have wrong import paths such as:
import x from "@app/something//foo/bar";

With jsconfig.json:
{
  "compilerOptions": {
    ...
    "paths": {
      "@app/*": [
        "src/*"
      ],
    }
  },
}

I wouldn't expect jsconfig.json to work (unless tsconfig-paths supports it in v3). You'd also need to have the typescript resolver configured.

really you'd need a jsconfig resolver, but none exists that i'm aware of. jsconfig isn't really a standard thing, so few things support it.

So in conclusion, this rule doesn't work with aliases when not in a TS project?

It works with multiple kinds of aliases - webpack ones, tsconfig ones, babel ones - but since jsconfig isn't any kind of standard, someone would have to create an eslint-import-resolver-jsconfig package.
and it looks like someone did! https://www.npmjs.com/package/eslint-import-resolver-jsconfig that should solve your issue.

I completely forgot that my aliases are also specified in my .eslintrc:
settings: {
  "import/resolver": {
    alias: {
      map: [["@app", "./src"]]
    }
},

I use eslint-import-resolver-alias for it.
Is the rule supposed to work in this case then? 😅

ok well, using the eslint settings it should definitely work - i'm not sure if it's a problem here, or with that resolver tho?
(either way, whatever's doing the actual work so that those paths resolve at runtime in production, should probably be the resolver you use)

I can try another resolver when I have some time, maybe this one since the other one is archived, and see if it makes a difference!

It's not working with the other resolver either, so I don't think the problem comes from this.

Typically I use babel, and a babel alias resolver, to do custom aliases - i'm not even sure what tooling supports jsconfig.

Sorry, I was probably not clear on my first message. What is not working for me is the linting on the IDE (via VSCode ESLint extension). The aliases defined on the jsconfig are (in my case) only for VSCode IntelliSense, and I shouldn't have mentioned them. I use the plugins eslint-import-resolver-alias or eslint-import-resolver-custom-alias to handle the aliases for ESLint. Linting via the IDE should not require babel or webpack or other tools like this... or is there something I'm missing?

No, you're totally right - but what is making the aliases work at runtime?

If I'm not wrong about the meaning of "runtime", then I use webpack resolve.alias. But since I don't use EslintWebpackPlugin, ESLint is never involved.

ok - if you're using webpack to make the aliases work, then i'd suggest using the webpack resolver instead of the module-alias ones.

But my aliases already work fine with the ESLint resolvers, the problem don't come from them. And I don't see how is webpack related to all of this, again I'm talking about linting on the IDE, no code compilation involved. The rule just doesn't seem to support aliases given this configuration.

@Arkellys the way this plugin works, it needs a resolver. You're 100% right that the resolver doesn't have to match the actual runtime mechanism that makes it work - but it's much simpler if it does, so I'd suggested trying the webpack resolver instead of the alias one.
"linting on the IDE doesn't work" and "the ESLint resolvers work" are conflicting statements - unless you're saying it works on the command line and not in the IDE, in which case it's an IDE-specific issue.

Neither the CLI nor linting on the IDE works. I'm saying the resolvers work because if I don't use one I will get lint errors on imports using aliases (via the rule import/no-unresolved if I remember correctly). I don't want to involve webpack into my ESLint stuff, I just wanted to confirm that it was a lack of support of import/no-useless-path-segments. Thank you.

ahh, sorry, i'd forgotten the context here :-) thanks for bearing with me.
Indeed, see https://github.com/import-js/eslint-plugin-import/issues/2865#issuecomment-1692309170 - only paths that remain actually relative in your source code are supported by that rule.
Closing, since the original question was answered.


Add created_after filter to ListMeasurementsRequest

Needed for checking and filtering previous measurements before prober measurement creation

This change is


1.6.5 r3 lighting issue.

Hi,
The negative scale bug seems to be fixed, but there is another one.

the previous sea3d.min with my workaround:
http://necromanthus.com/Test/html5/SMC.html
Everything looks ok.

the new sea3d.min without any workaround:
http://necromanthus.com/Test/html5/SMC_new.html
The lighting (on buildings) is flipped on X and Y.

cheers

For skinned meshes everything is ok:
Old: http://necromanthus.com/Test/html5/Lara.html
New: http://necromanthus.com/Test/html5/Lara_new.html
But for static meshes ... see the above lighting bug.

If the light is loaded from 3DS Max, everything looks ok:
http://necromanthus.com/Test/html5/SMC_new2.html
The bug: (X,Y) in 3DS Max become (-X,-Z) in THREE.
It should become (X,Z).
cheers

sunag (Jean Carlo),
I've done more testings and that "Y to -Z" issue is a minor one.
All the other 3DS Max exporters generate the models with PI/2 rotation on the X axis.
It can be corrected with a single JavaScript line, so let's forget about it.
Overall 1.6.5 r3 is well done.
Congrats.
A few thoughts:

please investigate why Spot Light is exported as Directional Light.

onProgress is worthless.
Please rename "onDownloadProgress" with "onProgress" and
"position" with "loaded"
"length" with "total"
It will unify the SEA3DLoader with the other THREE loaders.

all the best

Hi @RemusMar
Thank you for tests! I renamed position and length. Try now using onProgress can get the LOAD_PROGRESS for complex models in low cpu processing and DOWNLOAD_PROGRESS for network data acquisition.
var loader = new SEA3D.Loader()

loader.onProgress = function( e ) {
	if ( e.type == THREE.SEA3D.Event.DOWNLOAD_PROGRESS ) {
		// network progress
	} else if ( e.type == THREE.SEA3D.Event.LOAD_PROGRESS ) {
		// local progress
	}
}

If using onProgress not use in combination with onDownloadProgress or onLoadProgress.
I made a brief update on the site with some new features.
http://developers.poonya.com/forum/viewtopic.php?t=55
Thanks,
Cheers.

Hi @RemusMar
Continuing...
I'll take a look at the SpotLight and other things to the next SEA3D features, also includes an improved for the Three.JS Loader. We will work it in the next few months.
Thanks,
Cheers.

Thank you for tests! I renamed position and length.

Excellent work!
http://necromanthus.com/Test/html5/SMC.html  (full SEA3D)
http://necromanthus.com/Test/html5/testA.html (the room and Lara are SEA3D)
cheers


Go button should be disabled when input field empty

On the homepage, the Go button should be disabled when there is no room name entered in.

Done in 5059db404af056c60a03fbfefc7a2225335f44a0


ci: run macOS workflows on the new MacOS M1 runners

This doesn't really work. Asked in https://github.com/ipdxco/unified-github-workflows/issues/62.


bugfix: typo in the installation destination of go-licenses

Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/retest


[SideNav] Active selection of parent item when child is active, is not working when nav bar is minimised

What package is this for?

[x] React
[ ] Angular

Describe the bug
The active selection is stuck at the first active nav link selected.
The children do not get minimised within the side nav when new selection is made
To Reproduce
The issue can be seen on the storybook example of Header with side nav

I have also noticed this problem in Graphite

The story in question is not a stateful example of the sidenav. The prop, sideNavProps is an object that has a property of links which is an array of link objects. This is hard coded in our story. What I do see is that somewhere along the line the prop was changed to align with Carbon refactor but our proptype definition was never updated. isActive must be part of the link object to get the active link state. I will update our proptype definitions and update our storybook to be stateful.

I did have to update the SuiteHeader component as I was having troubles getting the story to work. The PR for this is mentioned above and also here


undecorate does not recognize nested color in style

Describe the problem
Undecorate does not recognize nested colors/styles.
Steps to reproduce the problem
require 'pastel'
require 'strscan'
pastel = ::Pastel.new
pastel.new.undecorate(pastel.bold('FIRST' + pastel.blue('SECOND') + 'THIRD'))[1]
# {:foreground=>:blue, :text=>"SECOND"}
pastel.new.undecorate(pastel.on_yellow('FIRST' + pastel.blue('SECOND') + 'THIRD'))[1]
# {:foreground=>:blue, :text=>"SECOND"}
pastel.new.undecorate(pastel.on_yellow('FIRST' + pastel.bold('SECOND') + 'THIRD'))[1]
# {:style=>:bold, :text=>"SECOND"}

Actual behaviour
The nested part ('SECOND') does not not retain the wrapping color/style.
Expected behaviour
Expected the undecorate to recognize the nested valid styles.
Describe your environment

OS version: Ubuntu 18.04.3 LTS
Ruby version: ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux] (in docker, FROM ruby:2.6.5)
Pastel version: 0.7.3

nice, thanks!

Released v0.8.0. Next, I'll update all the tty gems that rely on pastel and relax their version restrictions.


interface: added provisional APIs for notifications (alerts)

Description of your changes
This PR adds provisional APIs for notifications (alerts).
I have:

[x] Run make reviewable to ensure this PR is ready for review.

How has this code been tested
N/A
Special notes for your reviewer

Note: the thought/original design on this API has changed a bit upon closer inspection; will write a mini UX doc to explain some of the decisions and the workflow.

Note: per earlier discussions, this PR is under some tweaking towards a more event-based experience.

Closing this PR as it is pending further discussion.


Bump vue to vue 3.0.4

Please bump vue to the latest version. Right now it does not wanna install in my vue 3 project!

Hello @redsuperbat ;
Could you provide the log message from your package manager so I can take a look at what's wrong with using the package with Vue 3.0.4 ?
As you can see in the repository, the "demo" folder is actually running Vue 3.0.4 and vue-use-sound without any problems.
The peerDependency parameter is allowing >=3.0.0-rc0 (first Vue 3 release), so it should actually accept every version of Vue 3.
Thank you for your issue anyway, I hope we can find a fix to your problem.

Alright cool. I did not see that. Here are the logs trying to use npm to install the package:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving<EMAIL_ADDRESS>npm ERR! Found<EMAIL_ADDRESS>npm ERR! node_modules/vue
npm ERR<EMAIL_ADDRESS>from the root project
npm ERR!   peer<EMAIL_ADDRESS>|| >=3.0.0-rc.0" from<EMAIL_ADDRESS>npm ERR!   node_modules/vue-use-sound
npm ERR!     vue-use-sound@"" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vue@">= 2.5 < 3" from<EMAIL_ADDRESS>npm ERR! node_modules/@vue/composition-api
npm ERR!   peer<EMAIL_ADDRESS>from<EMAIL_ADDRESS>npm ERR!   node_modules/vue-use-sound
npm ERR!     vue-use-sound@"" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /home/max/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR!     /home/max/.npm/_logs/2020-12-21T12_13_15_677Z-debug.log

You should maybe try following the error output and try --force & --legacy-peer-deps.
I'm using this package on at least 2 Vue 3 projects, and it works seamlessly.
I would be glad to help you out if you could provide a little bit more details about your project.
Thanks you @redsuperbat

(Also, I can advise you to try removing .node_modules and running npm install again.)

Hey!
Decided to write my own hook instead! My usecase was limited anyway so it was a better solution ☺ Might revisit this later if the need for the package arises but for now I'll close the issue!


highlight potential restoration values

the "Status Bars" plugin is able to achieve this but I appreciate that this plugin allows the bars to be rearranged. what I'm interested in is the ability for the bars to be able to show how much would be healed when hovering over consumables such as Lobsters, Prayer Potions, Energy Potions, etc. it would be a welcome addition that would be very intuitive

hello, I've successfully attempted a refactor of the source by combining it with elements of said "Status Bars" plugin to achieve this, while maintaining the movability and also adding an option for which cardinal direction to progress the bar. I'd like to submit a pull request in order for you to review the changes.

I saw your comment on Reddit, sorry I don’t check GitHub too often. Yeah sounds good mate, submit a PR and I will review.


A way to downlevel only generators to ES5

Describe the feature
There is a JS interpreter for .NET called Jint whose support for ES features up to ES2021 is pretty solid, however it doesn't support generators. Unfortunately, SWC isn't flexible enough for that, so we have to downlevel everything to ES5 while it'd preferable to do that only for generators.
Babel plugin or link to the feature description
No response
Additional context
No response

The preset-env plugin should support this:
{
  "env": {
    "targets": "last 1 Chrome versions",
    "include": [ "transform-regenerator" ]
  }
}

That'll force the generator -> regenerator transform, while using the latest Chrome releases supported features for everything else.

Thanks. Overlooked this.

It doesn't work though. See an isolated example.

https://github.com/swc-project/swc/blob/8da12aa05fa602feb290acd6ee8b0e14409035b7/node-swc/__tests__/transform/preset-env_test.mjs#L4-L28

Still doesn't work with 1.3.11 - playground

Playground it unrelated and I already verified that it's working with @swc/core

SWC 1.3.11 can't compile that code with that config:
package.json
{
  "dependencies": {
    "@swc/cli": "0.1.57",
    "@swc/core": "1.3.11"
  }
}

.swcrc
{
  "env": {
    "targets": "last 1 Chrome versions",
    "include": [ "transform-regenerator" ]
  }
}

input.js
function* f(q) {
  const { a } = q;
}

Result:
d:\dev\repro>npx swc input.js
thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\swc_ecma_transforms_compat-0.136.21\src\es2015\generator.rs:997:53
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failed to handle: called `Option::unwrap()` on a `None` value
Error: Failed to compile 1 file with swc.
    at Object.assertCompilationResult (d:\dev\repro\node_modules\@swc\cli\lib\swc\util.js:113:15)
    at files (d:\dev\repro\node_modules\@swc\cli\lib\swc\file.js:173:18)
    at async _default (d:\dev\repro\node_modules\@swc\cli\lib\swc\file.js:192:9)

Problem is that you have ES2015 in your input


Fixed regression introduced by 8.0.1660 when doing :edit ++enc=utf8 +bad=...

This PR fixes a regression introduced by patch 8.0.1660.
Since that patch, it is no longer possible to do things like:
  :e! ++enc=utf8 ++bad=keep

It results "E474: Invalid argument" whereas it should succeed.
The PR also adds a test as ++bad= was until now not covered
by tests according to codecov:
https://codecov.io/gh/vim/vim/src/master/src/ex_docmd.c#L5313

Codecov Report

Merging #2966 into master will increase coverage by 0.02%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #2966      +/-   ##
==========================================
+ Coverage    75.8%   75.83%   +0.02%
==========================================
  Files          92       92
  Lines      135080   135081       +1
==========================================
+ Hits       102399   102438      +39
+ Misses      32681    32643      -38

Impacted Files
Coverage Δ

src/ex_docmd.c
76.97% <100%> (+0.32%)
:arrow_up:

src/gui_beval.c
62.66% <0%> (-0.43%)
:arrow_down:

src/gui.c
49.25% <0%> (-0.21%)
:arrow_down:

src/ex_cmds2.c
80.2% <0%> (-0.1%)
:arrow_down:

src/message.c
74.78% <0%> (-0.05%)
:arrow_down:

src/syntax.c
78.35% <0%> (-0.03%)
:arrow_down:

src/os_unix.c
54.39% <0%> (+0.04%)
:arrow_up:

src/window.c
82.3% <0%> (+0.09%)
:arrow_up:

src/gui_gtk_x11.c
47.98% <0%> (+0.09%)
:arrow_up:

src/channel.c
83.11% <0%> (+0.11%)
:arrow_up:

... and 3 more

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 33c5e9f...5cf86ed. Read the comment docs.

related and probably fixes #2947

@chrisbra wrote:

related and probably fixes #2947

Indeed, I now see that you proposed the same patch in #2947.
This PR has a better test though than the patch in #2947 as
it covers all cases of ++bad=... so I leave it opened.


Changing Drive Letter article

first attempt at artilce fpr the blog

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.0 out of 3 committers have signed the CLA.:x: sivyel:x: doctordns:x: sdwheelerYou have signed the CLA already but the status is still pending? Let us recheck it.

This looks ready to merge, but I do not have permission to do that.


Runtime NPM Issue

I haven't been able to run the projcect locally I install NPM but whenever I start npm
it shows the following error
C:\Users\akshat\evote\web-app\server>npm install
npm WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none is installed. You must install peer dependencies yourself.
npm WARN<EMAIL_ADDRESS>No description
npm WARN<EMAIL_ADDRESS>No repository field.
npm WARN<EMAIL_ADDRESS>No license field.

audited 2359 packages in 42.46s
found 18 low severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details

C:\Users\akshat\evote\web-app\server>npm start

><EMAIL_ADDRESS>start C:\Users\akshat\evote\web-app\server
> ./node_modules/nodemon/bin/nodemon.js src/app.js

'.' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR<EMAIL_ADDRESS>start: `./node_modules/nodemon/bin/nodemon.js src/app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR!      C:\Users\akshat\AppData\Roaming\npm-cache\_logs\2020-04-07T11_45_12_000Z-debug.log

C:\Users\akshat\evote\web-app\server>

I haven't been able to figure out how to solve this issue.
I tried to use NPM 8.9.0 and it brings up the same issue and more

C:\Users\akshat\evote\web-app\server>npm install
npm WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none is installed. You must install peer dependencies yourself.
npm WARN<EMAIL_ADDRESS>No description
npm WARN<EMAIL_ADDRESS>No repository field.
npm WARN<EMAIL_ADDRESS>No license field.

npm ERR! path C:\Users\akshat\evote\web-app\server\node_modules\grpc\node_modules\abbrev
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\akshat\evote\web-app\server\node_modules\grpc\node_modules\abbrev' -> 'C:\Users\akshat\evote\web-app\server\node_modules\grpc\node_modules\.abbrev.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR!      C:\Users\akshat\AppData\Roaming\npm-cache\_logs\2020-04-07T12_16_57_399Z-debug.log

So am I missing something

@akshatbahety
Try node app.js instead of npm start
let me know if that works. seems like npm start is for some reason putting a period in the command which is making it fail

Still not working
C:\Users\akshat\evote\web-app\server>npm start

><EMAIL_ADDRESS>start C:\Users\akshat\evote\web-app\server
> ./node_modules/nodemon/bin/nodemon.js src/app.js

'.' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR<EMAIL_ADDRESS>start: `./node_modules/nodemon/bin/nodemon.js src/app.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR!      C:\Users\akshat\AppData\Roaming\npm-cache\_logs\2020-04-09T16_53_42_528Z-debug.log

C:\Users\akshat\evote\web-app\server>node app.js
module.js:538
    throw err;
    ^

Error: Cannot find module 'C:\Users\akshat\evote\web-app\server\app.js'
    at Function.Module._resolveFilename (module.js:536:15)
    at Function.Module._load (module.js:466:25)
    at Function.Module.runMain (module.js:676:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3

C:\Users\akshat\evote\web-app\server>C:\Users\akshat\evote\web-app\server\node_modules\nodemon\bin
'C:\Users\akshat\evote\web-app\server\node_modules\nodemon\bin' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\akshat\evote\web-app\server>cd C:\Users\akshat\evote\web-app\server\node_modules\nodemon\bin

C:\Users\akshat\evote\web-app\server\node_modules\nodemon\bin>node app.js
module.js:538
    throw err;
    ^

Error: Cannot find module 'C:\Users\akshat\evote\web-app\server\node_modules\nodemon\bin\app.js'
    at Function.Module._resolveFilename (module.js:536:15)
    at Function.Module._load (module.js:466:25)
    at Function.Module.runMain (module.js:676:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3

C:\Users\akshat\evote\web-app\server\node_modules\nodemon\bin>node nodemon.js
  Usage: nodemon [nodemon options] [script.js] [args]

  See "nodemon --help" for more.

C:\Users\akshat\evote\web-app\server\node_modules\nodemon\bin>/node_modules/nodemon/bin/nodemon.js src/app.js
The system cannot find the path specified.

@akshatbahety run node app.js from the src directory
https://github.com/IBM/evote/tree/master/web-app/server/src

C:\Users\akshat\evote\web-app\server\src>node app.js
module.js:538
    throw err;
    ^

Error: Cannot find module 'node-pre-gyp/lib/pre-binding'
    at Function.Module._resolveFilename (module.js:536:15)
    at Function.Module._load (module.js:466:25)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Users\akshat\evote\web-app\server\node_modules\grpc\src\grpc_extension.js:26:14)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)

Hey thanks for helping me out I think I am missing some module

Tried to install all modules
C:\Users\akshat\evote\web-app\server\src>npm install node-pre-gyp
npm WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none is installed. You must install peer dependencies yourself.
npm WARN<EMAIL_ADDRESS>No description
npm WARN<EMAIL_ADDRESS>No repository field.
npm WARN<EMAIL_ADDRESS>No license field.

npm ERR! path C:\Users\akshat\evote\web-app\server\node_modules\grpc\node_modules\abbrev
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\akshat\evote\web-app\server\node_modules\grpc\node_modules\abbrev' -> 'C:\Users\akshat\evote\web-app\server\node_modules\grpc\node_modules\.abbrev.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR!      C:\Users\akshat\AppData\Roaming\npm-cache\_logs\2020-04-09T17_45_06_284Z-debug.log

C:\Users\akshat\evote\web-app\server\src>npm install acorn
npm WARN<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none is installed. You must install peer dependencies yourself.
npm WARN<EMAIL_ADDRESS>No description
npm WARN<EMAIL_ADDRESS>No repository field.
npm WARN<EMAIL_ADDRESS>No license field.

npm ERR! path C:\Users\akshat\evote\web-app\server\node_modules\grpc\node_modules\abbrev
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\akshat\evote\web-app\server\node_modules\grpc\node_modules\abbrev' -> 'C:\Users\akshat\evote\web-app\server\node_modules\grpc\node_modules\.abbrev.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR!      C:\Users\akshat\AppData\Roaming\npm-cache\_logs\2020-04-09T17_45_57_220Z-debug.log

C:\Users\akshat\evote\web-app\server\src>

https://github.com/IBM/evote#step-6-run-the-application
As shown in the step above - you must run npm install from the server directory. You are in the src dir.

what node version are you using? @akshatbahety
You can check by doing node -v

@akshatbahety note that this has been tested on node 8.9.0 so you should use that version

Yes I am on the same version , sorted a lot of stuff
thanks a lot
hitting this when I do node app.js
Error: Cannot find module 'node-pre-gyp/lib/pre-binding'

except this tried installing node-pre-gyp using
npm install node-pre-gyp -g

okay sorted that too one last thing now when I am running
H:\evote\web-app\server\src>node app.js

I have let it run for around 15 minutes no output was returned ended the operation and started the again still nothing.

I'll assume the server is running and try to run the client.

Hey it's running
needed to relocate the files to src folder both fabric_connection.json and config
thanks a lot for helping out :)

npm ERR! missing script: start
npm ERR!      C:\Users\Administrator\AppData\Roaming\npm-cache_logs\2020-04-13T08_36_44_541Z-debug.log
isko kaise fix karenge...


[207] Sort profile employments newest to oldest

Screenshots of UI changes:
Before

After

 Display Work history roles in chronological order on the Candidate Profile

Hi @elliotcm
The start date functionality looks to be working perfectly,
The only part missing is that any role that the jobseeker marks as their current role should be displayed at the top of the list (this should take precedence over the start date check)

@bencmitchell Updated

Thanks @elliotcm  looks good to me 👍


Plist is missing.

The bundle 'Payload/StarME.app/Frameworks/GoogleAppMeasurementOnDeviceConversion.framework' is missing plist key. The Info.plist file is missing the required key: CFBundleShortVersionString. Please find more information about CFBundleShortVersionString at https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring (ID: 26655415-6523-45f1-8353-3b78af719cce)

Thanks, this is a duplicate of #62. We are working on a patch release to fix this issue. Please follow https://github.com/firebase/firebase-ios-sdk/issues/12441 for updates!

Thank you so much.


Ad hoc meetings, OKR work, DIB preparations

Describe the issue
Our onboarding process generates ad hoc meetings at an increasing rate. There are also these additional types of ad hoc meetings - this ticket is to make room for and track that work.
Which Sprint Goal is this issue related to?
Note: 'Milestone' is a ZenHub term that we use synonymously with 'Sprint'.
The 'Milestone' description (created in ZenHub) should clearly list Sprint Goals. This section should indicate which 'goal' this issue is related to.
Additional context
Add any other context, attachments or screenshots
Definition of done
Meetings successfully accommodated in our busy schedules

No DoD, and appears to duplicate another ticket in sprint already covering DiB


Feature/PRLC100-149

JIRA link (if applicable)
https://tools.hmcts.net/jira/browse/PRLC100-149
Change description

Added /safety-concerns/orders-required/orders-required page
'Continue' button navigates the user to the same/current page

Does this PR introduce a breaking change? (check one with "x")
[ ] Yes
[x] No

@giorgi-hmcts , please fix the above review comments and resolve the conflicts as well.


Usability: Poor UI rendering on WVGA / FWVGA devices

On devices with screen resolutions between 480x800 - 480x900 the plugin's UI rendering is distorted, bordering on unusable, even though the rest of ATAK’s UI renders flawlessly even at 480x800.
There are a few issues:

Word-splitting in tab labels causing a multi-line effect, further reducing the usable screen area
"Target device" label overlaps comm device fields above
Comm device ID is overlapped by Comm toggle switch (use of a toggle switch type control is really not optimal in this context as it uses twice the width it really needs)
"Set Comm Device" overlaps "Refresh" on WVGA screens
also, on one WVGA device (not shown), the Comm Device line actually word-wraps

packet counters line gets "pushed" to the left outside visible area - increasingly so as the numbers grow in size
the "Dlvd" label word-wraps

more button overlap, here "Clear Data" overlaps "Clear MsgQ" completely

This improves the UI for smaller screens by reducing some element sizes (mostly buttons) and using ConstraintLayout
There were some things I could not figure out (sorry not much of a UI/UX person), e.g. the Target Device spinner width, but it should be a significant improvement from the previous iteration: https://github.com/paulmandal/atak-forwarder/pull/65

There are several good improvements in PR #65 and no regressions as far as I can tell. It doesn't fix all problems, though. It should be safe to merge as-is and leave this issue open for further refinements.

Closing as no longer an issue with the new UI design


Ability to convert exceptions into strings

I've been working in a strict wasm32-unknown-unknown environment, and I've been having a hard time with exceptions from the vm, as when you print them the string is not very useful at all. I just found vm.print_exception and it has actually useful information in it. This method works great if println works in you environment, but in the wasm32-unknown-unknown environment I'm in I can't use the println macro directly. It would be great if the RustPython errors had a method called something like to_readable_string or something that will do the same thing as vm.print_exception, but instead return the error so that it can be dealt with in other ways.

if you don't need traceback, exc can be converted to PyObjectRef and PyObject has repr method.
for exc: PyBaseExceptionRef, exc.to_pyobject(vm).repr(vm) will work

The messages are definitely better now, had to do this to just get a string:
let err_string: String = err.to_pyobject(vm).repr(vm).unwrap().to_string();


Feature/colse session

Make sure you have checked all steps below.
JIRA

[ ] My PR addresses the following Airflow JIRA issues and references them in the PR title. For example, "[AIRFLOW-XXX] My Airflow PR"

https://issues.apache.org/jira/browse/AIRFLOW-2434
In case you are fixing a typo in the documentation you can prepend your commit with [AIRFLOW-XXX], code changes always need a JIRA issue.

Description

[ ] Here are some details about my PR, including screenshots of any UI changes:
When processing DAG files, create multiple dagrun, when dagrun is less than max_active_runs。

Tests

[ ] My PR adds the following unit tests OR does not need testing for this extremely good reason:
The online test has been done and no problems have been found

Commits

[ ] My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":

Subject is separated from body by a blank line
Subject is limited to 50 characters
Subject does not end with a period
Subject uses the imperative mood ("add", not "adding")
Body wraps at 72 characters
Body explains "what" and "why", not "how"

Documentation

[ ] In case of new functionality, my PR adds documentation that describes how to use it.

When adding new operators/hooks/sensors, the autoclass documentation generation needs to be added.

Code Quality

[ ] Passes git diff upstream/master -u -- "*.py" | flake8 --diff

Also, please provide some means to test this.

Please adhere to the commit guidelines.

the commit name has typo, and need more meaningful name for what this pr is for.

I'm closing this. Please reopen when you are ready to respond to feedback!


Can I  train with my data?

Hello. Thank you for sharing your good research.
Can I try to train with my data? If I can, please explain the command and method .
Thank you in advance.

Hi, thank you for paying your attention to our study. Currently, we did not upload the training code yet (planning to...). However, if you are interested, you can get the model without calling the decoder weights and train it on your own data. This previous issue might be helpful: https://github.com/clovaai/WCT2/issues/7#issuecomment-498301763


Fix floating dependencies job

The floating dependencies CI job has recently started failing for two reasons:

@babel/plugin-proposal-… packages have been renamed to @babel/plugin-transform-… since they are no longer proposals but rollup-plugin-ts was looking for and not finding the old names. I fixed this by adding @babel/preset-env and a browserslist (copied from test-app/config/targets.js). This causes the plugin to use present-env instead of trying to import the transforms itself.
Typescript was failing on this import: This module is declared with 'export =', and can only be used with a default import when using the 'allowSyntheticDefaultImports' flag. I enabled that in glimmer-scoped-css/tsconfig.json.

This also updates test-app to Ember CLI 4.12 to address dependency problems.

I’m surprised this broke jobs for some Ember versions, but I’ll look into it now 🧐

This is actually working now and ready for review. I’m unsure whether the browserslist approach is the answer re the renamed Babel plugins, it was working to just include the plugins directly, but maybe there‘s another better way.

In general we don't really want addons using preset-env, because that's an app concern.
Those proposal- plugins were there only because rollup doesn't parse decorators, and to transpile decorators you need to transpile that whole set of things.
In practice I don't think this change will hurt anything, the goal is to make sure we're leaving all the modern javascript features alone so that it's up to apps to decide which things to transpile for browsers.


feat: Add templates for xunit.v3

Added another template for xunit.v3.

Should we upgrade dependencies on the other templates too?

Is there any conflict between bUnits TestContext and Xunits? Haven't tested yet myself.

Is there any conflict between bUnits TestContext and Xunits? Haven't tested yet myself.

My understanding is that you either use the static object aka TestContext.Current or via DI ITestContextAccessor - so we should be safe.

Should we upgrade dependencies on the other templates too?

Sure why not

I did the following:

Added the xunit.v3 template
Updated dependencies
Removed net6.0 and net7.0 from our target framework choices as they are EOL

Is there any conflict between bUnits TestContext and Xunits? Haven't tested yet myself.

You were right - there are conflicts.

Is there any conflict between bUnits TestContext and Xunits? Haven't tested yet myself.

You were right - there are conflicts.

Than we can change our default import to be:
using BunitContext = Bunit.TestContext;

using BunitContext = Bunit.TestContext;

You mean for that specific template? It might be confusing and less verbose (especially regarding all our docs).
Therefore I opted out of this behavior.

@egil Can we merge this or do you want to rename Bunit.TestContext to BunitTestContext in the template?
See last comment from my side

@egil Can we merge this or do you want to rename Bunit.TestContext to BunitTestContext in the template?
See last comment from my side

An important point of having a template is that works out of the box for the users.
For now, I guess we can just have test class examples inherit from the fqns, e.g. public class CounterTests : Bunit.TeatContext

@egil Can we merge this or do you want to rename Bunit.TestContext to BunitTestContext in the template?
See last comment from my side

An important point of having a template is that works out of the box for the users.
For now, I guess we can just have test class examples inherit from the fqns, e.g. public class CounterTests : Bunit.TeatContext

I absolutely agree - and if it wouldn't be for v2, I also would go down the route of using a global alias (even though it hides the fact and might be confusing as well).


Add Chinese documentations

This plugin is so cool I wanted to share it with more people, so I added Chinese translation for setup_own_server.md and README.md (didn't translate the IBM Cloudant guide since it's not very popular here, and those who actually uses it would know how to read English anyway.)

Wow! Thank you for your contribution! I'm really honoured.
Actually, I don't know Chinese very well, but I think your contribution will be fine.


HTTPCLIENT-2273: Enhance "no-cache" directive handling

This pull request addresses ticket HTTPCLIENT-2273, which identifies an issue with the Apache HttpComponents client's handling of the "no-cache" directive when used with specific header fields, as outlined in RFC 7234.
Changes made to address this issue include:

Updating the caching module to correctly identify and handle "no-cache" directives with specific header fields. This was done by modifying the responseContainsNoCacheDirective method.

Modifying the handleCacheHit method to ensure that a cached entry is revalidated with the origin server when a "no-cache" directive with specific header fields is present in the response.

Ensuring that the rest of the response is still cacheable when the specified header fields are present, as long as the response complies with other caching requirements.

These changes allow an origin server to prevent the reuse of certain header fields in a response, while still allowing caching of the rest of the response. Corresponding unit tests have been updated to reflect these changes.

@arturobernalg

While reviewing your code I realized that CacheControlHeaderParser in its present form was wrong. It assumes that there can be only a single header Cache-Control header, which is wrong. There can be multiple headers, all of which must be parsed and taken into account. I also would like the parser to be able to parse Cache-Control with values in one pass with a single cursor.

Headers
Cache-Control: this, that

and
Cache-Control: this
Cache-Control: that

must be treated as equivalent and must produce the same Cache-Control structure.

I found out that Cache-Control get parsed over and over again multiple times in the course of a request execution. This is wasteful and conceptually wrong.

I am going to address these two issues, once your PR is merged.

@arturobernalg

While reviewing your code I realized that CacheControlHeaderParser in its present form was wrong. It assumes that there can be only a single header Cache-Control header, which is wrong. There can be multiple headers, all of which must be parsed and taken into account.

Headers
Cache-Control: this, that

and
Cache-Control: this
Cache-Control: that

must be treated as equivalent and must produce the same Cache-Control structure. I also would like the parser to be able to parse Cache-Control with values in one pass with a single cursor.

I found out that Cache-Control get parsed over and over again multiple times in the course of a request execution. This is wasteful and conceptually wrong.

I am going to address these two issues, once your PR is merged.

@ok2c , you're right. I didn't realize that. My apologies. I have made the necessary changes to resolve the issue. After merging the HTTPCLIENT-2273 PR, I will update the branch and fix the conflict. You can find the PR here: https://github.com/apache/httpcomponents-client/pull/447.
Regarding point 2, I would also like to address it, but I need some guidance or instructions to proceed."


How to traverse?

Is it possible to use this module standlone, without eslint?
I need to extract javascript function invocation from vue template (dynamic attributes and templates).
import { parse } from "vue-eslint-parser";

const ast = parse( t, {
    "sourceType": "module",
    }
}

It creates AST but how to traverse it? estraverse and @babel/traverse not works, they stops on Program node and doesn't go further.
Could you give some examples, please. Documentations is very limited.

solved


make TLS Mutual Authentication relative instead of absolute

Do you want to request a feature or report a bug?
I am requesting a feature.

What did you do?
Currently, TLS Mutual Authentication is an "all or nothing" switch - if I have multiple SNI's and set ClientCAFiles (at the entrypoint definition level), then every SNI requires client auth.  I think it would make sense to make the entry relative, so that I can have some SSL entrypoints require tls mutual auth and some that do not.
Here is a simple example of what I am thinking:
[entryPoints]
  [entryPoints.https]
  address = ":443"
  [entryPoints.https.tls]
    [[entryPoints.https.tls.certificates]]
    clientCAFiles = ["certs/clientca.crt"]
    certFile = "certs/server.crt"
    keyFile = "certs/server.key"
    [[entryPoints.https.tls.certificates]]
    certFile = "certs/server2.crt"
    keyFile = "certs/server2.key"

In the config above, clientCAFiles would apply only to the first SNI (server1), but not the 2nd (server2).

What did you expect to see?
I would expect to be able to use ClientCAFiles in a way that is not an "all or nothing" switch.
What did you see instead?
using ClientCAFiles means that everything in that entrypoint uses it, or nothing does.
Output of traefik version: (What version of Traefik are you using?)
Version:      v1.4.0-rc4
Codename:     roquefort
Go version:   go1.9
Built:        2017-10-02_02:19:32PM
OS/Arch:      linux/amd64

What is your environment & configuration (arguments, toml, provider, platform, ...)?
[entryPoints]
  [entryPoints.https]
  address = ":443"
  clientCAFiles = ["certs/clientca.crt"]
  [entryPoints.https.tls]
    [[entryPoints.https.tls.certificates]]
    certFile = "certs/server.crt"
    keyFile = "certs/server.key"
    [[entryPoints.https.tls.certificates]]
    certFile = "certs/server2.crt"
    keyFile = "certs/server2.key"

[web]
address = ":8080"

[consulCatalog]
endpoint = "<IP_ADDRESS>:8500"
exposedByDefault = false
prefix = "traefik"

Hello @jaychris. Many thanks for you interest in the project.
I understand you have problem because of setting clientCAFile on an entrypoint force all its clients to provide a CAFile.
Unfortunately, the GO handshake method does not allow using a TLS Mutual Authentication only for named domains.
However, I think this use case can be resolved by the modification described in the proposal #2288.
WDYT?


DNS Resolution doesn't work post EIP allocation

In kubernetes cluster with Nodelocal DNS setup, whenever a POD is assigned an EIP using annotation, then DNS resolution stops working.
Expected Behavior
DNS Resolution must work even after EIP allocation.
Actual Behavior
DNS Resolution stops working.
Steps to Reproduce the Problem

kubectl run test-eip --rm -i --tty --image ubuntu -- bash
root@test-eip:/# apt update
root@test-eip:/# apt install iputils-*
root@test-eip:/# ping google.com
PING google.com (<IP_ADDRESS>) 56(84) bytes of data.
64 bytes from qv-in-f100.1e100.net (<IP_ADDRESS>): icmp_seq=1 ttl=102 time=63.3 ms
In separate session, annotate the POD with EIP:
kubectl annotate pod test-eip ovn.kubernetes.io/eip=141.x.x.x. --overwrite
kubectl annotate pod test-eip ovn.kubernetes.io/routed-
Try to ping again, it stops working:
root@test-eip:/# ping google.com
root@test-eip:/# ping <IP_ADDRESS>
PING <IP_ADDRESS> (<IP_ADDRESS>) 56(84) bytes of data.

Additional Info

Kubernetes version:
Output of kubectl version:
Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.9", GitCommit:"6df4433e288edc9c40c2e344eb336f63fad45cd2", GitTreeState:"clean", BuildDate:"2022-04-13T19:57:43Z", GoVersion:"go1.16.15", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.9", GitCommit:"6df4433e288edc9c40c2e344eb336f63fad45cd2", GitTreeState:"clean", BuildDate:"2022-04-13T19:52:02Z", GoVersion:"go1.16.15", Compiler:"gc", Platform:"linux/amd64"}

kube-ovn version:
1.11.3

operation-system/kernel version:
Output of awk -F '=' '/PRETTY_NAME/ { print $2 }' /etc/os-release:
Output of uname -r:
"Ubuntu 20.04.4 LTS"
5.4.0-146-generic

Also we observed that after EIP allocation, connectivity to both core dns service and node local dns breaks.

Here attached are the kubectl ko trace output files.
trace_before-EIP.txt
trace_after-EIP.txt

Thanks, I think it’s related to how nodelocaldns work and how kube-ovn route traffic.
nodelocaldns will set up an dummy interface and an IP on the host, that’s <IP_ADDRESS>  in your logs and assumes all the traffic that from the pods to this address will first come to the host.
If the EIP is not set on the Pod and the subnet use distributed gateway, this assumption is correct. The traffic will first comes to the ovn0 on the node and then connect to the <IP_ADDRESS>.
However when EIP is enabled, kube-ovn will treat <IP_ADDRESS> as an external address and send the traffic to the eip interface and it will directly go to the underlay network without hitting the dummy interface.
We didn’t test eip with nodelocaldns before, and it should be a bug on kube-ovn side.

https://github.com/kubeovn/kube-ovn/pull/2733
this pr will fix this issue，when dst ip = <IP_ADDRESS> ，the packet will pass though ovn0 on local node


Make ReplaceItem call optional

Regarding this line:
https://github.com/Azure/Microsoft.Extensions.Caching.Cosmos/blob/master/src/CosmosCache.cs#L104
try
{
    await this.cosmosContainer.ReplaceItemAsync(
            partitionKey: new PartitionKey(key),
            id: key,
            item: cosmosCacheSessionResponse.Resource,
            requestOptions: new ItemRequestOptions()
            {
                IfMatchEtag = cosmosCacheSessionResponse.ETag,
            },
            cancellationToken: token).ConfigureAwait(false);
}
catch (CosmosException cosmosException) when (cosmosException.StatusCode == HttpStatusCode.PreconditionFailed)
{
    // Race condition on replace, we need to get the latest version of the item
    return await this.GetAsync(key, token).ConfigureAwait(false);
}

I assume the reason for this is to reset the ttl on every read access. This may make sense for session state but maybe not non-session related caching, such as application data you want cached for one minute or one hour regardless of reads when using the IDistributedCache directly and not through the HTTP session.
Suggested enhancement:
cosmosCacheOptions.ResetTimeToLiveOnRead = false;

This also comes with a big performance hit of sending the cached data back to the server on every access for no reason other than to reset the ttl which would more than double the overall operation time as writes/indexing are slower than reads, correct me if I'm wrong. It's a shame Cosmos doesn't offer a specific ttl reset operation or even better to reset the ttl on a read with an optional parameter.
Am I wrong in the above?
Also, would love this as a Nuget package as well!

Actually, thinking through this some more it would be great to support this per item and base this off the DistributedCacheEntryOptions which aligns the use with the intention of DistributedCacheEntryOptions.AbsoluteExpiration.
If you add a IsSlidingExpiration property to the session item, you could than use that to determine if the time to live should be updated via the ReplaceItem call or not during a read.
Suggestion:
    internal class CosmosCacheSession
    {
        [JsonProperty("id")]
        public string SessionKey { get; set; }

        [JsonProperty("content")]
        public byte[] Content { get; set; }

        [JsonProperty("ttl")]
        public long? TimeToLive { get; set; }

        // True if DistributedCacheEntryOptions.AbsoluteExpiration was set and used for the TTL,
        // false if DistributedCacheEntryOptions.AbsoluteExpiration or DistributedCacheEntryOptions.AbsoluteExpirationRelativeToNow was set and used for the TTL;
        // otherwise null.
        [JsonProperty("isSlidingExpiration")]
        public bool? IsSlidingExpiration { get; set; }
    }

Set the IsSlidingExpiration property based on whether the DistributedCacheEntryOptions.SlidingExpiration was used or not. See comments on the IsSlidingExpiration property code snippet above.
Then only replace the item during a read if IsSlidingExpiration is true:
if (cosmosCacheSessionResponse.Resource.IsSlidingExpiration.GetValueOrDefault())
{
    try
    {
        await this.cosmosContainer.ReplaceItemAsync(
                partitionKey: new PartitionKey(key),
                id: key,
                item: cosmosCacheSessionResponse.Resource,
                requestOptions: new ItemRequestOptions()
                {
                    IfMatchEtag = cosmosCacheSessionResponse.ETag,
                },
                cancellationToken: token).ConfigureAwait(false);
    }
    catch (CosmosException cosmosException) when (cosmosException.StatusCode == HttpStatusCode.PreconditionFailed)
    {
        // Race condition on replace, we need to get the latest version of the item
        return await this.GetAsync(key, token).ConfigureAwait(false);
    }
}

I hope that makes sense, this would then better support both AbsoluteExpiration and SlidingExpiration that the DistributedCacheEntryOptions exposes.
If there was another reason for the ReplaceItem call other than to reset the ttl, then maybe all this is irrelevant. Looking forward to your thoughts.

See above PR, hope I did that right as I haven't done to many PRs on here. Let me know if that makes sense and is useful. Cheers!

Thanks for the contribution @krispenner !
The original intent was not about the TTL but the Timestamp. In order for SlidingExpiration to really work, the Replace updates the item and thus the Timestamp (_ts) property is updated, so TTL can act accordingly.
I'll check the PR out.

Ah sorry, you are correct and I meant to say timestamp (_ts) everywhere I said TTL.
However, my primary point still stands, the current code always forces sliding expiration even when DistributedCacheEntryOptions.AbsoluteExpiration is used for the item's expiry.
My PR should address this and only use sliding expiration (by updating _ts via ReplaceItem) when DistributedCacheEntryOptions.SlidingExpiration is used for the item's expiry, otherwise it will expire at the set absolute time if DistributedCacheEntryOptions.AbsoluteExpiration or DistributedCacheEntryOptions.AbsoluteExpirationRelativeToNow is used instead regardless of any reads on the item or not.
Thanks for your consideration and any feedback :)

I left comments in the PR 😄


Optimize SWAP macro by using move semantics.

Move semantics help make code faster by changing ownership rather than copying objects. In the case of SWAP, a maximum of 3 copies can be avoided, if the underlying objects have corresponding constructors and assignment operators. The current implementation forces the compiler to copy the object for each assignment:
template <typename T>
 inline void __swap_tmpl(T &x, T &y) {
 	T aux = x;  // copy assignment
 	x = y;  // copy assignment
 	y = aux;  // copy assignment
 }

Recently, we starting to introduce move semantics into the codebase. In particular, there was https://github.com/godotengine/godot/pull/100239 for String, Vector and CowData. Hopefully, sometime in the future, we'll get similar move constructors and assignments for Variant. The SWAP macro should be ready to accelerate these semantics.
The implementation of std::swap on my machine (macOS) looks like this:
template <class _Tp>
inline _LIBCPP_HIDE_FROM_ABI __swap_result_t<_Tp> _LIBCPP_CONSTEXPR_SINCE_CXX20 swap(_Tp& __x, _Tp& __y)
    _NOEXCEPT_(is_nothrow_move_constructible<_Tp>::value&& is_nothrow_move_assignable<_Tp>::value) {
  _Tp __t(std::move(__x));
  __x = std::move(__y);
  __y = std::move(__t);
}

It could be trivially re-implemented in Godot as such:
template <typename T>
inline void __swap_tmpl(T &x, T &y) {
	T aux(std::move(x));
	x = std::move(y);
	y = std::move(aux);
}

However, since both std::swap and std::move are defined in <utility> (i.e. the include is needed anyway), I see no reason to reinvent the wheel (except maybe to make it constexpr?).

Thanks!


when touch to Android Back Button, nothing happens !

Version
Tell us which versions you are using:

react-native-router-flux v4.0.0-beta.20
react-native v0.47.2

Expected behaviour
At home screen and android device, when touch to Android Back Button, app will be exist
Actual behaviour
when touch to Android Back Button, nothing happens !
<Router createReducer={reducerCreate}>
  <Modal transitionConfig={() => ({ screenInterpolator: CardStackStyleInterpolator.forFadeFromBottomAndroid })}>
    <Stack hideNavBar>
      <Drawer headerMode='none' contentComponent={Sidebar}>
        <Scene initial key='home' component={HomeScreen}/>
      </Drawer>
    </Stack>
    <Scene key='search' component={SearchScreen} title='Tìm kiếm' hideNavBar />
    <Scene key='item' component={ItemScreen} hideNavBar />
    <Stack key='room' hideNavBar>
      <Drawer headerMode='none' drawerPosition='right' contentComponent={ChatBoxSettingScreen}>
        <Scene key='roomChild' component={RoomScreen} />
      </Drawer>
    </Stack>
    <Scene key='createRoom' component={CreateRoomScreen} hideNavBar />
    <Scene key='webView' component={WebViewScreen} />
  </Modal>
</Router>

Do you have any BackHandler.addEventListener in your app that might be affecting it?

I have the same problem,how can I solve?
I have checked all my codes,there are no backHandler at all.

I'm having the same problem as well. No custom handler set. I do believe it started happening when once I added a nested , but I will try to attach a reproducible package.

I believe this is a dupe of #2540


Use Application Default Credentials to get App/Compute Engine credentials

Fixes #334
2 notes:
-- This PR should be merged in only once #336 is merged in
-- I left the order for project ID determination the same for now.  There was a suggestion to make it the same order as the authentication credentials lookup.  However, since we check for App Engine ID before Google Cloud SDK ID, we don't run into security exceptions with using the files API if we run in App Engine.  However, if we change the order to move Google Cloud SDK first, we have to try and catch that exception, and the effective order would be slightly different than what we might report.  Somebody might change their JRE locally to allow read access to the Google Cloud SDK config file, but then it would crash in production.

I am not sure I understand your comment about the order.
What we want is to switch the order of project default to look up at "Google Cloud SDK"
before "Compute Engine" which is similar to the lookup order for auth. In both cases (auth or projectId) AE is picked before and therefore we should not have the file access issue.

Ah, I get you now. This PR actually changed the lookup order of auth as we now rely on google-auth-library-java for AE auth. I think we could still swith the projectid lookup order of CE with SDK, no?

@aozarov Added a commit to switch the project ID lookup order of CE and SDK.

Waiting on this bug to be fixed, will test and update PR as necessary following that fix.

I assume this PR also depends on google/google-auth-library-java#45

Yup, that's correct.

This PR now is only blocked by this feature request from the auth library.

Once we resolve this issue we should also fix  #334

Added back in the app engine credentials since it looks like reflection won't be added to the auth library.

Looks good. One cleanup suggestion that needs to be validated.

The compute credentials cleanup suggestion worked, so I added a commit for it.  I also noticed that service credentials didn't work with Datastore (I had been testing with storage earlier) because the v1beta2 dependency pulls in an outdated version of com.google.api-client:google-api-client.  I added a commit that fixes this as well.
Also, two cleanup questions:

There's GoogleCredential from com.google.api-client:google-api-client and there's GoogleCredentials (with an 's') from google-auth-library-java.  Could we use the google-auth-library-java's GoogleCredentials here?  It looks like both have the fromStream.  Then we can get rid of the com.google.api-client dependency in the PR that fixes #403 (once the HttpInitializer code that uses GoogleCredential is gone).
We have a ServiceAccountCredentials class, but google-auth-library-java does as well.  Do you think it'd be worthwhile to use google-auth-library-java's instead?  It seems a bit more heavyweight, but it is a subclass of GoogleCredentials, which could be helpful for more auth restructuring later.

Yes, we should use google-auth-library-java Credentialsinstead of the GoogleCredential from google-api-client(however we do need that artifcat).
We can't use ServiceAccountCredentialsfrom google-auth-library-java directly (as it is not restorable) however we can delegate to it.


chore: upgrade coincurve to v18 #274

Requires https://github.com/ethereum/execution-specs/pull/827.
Fixes #274.
No differences in fixtures --until Cancun with coincurve v17 and v18 against https://github.com/marioevz/go-ethereum/commit/632f57b81acefd951a48cb3c0f2dfd8b1af7f344.

@marioevz: The macOS installation has been thoroughly tested by @spencer-tb :smiley:


Detecting if location is all-numeric and querying by id if this is the case

More information here : http://marc.info/?l=openbsd-ports&m=143202549432068&w=2

This has been implemented by commit 3d8318ad890f28bf3da8ce1d50dd04be06e470b7.


Consider smoothing blinking function (noise reduction)

Consider using moving averages to smooth out blinking transition to reduce noise and interferences.
Take performance into account

pseudocode
current_value= wifi_signal_strength
smoothed=(previous_value + current_value) / 2
previous_value= current_value

implemented in test code in /src/scan_test/init.lua line 60


Wechaty Puppet Service Provider Certificate Program (DRAFT)

The Background
The Wechaty Puppet Service (WPS) has been released in early 2020. After that, the Wechaty community has enabled the power of the Wechaty Puppet Provider (WPP): any WPP can be published as a service (WPS) by running a Wechaty Gateway:
$ npm install --global wechaty@next wechaty-puppet-padlocal
$ wechaty gateway \
    --puppet wechaty-puppet-padlocal \
    --puppet-token padlocal_XXX \
...
21:58:39 INFO Gateway Registering Wechaty Puppet Token Gateway Service Discovery ... success

    Your have successfully ran Wechaty Token Gateway with the below settings:
      1. token: insecure_2a59ebfb-27b7-413f-9abf-907d28d63d3e

The above command shows how to publish the wechaty-puppet-padlocal WPP as a WPS, with a random generated Wechaty Puppet Service Token insecure_2a59ebfb-27b7-413f-9abf-907d28d63d3e. (You can specify the published token by the --token option)
To learn more about the Wechaty Puppet Ecosystem, this blog post has a detailed introduction:

Introducing Wechaty Puppet Service (Providers), @huan, Jan 14, 2021

Alpha Stage Wechaty Ecosystem  (2020 & 2021)
We have running the WPS as an alpha stage ecosystem service for the Wechaty community, for the past two years. (2020 & 2021)
The WPS enabled the Wechaty Ecosystem system for the Puppet Providers, which means that everyone can provide a WPS for the community, by simply providing a TOKEN to the user.
Thanks to the developers from our community, we soon have 5 WPS  built for the Wechaty Ecosystem:

Donut, developed by @JuziBot
WXWork, developed by @JuziBot
Paimon, developed by @zPaimon
PadLocal, developed by @PadLocal
SimplePad, developed by @Chatrbot

In addition, any Wechaty developer can publish their own WPS by using the wechaty gateway CLI command mentioned at the beginning of this post.
The Problem (Alpha Stage, v0.x)
We have had great success with the alpha stage WPS, for example, we have thousands of WPS  running for serving our community users every day.
We have also learned a lot from running it, and here's the list we need to improve before we move to the beta stage.

lacking Term-of-Service and the Privacy-Policy legal files
lagging customer support (for paid customers)
WPS gRPC protocol is not TLS enabled, which means the data on the internet is plain text

The Solution (Beta Stage, v1.x)
We have upgraded the Wechaty from 0.x to 1.x in Jan 2022. With v1.x Wechaty, the ecosystem needs to satisfy the Beta stage requirements, so that we can improve the service quality and deliver more value to our users.
The most important improvement for Wechaty v1.x is enabling TLS by default, and it requires the WPS to update their system to be compatible with Wechaty v1.x and use the CA-signed by the Wechaty community for maximum security.
Any WPS provided by the community in the Wechaty ecosystem will be classified from levels 0 to 7 by the following rules:

Level-0: any valid WPS published by any developer by running any WPP with the wechaty gateway command (or providing the gRPC service directly), is a Level-0 WPS.
Level-1: a Level-0 WPS that meets the following requirements:

[ ] secured by the TLS. (CA will be signed by the Wechaty community, with a $100 per month CA management fee)

Level-2: a Level-1 WPS that meets the following requirements:

[ ] published the WPS landing page at Wechaty's official website under the https://wechaty.js.org/docs/puppet-service/${SNI}
[ ] published the WPS official website, and link it to the landing page, for users to apply, pay, and manage their WPS tokens
[ ] published a Term-of-Service page and linked its URL to the WPS landing page
[ ] published a Privacy-Policy page and linked its URL to the WPS landing page
[ ] published at least one support channel to the landing page
[ ] watched the https://github.com/wechaty/puppet-supports/issues for related support requests.
[ ] published at least one blog post on wechaty.js.org to announce the WPS, and link the blog posts to the landing page
[ ] agreed to maintain the WPS landing page on the Wechaty website when there are any updates needed

Level-3: a Level-2 WPS that meets the following requirements:

[ ] agree to provide at least 2 non-expiring free tokens for each developer who has joined the Wechaty Developers Program
[ ] agree to provide at least 20 non-expiring free tokens to the Wechaty community.

Level-4: a Level-3 WPS that meets the following requirements:

[ ] support the Wechaty open-source project by donating more to the Wechaty community via OpenCollective

Level-5: a Level-4 WPS that meets the following requirements:

[ ] pass the basic testing listed at https://github.com/wechaty/puppet-supports/wiki/Basic-Test
[ ] pass the stress testing listed at https://github.com/wechaty/puppet-supports/wiki/Stress-Test

Level-6: a Level-5 WPS that meets the following requirements:

[ ] pass the product testing listed at https://github.com/wechaty/puppet-supports/wiki/Product-Test
[ ] running with our Friday BOT and everything is ok for at least 1 week

Level-7: a Level-6 WPS that meets the following requirements:

[ ] voted stable by at least 3 community contributors
[ ] voted stable by at least 3 paid users
[ ] verified stable by at least 1 PMC

It is greatly appreciated to the developers in our ecosystem to follow this upgrade, to become a Wechaty Official Certificated Puppet Service.
How to Apply for Certification
In order to apply for the WPS certification, please fill out the below template and post it to the https://github.com/wechaty/puppet-service/issues
Wechaty Puppet Service (WPS) Certification Application

1. What's your WPS Server Name Indication (SNI)?

> for example, `wxwork`, `paimon`: this will become the prefix of your token, i.e.: `wxwork_UUID` or `paimon_UUID`

2. What Level are you going to apply for? (the minimum level that can be applied is Level-2, and the higher the better)

3. Please copy/paste the Level-N requirements below, and comment on every requirement to explain why you are qualified:

4. You understand and agree that the right of final interpretation of the Terms of Service of the Wechaty ecosystem resides with the Wechaty community.  (Y/N)

4. Your name (sign)

Thank you very much for joining the Wechaty ecosystem by providing the valuable Wechaty Puppet Service to the chatbot developer users, it's very valuable, and appreciate all efforts everyone has worked for the community!
RFC
I'd like to invite the creator of Donut/WXWork @windmemory, creator of PadLocal @padlocal, creator of Paimon @zpaimon, creator of SimplePad @chatrbot to review this draft, any feedback will be highly appreciated.
CC @lijiarui @wechaty/puppet

I have a question about the 2nd paragraph. By "for example, we have thousands of WPS running for serving our community users every day.", do you mean thousands of different service providers, or thousands of service instances from the same five providers listed in the 1st paragraph?

do you mean thousands of different service providers,

All WPS share the same token discovery service in the Wechaty community: so that when a user want to switch protocol for their bot program, change the token is all they need to do.

What I am asking is, how many WPS providers are in play now? Is there a list of all of them?

You can see the number from the public community status page at https://chatie.statuspage.io/

Hi @huan , there is an issue to run:
$ npm install --global wechaty@next wechaty-puppet-padlocal
$ wechaty gateway \
    --puppet wechaty-puppet-padlocal \
    --puppet-token padlocal_XXX \

Failed to import Wechaty Puppet Provider (WPP) NPM module: "wechaty-puppet-padlocal"
Please make sure:

it has been installed correctly. (run npm install wechaty-puppet-padlocal if it doesn't)
"wechaty-puppet-padlocal" is a valid Wechaty Puppet Provider (WPP).

While I have successfully installed "wechaty-puppet-padlocal"
root@ecs-87602:~# npm list -g
/usr/local/lib
├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>├──<EMAIL_ADDRESS>└──<EMAIL_ADDRESS>


Running 'npm run serve' in DEBUG mode for non minified js files

How can we configure npm run serve so that JavaScript source files are not getting minified? It would hugely improve development speed.

Yes, I see the same errors on gulp serve. So this has nothing to do here. Thanks!


Kudos semi-automation

Henlo frens!
As discussed at previous Thanos community meeting on 13.05.2020 - we want to bring back the Friday shout-out process as it brings good value to the community and cheers up those brave souls who help other hopelessly lost in Thanos/Prometheus world seeking for help in CNCF slack channel.
Though, I know from experience it might be quite a tideous thing to do manually, especially now when community slack channel rolled over 1k members and amount of support demanded and provided is overwhelming.
The basic idea I suggest here is:

Choose a kudos tool. Some slack /-bot, there are dozens of them on the market. Problem with that one - most of them cost some moniz and with 1k users in the channel - it gets costly for a wallet of a mere mortal.
So maybe it is worth setting up something like cloud function (here's the simplest example) that will catch webhooks and paste data with kudo-recipient to somewhat that can handle few lines of text for free? (Anything that can just hold few lines of text up to nearest coming Friday?) Most of the serverless platforms have some "free daily limit" that shall be hundreds of times higher than the capacity we actually need.
Set up Slack Workflow greeting every new channel member with non-overloaded message about kudos possibility.
Humanised shout-out every Friday to all the kudos recipients (Shall not be performed by a bot and shall not be bold copy-paste of the previous message, put some soul in it!) + little reminder that we have kudos in place and it would be amazing if everybody would use it.

Let's discuss this. Anybody know free ready kudos tool?
What is our possibility to buy one?
What is our possibility to set up something small and cheap/free in some public cloud under some non-personal project?

Super nice, thanks for this, help wanted! (:

Thanks, but no, we need this. Help wanted. Hackathon offer still applies
Ivan ;p
On Wed, 17 Jun 2020 at 10:14, stale[bot]<EMAIL_ADDRESS>wrote:

Hello 👋 Looks like there was no activity on this issue for last 30 days.
Do you mind updating us on the status? Is this still reproducible or
needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity for next week, this issue will be closed (we
can always reopen an issue if we need!). Alternatively, use remind command
https://probot.github.io/apps/reminders/ if you wish to be reminded at
some point in future.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/thanos-io/thanos/issues/2617#issuecomment-645256589,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABVA3OYYMWVH6SVLDLDWT7DRXCCQ5ANCNFSM4NBUKXIQ
.

@homelessnessbo :beers:  :beers:  :beers: Let's hack on this some day (:

We are on it @homelessnessbo


[Feature]: Ability to upload images from Desktop into Rich-Text Editor

Is there an existing issue for this?

[X] I have searched the existing issues

Summary
It would be helpful for the user to upload images to the rich-text editor from their Desktop, rather than needing the URL of an image.
Why should this be worked on?
This is a common use case for business applications. If a rich-text editor is being used to create a business report, for example, the user would need to upload images from their Desktop.

Workarround
https://www.loom.com/share/ecd65d03f9fc444bb67a5fc9677be36e?sid=4260b0d8-4e9a-490d-b5c1-066fab6ec05a

Workarround: https://www.loom.com/share/ecd65d03f9fc444bb67a5fc9677be36e?sid=4260b0d8-4e9a-490d-b5c1-066fab6ec05a


Make Pod a pure marker trait

This is a hard breaking change!
Making Pod a marker trait and providing its methods as crate functions enables the rust semver trick.
This trick is impossible to execute in the current state and prevents any kind of change in design of this crate.
Bikeshedding the helper method names is now possible without further breaking changes!
At the same time I feel confident enough to embark on a 1.0.0 journey with the ability to improve the API if needed.

For the benefit of other hackers who end up here:

Mostly you just need to change use dataview::Pod; to use dataview::PodMethods; or use dataview::{Pod, PodMethods};.
The rust semver trick is a way for a 1.0 crate to go to 2.0, in certain specific breaking cases, without risk of forking the whole crates.io ecosystem.


feat: use WarningAcknowledgement component

Notes for reviewer: use "Hide whitespace" when viewing the diff, and ignore the insane commit history (it was started on the old develop branch before I fixed it).
Description
Adds a new, generic, WarningAcknowledgement component that can be used across LP, Swapper, and Saver domains to provide a consistent user experience for acknowledging risks associated with a transaction.
Wires up this component for the following features/flows:

Lending borrow on unsafe quote (high slippage)
Trade quote input on unsafe quote (wired up, though I don't think we have any unsafe quote logic upstream, so this won't show for now)
Trade quote confirm on unsafe price impact/high slippage
LP deposits

Still to do (follow-up PR):

Savers withdraw (fees higher than withdrawal amount)
LP pool halted
Multi-hop trade, may end up with different asset if something goes wrong
LiFi single-hop trades with intermediary assets

Pull Request Type

[ ] :bug: Bug fix (Non-breaking Change: Fixes an issue)
[ ] :hammer_and_wrench: Chore (Non-breaking Change: Doc updates, pkg upgrades, typos, etc..)
[x] :nail_care: New Feature (Breaking/Non-breaking Change)

Issue (if applicable)
Mostly addresses https://github.com/shapeshift/web/issues/6605, follow up PR for remaining places to come.
Risk
High. Whilst this PR should only add an additional step in unsafe transaction situations, getting it wrong could mean we break the flow entirely for all of our key revenue generating flows.

What protocols, transaction types or contract interactions might be affected by this PR?

Swaps
LP deposits
Savers borrow

Testing
Savers borrow
Use frame to quote a borrow that will result in an unsafe amount of slippage. Upon confirmation of the quote a warning should show.
Not able to test or get a screenshot at time or writing, as borrow is currently halted (cap full).
Monkey patched shot:

Trade quote input
Get a THORChain quote from ETH to BTC, enter about 0.05 ETH and the an unsafe warning should show on preview.

Trade quote confirm
Use frame to confirm a trade that has an unsafe amount of slippage. Upon confirmation of the trade a warning should show.

LP deposit
Use frame to get a quote for a large deposit that cause slippage. Upon confirmation a deposit warning should show.

Engineering
☝
Operations
☝
Screenshots (if applicable)
https://github.com/shapeshift/web/assets/97164662/eea00d01-5ef7-42b5-bb87-b44b112d1ad1

Still to do (follow-up PR):

Savers withdraw (fees higher than withdrawal amount)
LP pool halted
Multi-hop trade, may end up with different asset if something goes wrong

Also lifi single hop trades with intermediary assets

Trade input seems to get upset when patching quotes to be unsafe:
diff --git a/src/state/apis/swapper/helpers/validateTradeQuote.ts b/src/state/apis/swapper/helpers/validateTradeQuote.ts
index 14d4d28747..bb1f2212d6 100644
--- a/src/state/apis/swapper/helpers/validateTradeQuote.ts
+++ b/src/state/apis/swapper/helpers/validateTradeQuote.ts
@@ -237,14 +237,7 @@ export const validateTradeQuote = async (
       }
     })

-  const recommendedMinimumCryptoBaseUnit = (quote as ThorTradeQuote)
-    .recommendedMinimumCryptoBaseUnit
-  const isUnsafeQuote =
-    sellAmountCryptoBaseUnit &&
-    !(
-      !recommendedMinimumCryptoBaseUnit ||
-      bnOrZero(sellAmountCryptoBaseUnit).gte(recommendedMinimumCryptoBaseUnit)
-    )
+  const isUnsafeQuote = true

   const disableSmartContractSwap = await (async () => {
     // Swappers other than THORChain shouldn't be affected by this limitation

https://github.com/shapeshift/web/assets/125113430/69ebd0fd-9207-47e8-8ced-8b4310004555

ty for the review @woodenfurniture! I'll get those translations and constants fixed up 🙏

@gomesalexandre & @woodenfurniture all feedback addressed sers 🙏
CI currently failing for unrelated reasons (waiting for my hotfix into release to be merged back into develop).

Applying the same patch to invoke unsafe trade quote, the layout is greatly improved but is missing a description of the issue such that it just says "Attention!" without further context 😅