Dependency found that is not listed in sbt

Somehow this action came up wit a dependency on protobuf-java but I'm unable to get sbt to report me that dependency
show Runtime/dependencyClasspathAsJars
show Compile/dependencyClasspathAsJars
show Test/dependencyClasspathAsJars

Any ideas where these could be coming from?

https://github.com/scalafx is getting dependency and security alert for jackson-databind but the project does not depend on it

For my case I suspect some optional runtime / provided maven dependency but would be good if sbt could point me to it.

https://github.com/scalafx is getting dependency and security alert for jackson-databind but the project does not depend on it

I noticed that in one of my projects as well. I guess the reason is that Scala 3 itself depends on it - at least this search shows a dependency on jackson-databind 2.12.1 which is the version I am getting an alert for: https://github.com/lampepfl/dotty/search?q=jackson

I tested sbt-dependency-submission with a totally empty sbt project and got dependencies on both protobuf-java (3.7.0) and jackson-databind (2.12.1) (for Scala 3.1.3 and sbt 1.7.1) (along with some others, but those were the most interesting one because they both yielded dependabot security alerts).
Downgrading the Scala version to 2.13.8 lead to a drastic reduction of dependencies (only five were left, none of them yielding alerts).

I can confirm that I also tested on a Scala 3 project

I believe it's due to scaladoc on Scala 3, it brings Jackson & Flexmark. This plugin uses allDependencies from sbt which lists scaladoc (and hence its transitive dependencies). A possible (quick-)fix could be allow configuring the plugin to use libraryDependencies or to exclude certain libs from allDependencies (before the transitive deps are calculated).

Thanks @ybasket. Indeed the Jackson & Flexmark dependencies are used by scaladoc on Scala 3.
There is a scope field in the dependencies of the Github Dependency Submission API,  which can be runtime or development. It is set to development for the compiler, scaladoc and all their dependencies. Unfortunately this information is not yet shown to the user. That's probably because the API is still in beta and the Dependency view has not yet been re-designed.
Github recently announced a sope filter in the dependabot alerts, but for reasons I don't know, it does not seem to work with the Github dependency submissions.
Should we exclude those dependencies from the report? I would say no because the vulnerabilities in the dependencies of the build tool could be exploited. I think we should always take as much dependencies as possible even if it is not always easy to understand where they are coming from. Hopefully the Github team will make it easier some day.
About the vulnerabilities, they should be fixed in scaladox itself. In the meantime this is how you can fix them in your build:

If you don't use scaladoc, you can remove it from the list of dependencies:

lazy val foo = project.in(file(""))
  .settings(
    allDependencies -= "org.scala-lang" %% "scaladoc" % scalaVersion.value % "scala-doc-tool->default(compile)",
    Compile / doc / sources := Seq.empty // disable the `doc` task
  )

If you use scaladoc, you can update the dependencies

lazy val foo = project.in(file(""))
  .settings(
    allDependencies += "com.fasterxml.jackson.core" % "jackson-databind" % "2.13.3" % Configurations.ScalaDocTool
  )

Should we exclude those dependencies from the report?

@adpi2 Would it be hard to make that decision configurable? I agree with your reasoning in that they should be included by default, but for the given GitHub circumstances and my situation at $WORK, having all those extra dependencies stops me from using the sbt-dependency-submission. The build is quite well-protected, so we care much more about the runtime dependencies.

@ybasket If you have time to contribute on this, I would be happy to help.

@ybasket If you have time to contribute on this, I would be happy to help.

I can't make any promises, but if I find time, I'll try to implement this.

To get started, you can add a field in this file and consume here to filter some dependencies out. The difficulty would be to define what to filter out. Do you want to filter out all developement dependencies? Even the test dependencies? Maybe a flexible solution would be to take a set of configs to ignore (scala-tool, scala-doc-tool) as input.

@adpi2 I tried implementing this and got stuck on how to pass the information along inside the sbt state (something I have no experience with). More concretely, it seems as the state isn't yet populated when the manifest task is run, hence the exclusions can't be extracted. Do you happen to have a hint on how to work around that? I opened a draft PR to share the current version I have, will probably take a bit until I find time again to work on it: https://github.com/scalacenter/sbt-dependency-submission/pull/51

Thanks @ybasket for looking into this. I left some comments in #51. I hope it helps.

If you don't use scaladoc, you can remove it from the list of dependencies:

This removes the jackson-databind but the protobuf-java remains. Any idea how that one can be excluded? Can we request a dependecy tree for this allDependencies?

I don't think it is possible to get a dependency tree for allDependencies easily. But I managed to add the dependencyTree task to the ScalaTool configuration with:
import sbt.librarymanagement.Configurations
import sbt.plugins.DependencyTreeSettings

inConfig(Configurations.ScalaTool)(DependencyTreeSettings.baseBasicReportingSettings)

sbt:example> ScalaTool / dependencyTree
[info] example:example_3:0.1.0-SNAPSHOT
[info]   +-org.scala-lang:scala3-compiler_3:3.0.0
[info]     +-org.jline:jline-reader:3.19.0
[info]     | +-org.jline:jline-terminal:3.19.0
[info]     |
[info]     +-org.jline:jline-terminal-jna:3.19.0
[info]     | +-net.java.dev.jna:jna:5.3.1
[info]     | +-org.jline:jline-terminal:3.19.0
[info]     |
[info]     +-org.jline:jline-terminal:3.19.0
[info]     +-org.scala-lang.modules:scala-asm:9.1.0-scala-1
[info]     +-org.scala-lang:scala3-interfaces:3.0.0
[info]     +-org.scala-lang:scala3-library_3:3.0.0 [S]
[info]     +-org.scala-lang:tasty-core_3:3.0.0
[info]     | +-org.scala-lang:scala3-library_3:3.0.0 [S]
[info]     |
[info]     +-org.scala-sbt:compiler-interface:1.3.5
[info]       +-com.google.protobuf:protobuf-java:3.7.0
[info]       +-org.scala-sbt:util-interface:1.3.0

So it seems that protobuf-java is a transitive dependency of scala3-compiler via sbt's compiler-interface.

I see this dependency is no longer part of the compiler-interface starting at 1.4.0 but I wonder if scala3 can update to that.
https://search.maven.org/artifact/org.scala-sbt/compiler-interface/1.4.0/jar

The Scala 3 compiler still depends on interface 1.3 to be compatible with Bloop < 1.5. See https://github.com/lampepfl/dotty/issues/10816.
But Bloop 1.5 now depends on Zinc 1.6 so we should be able to move this forward.

Would we expect modules-ignore: scaladoc_3 to work?  I tried it in this demo repo, but I still see scaladoc_3 (and all the vulnerabilities that come with it) in my dependency report.

Would we expect modules-ignore: scaladoc_3 to work?

No it should not, and it should warn that scaladoc_3 is not a valid module to ignore, which it does not. modules-ignore can only be used to prevent a project, on a Scala version, from submitting its dependencies, it does not exclude any dependency. In your example, the only "module" is modules-ignore-issue_3.
Adding a dependency-ignore field would be possible. However, to solve the specific issue of scaladoc bringing a lot of vulnerable dependencies, I am rather thinking of using a config-ignore setting, to ignore the entire scala-doc-tool config.

Fixed by #73
It is now possible to add configs-ignore: scala-doc-tool to exclude all the ScalaDocTool dependencies.


2.1.1 Create component diagram

Tasks:

[ ] Identify Components
[ ] Determine Relationships
[ ] Choose a Diagramming Tool
[ ] Create the Diagram
[ ] Add Connectors
[ ] Label Components
[ ] Document Interfaces
[ ] Specify Dependencies
[ ] Organize the Diagram

awaiting on #76
Linked to #76

Current State of Component Diagram


Ideas[To Do]

How about displaying a percentage in numbers on the hover of the progress column?
https://sm.ms/image/DoCU2twzBfvH9cV    (<- image photoshop)
Will the items have the same back background as in the original avaritia? https://sm.ms/image/hALG2IHtEUZYKiO

It's a good idea to display percentage numbers, and it will be added next version.
The extreme crafting table nei is too big, it's not suitable in jei.

Oh no, I'm not about the back background of an extreme crafting table, but about the that in the original avaritia, objects (resources) had "aura" :D https://sm.ms/image/mr8k1faOdSpTUVi

I know,the item render is difficulty for me,but i will try my best to finish it.

It will be amazing, you are a great fellow for taking on such a difficult case

https://github.com/Morpheus1101/Avaritia/issues/3#issue-212667049

Misc. Item Changes:

[ ] Ultimate Stew: Now gives every positive potion effect for 10 minutes
[ ] Longbow of The Heavens: Longbow Redesign
[ ] Hoe of the Green Earth: Shift + Clicking uses an AoE harvest and replant ability.

New Item Suggestions:

[ ] Infinity Horse Armor (Increases Speed + Flight)
[ ] Infinity Block Golem (Immortal)
[ ] Shortbow of The Stars: Hard Tracking/Ricocheting Arrows (Like how the latest official version of the mod has it.)
[ ] Crossbow of The Comets: 5x5 Grid Spread Shot (Arrows have no gravity)
[ ] Infinity Forge: (Instant Stack Cooking/Smelting) (Button to auto transfer to Black Hole Storage)
[ ] Infinity Trident: Riptide effect works out of water, is much faster, and is endless, rainbow riptide effect
[ ] Heavenly Arrows: When arrow misses, more arrows rain down from the heavens
[ ] Infinity Arrows: Infinity Damage
[ ] Endest Arrows: An endest pearl, in an arrow
[ ] White Hole Accumulator Block (Infinite RF/FE Generation) (2,147,483,647 RF per tick)
[ ] Infinity Bucket: Whatever fluid it scoops up can be placed down infinitely (Shift-Click to collect different fluid)

Black Hole Storage

[ ] Infinite Scrolling Inventory
[ ] Synced Storage (Like an Ender Chest)
[ ] Search Bar
[ ] Endless (2,147,483,647) Slot Space
[ ] Black Hole Chest/Barrel, Backpack, (Or RS Storage Disk) needed to access it
[ ] Toggleable Matter Cluster Auto-Collection (Basically instead of making a cluster it goes directly to the BHS)

I wrote this in CurseForge comments and i'll gonna respost this here:

Found Bugs  (ReAvaritia version <IP_ADDRESS> from 1.20.1).

I have found some bugs in the infinity armor that when you jump, the armor motion don't apply and you jump in the same speed as you be without it. The infinity pickaxe don't break reinforced deepslate instantly and modded blocks, like, for example ProjectE red matter block.

Some ideas

The Infinity Sword act just like a sword, normally. But i have an idea, the mod "Mob Battle Mod" have an item called "Mob Killer" item that kill any mob independently if it can't be hitted; (Invulnerable). It'll be really cool if you add this.
The Infinite Pickaxe has finite destructive power. I was wondering if you can make it break like in creative, being able to break everything. (Unless bedrock, you decide it).
The infinity ingot can craft 9 infinity nuggets, but the nuggets can't craft a ingot again. It'll be great if you be able to craft it again.
The star fuel has no use as far as I know. It could be kind of a infinite fuel or almost infinite.
In the original mod, the singularities are made from blocks of the ores. It'll be harder if you add that feature, don't no if it would be good, but here's an idea! :)

THE MOD IS AWESOME!
Please continue updating it, I'm sure it will be amazing, bro!

Monthly bug report: July

Hello again! I've found a bug in the infinity armor (again) and in the Endest Pearl.
  Without the armor it's fine, but with the armor doesn't make sense.  I don't know if this is a bug, but if even /kill can't kill you, why can the Endest pearl?
Infinity Sword cosmos animation it was supposed to be like that?
I think this bug is temporary, but I'm gonna report in the same way. The cosmos animation of the armor it's perfect, the armor is visually perfect, but the sword, in version <IP_ADDRESS>; (when you added the cosmos animation); it was covering pratically all the sword and this bug is still there in version <IP_ADDRESS>. And animations like that RGB pixel at the pommel of the sword it's beein covered by the cosmos animation.
But man, your mod is so good that it can't even be compared to other Avaritia recreations. Keep doing that, i'm using it in my modpack that it's just me and my friends, but I want to record for my channel about your mod!

每月錯誤報告：七月

再一次問好！我（再次）在無限裝甲和無盡珍珠中發現了一個錯誤。
（此錯誤僅在您處於生存模式時才會發生）當您扔出末日珍珠時，它會產生一個黑洞，殺死除了玩家（具有無限盔甲）之外的所有東西。這就是我的想法，因為當你在黑洞內部（帶著盔甲）時，你會不斷死亡。沒有鎧甲還好，但是有了鎧甲就沒有意義了。從技術上講，盔甲應該讓你永生（即使 /kill 也不能殺死你）。我不知道這是否是個錯誤，但如果連 /kill 都不能殺死你，為什麼 Endest Pearl 可以呢？
無限劍宇宙動畫本來應該是這樣的嗎？
我認為這個錯誤是暫時的，但我會以同樣的方式報告。盔甲的宇宙動畫很完美，盔甲在視覺上很完美，但是劍，在<IP_ADDRESS>版本中； （當你加入宇宙動畫時）；它幾乎覆蓋了所有的劍，而這個錯誤在 <IP_ADDRESS> 版本中仍然存在。動畫就像劍的鞍頭上的 RGB 像素一樣，它被宇宙動畫覆蓋。
但老兄，你的模組太棒了，甚至無法與其他《Avaritia》遊戲相比。繼續這樣做，我在我的模組包中使用它，只有我和我的朋友，但我想為我的頻道記錄有關您的模組的資訊！

This is not a bug, it's just a damage check that cancels or not, even if it's hard to understand, there are many things that can kill people wearing armor (such as injecting getHealth methods).

This has been fixed at https://github.com/Nova-Committee/Re-Avaritia/issues/27#event-13498086984

這並不是Bug，這只是傷害的判定取消與否，即便這很難理解，但是有很多東西是可以殺死穿著盔甲的人的 (例如注入getHealth方法)。

這個在https://github.com/Nova-Committee/Re-Avaritia/issues/27#event-13498086984已修復

每月錯誤報告：七月

再一次問好！我（再次）在無限裝甲和無盡珍珠中發現了一個錯誤。
（此錯誤僅在您處於生存模式時才會發生）當您扔出末日珍珠時，它會產生一個黑洞，殺死除了玩家（具有無限盔甲）之外的所有東西。這就是我的想法，因為當你在黑洞內部（帶著盔甲）時，你會不斷死亡。沒有鎧甲還好，但是有了鎧甲就沒有意義了。從技術上講，盔甲應該讓你永生（即使 /kill 也不能殺死你）。我不知道這是否是個錯誤，但如果連 /kill 都不能殺死你，為什麼 Endest Pearl 可以呢？
無限劍宇宙動畫本來應該是這樣的嗎？
我認為這個錯誤是暫時的，但我會以同樣的方式報告。盔甲的宇宙動畫很完美，盔甲在視覺上很完美，但是劍，在<IP_ADDRESS>版本中； （當你加入宇宙動畫時）；它幾乎覆蓋了所有的劍，而這個錯誤在 <IP_ADDRESS> 版本中仍然存在。動畫就像劍的鞍頭上的 RGB 像素一樣，它被宇宙動畫覆蓋。
但老兄，你的模組太棒了，甚至無法與其他《Avaritia》遊戲相比。繼續這樣做，我在我的模組包中使用它，只有我和我的朋友，但我想為我的頻道記錄有關您的模組的資訊！

1. **This is not a bug**, it's just a damage check that cancels or not, even if it's hard to understand, there are many things that can kill people wearing armor (such as injecting getHealth methods).

2. This has been fixed at [https://github.com/Nova-Committee/Re-Avaritia/issues/27#event-13498086984](url)

1. **這並不是Bug**，這只是傷害的判定取消與否，即便這很難理解，但是有很多東西是可以殺死穿著盔甲的人的 (例如注入getHealth方法)。

2. 這個在[https://github.com/Nova-Committee/Re-Avaritia/issues/27#event-13498086984](url)

Thanks, bro! But I already know that the first one is not a bug, wanted to do. And the second one had not been fixed at the time of posting. (1st July)

多謝兄弟！但我已經知道第一個不是bug，想做的。第二個在發佈時尚未修復。 （7 月 1 日)

Hello! I'm playing this mod with a friend and his cosmos animation it's different from the picture and it's different from mine too. It's more detailed.

Alternate cosmos animation

Normal cosmos animation

Even he doesn't know how he did it. (If he did something)

And one more thing, the armor wing doesn't appear in multiplayer.

2 bugs in the Infinity Armor. (One of the bugs is quite noticeable and I think (I'm sure) you've already noticed it.)

The first one, it's in the texture of the armor. Have these details in the armor on the armor that aren't with a cosmic render, actually  they are beneath it.

The second one is in the inventory, it's pretty strange, i can't explain this, but i guess it's some kind of render bug or something. (It happends when you put your mouse in the armor leggings.

Thats all for today, i guess.

The armor bug in the inventory is only in the creative mode! I didn't tested before in the survival mode. (But doesn't appear no have this bug in the survival)

Normal cosmos animation fixed


Handle non-positive wait time and fix waitUntilTrue doesn't run at least once

This change is

Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ko1in1u)

snippet_uiautomator/utils.py line 40 at r1 (raw file):

      if isinstance(timeout, datetime.timedelta)
      else int(timeout)
  )

I think it would be clearer to write this as an if-else branch. It's also nice to check that the type is as expected at runtime.
  if isinstance(timeout, datetime.timedelta):
    timeout_ms = int(timeout.total_seconds() * 1_000)
  elif isinstance(timeout, (float, int)):
    timeout_ms = int(timeout)
  else:
    raise ValueError(
        f'Timeout must be a float, int or datetime.timedelta, got {timeout}'
    )

  if timeout_ms <= 0:
    raise ValueError('Timeout must be greater than 0 second')
  return timeout_ms

Code quote:
  timeout_ms = (
      int(timeout.total_seconds() * 1_000)
      if isinstance(timeout, datetime.timedelta)
      else int(timeout)
  )

Modified accordingly, thanks!


feat: control dev mode with env var

Description
This PR fixes #62

Also, could you add a way to control the dev mode in app.start(debug=True)

the decision to turn on/off the dev mode would have been made before we reach robyn#start

And why is that? I thought you were implementing python app.py --dev

the decision to turn on/off the dev mode would have been made before we reach robyn#start

And why is that?

what I meant with "the decision to turn on/off the dev mode would have been made before we reach robyn#start" is that that the control flow reaches robyn#start from cli#run => cli#start_dev_server or cli#run => cli#start_app_normally.

I thought you were implementing python app.py --dev And even if it is robyn app.py Why is it being invoked before start?

I didn't get you? yeah, I am implementing the toggle for dev mode from env vars; but, in both cases, wouldn't the decision to switch to whether to start app normally or to start the dev server would have been made before the init?

@VishnuSanal , updated the PR. Do have a look.

@VishnuSanal , could you do a self review/review on my changes? And then I can do a final review 😄

What is unexpected here @VishnuSanal ?

What is unexpected here @VishnuSanal ?

I have the environemnt variable set to true, but no warning is shown when running python3 app.py (CMIIW).

@VishnuSanal , is it actually running in dev mode?

@VishnuSanal , is it actually running in dev mode?

it wasn't actually running in dev mode + the warning wasn't being shown, even after setting the env var. Please refer to the logs attached.

(.venv) RobynApp $ python3 app.py
INFO:robyn.logger:SERVER IS RUNNING IN VERBOSE/DEBUG MODE. Set --log-level to WARN to run in production mode.
INFO:robyn.logger:Added route HttpMethod.GET /
INFO:robyn.logger:Robyn version: 0.56.1
INFO:robyn.logger:Starting server at http://<IP_ADDRESS>:8080
INFO:actix_server.builder:starting 1 workers
INFO:actix_server.server:Actix runtime found; starting in Actix runtime
^CINFO:actix_server.server:SIGINT received; starting forced shutdown
INFO:actix_server.worker:shutting down idle worker
INFO:actix_server.accept:accept thread stopped
Aborted (core dumped)

(.venv) RobynApp $ robyn app.py
Starting dev server...
Reloading /home/vishnu/Robyn/RobynApp/app.py...
INFO:robyn.logger:SERVER IS RUNNING IN VERBOSE/DEBUG MODE. Set --log-level to WARN to run in production mode.
INFO:robyn.logger:Added route HttpMethod.GET /
INFO:robyn.logger:Robyn version: 0.56.1
INFO:robyn.logger:Starting server at http://<IP_ADDRESS>:8080
INFO:actix_server.builder:starting 1 workers
INFO:actix_server.server:Actix runtime found; starting in Actix runtime
^CINFO:actix_server.server:SIGINT received; starting forced shutdown
INFO:actix_server.accept:accept thread stopped
INFO:actix_server.worker:shutting down idle worker

(.venv) RobynApp $ cat robyn.env
ROBYN_DEV_MODE=True

@VishnuSanal , have a look once.

yeps, works as expected! attaching the logs for reference.
(.venv) testing_application $ cat robyn.env
ROBYN_DEV_MODE=True

(.venv) testing_application $ python3 app.py
Ignoring ROBYN_DEV_MODE environment variable. Dev mode is not supported in the python wrapper.
Dev mode is not supported in the python wrapper. Please use the Robyn CLI. e.g. python3 -m robyn app.py

(.venv) testing_application $ robyn app.py
Starting dev server...
Reloading the server
argumens
INFO:robyn.logger:SERVER IS RUNNING IN VERBOSE/DEBUG MODE. Set --log-level to WARN to run in production mode.
INFO:robyn.logger:Added route HttpMethod.GET /
INFO:robyn.logger:Robyn version: 0.56.1
INFO:robyn.logger:Starting server at http://<IP_ADDRESS>:8080
INFO:actix_server.builder:starting 1 workers
INFO:actix_server.server:Actix runtime found; starting in Actix runtime
^CINFO:actix_server.server:SIGINT received; starting forced shutdown
INFO:actix_server.worker:shutting down idle worker
INFO:actix_server.accept:accept thread stopped

(.venv) testing_application $ cat robyn.env
ROBYN_DEV_MODE=False

(.venv) testing_application $ python3 app.py
INFO:robyn.logger:SERVER IS RUNNING IN VERBOSE/DEBUG MODE. Set --log-level to WARN to run in production mode.
INFO:robyn.logger:Added route HttpMethod.GET /
INFO:robyn.logger:Robyn version: 0.56.1
INFO:robyn.logger:Starting server at http://<IP_ADDRESS>:8080
INFO:actix_server.builder:starting 1 workers
INFO:actix_server.server:Actix runtime found; starting in Actix runtime
^CINFO:actix_server.server:SIGINT received; starting forced shutdown
INFO:actix_server.worker:shutting down idle worker
INFO:actix_server.accept:accept thread stopped
Aborted (core dumped)

(.venv) testing_application $ robyn app.py
INFO:robyn.logger:SERVER IS RUNNING IN VERBOSE/DEBUG MODE. Set --log-level to WARN to run in production mode.
INFO:robyn.logger:Added route HttpMethod.GET /
INFO:robyn.logger:Robyn version: 0.56.1
INFO:robyn.logger:Starting server at http://<IP_ADDRESS>:8080
INFO:actix_server.builder:starting 1 workers
INFO:actix_server.server:Actix runtime found; starting in Actix runtime
^CINFO:actix_server.server:SIGINT received; starting forced shutdown
INFO:actix_server.worker:shutting down idle worker
INFO:actix_server.accept:accept thread stopped


Is there a way to conditionally include scripts in index.html as in analytics?

Here are a few helpful things I found on Google:
https://developers.google.com/analytics/devguides/collection/analyticsjs/single-page-applications
https://github.com/angulartics/angulartics2

Thanks @Ionaru I'll have a look.

Hi I have the same question. The problem I have is when doing ng build the script code in the index is not included.
I also created this question for the same reason
http://stackoverflow.com/questions/42388641/how-to-include-google-analytics-in-angular-cli-application
Any updates?
Thanks in advance

@pdjota and you killed StackOverflow, well done ;-)
Be sure not to put the script code inside the  tags, because anything inside those tags gets replaced by the Angular application.

thanks @Ionaru including the tag in the HEAD is working for me.

The initial question has not really been answered here, I'm also wondering how that could be solved.
Consider if you add f.e. Google Tag Manager or Google Analytics integration to your site, and you have different workspaces (or properties in GA) setup for your different environments. The appropriate script&noscript tags area added to the head and body of index.html but the tracking-id differs between environments.
Best case scenario would of course be if ng build --env=staging/prod would produce two different index.htmls where the tracking id has been set via some dynamic variable.
Until there is support for that, what would be a decent workaround? I guess checking environment variables on server side and serve two different index.html files would be one option. Am using a simple static files server currently though so curious to whether there is some more elegant way of solving this as part of the build process instead

You could try making a function to add different Analytics properties when running in different environments. Like this:
if (environment.production) {
  document.getElementById('analytics').innerHTML = 'Production-analytics-code-here';
} else if (environment.staging) {
  document.getElementById('analytics').innerHTML = 'Staging-analytics-code-here';
}

If you do this in main.ts, then the code gets added to the webpage as early as possible.

The CLI doesn't provide any such functionality, no. This was requested in https://github.com/angular/angular-cli/issues/4288.
In past projects what I did was having Angular services that correctly run these scripts, and use the correct analytics token provided inside the environment files.
@Ionaru has provided some pretty good solutions though, cheers!

Wont this fail tests? (using document?)

@filipesilva I don't think it's a 'pretty good solution', it's mostly a workaround which fortunately works fine

@Ionaru solution is the best workaround I found so far.
There is a "but" to this workaround
Adding the <noscript> section dynamicaly when bootstraping Angular makes no sense as it needs javascript to bootstrap but the tag is to track disabled javascript users.
So be ready to throw away non javascript users tracking if you want to use that workaround OR you could keep the <noscript> section in the body of the index.html file but you'll get tracking for non javascript user from every environments mixed together.

Solution provided here will not work in Angular Universal, due to direct access to the document object.
You should instead use the DOCUMENT object exported by the platform-browser.  This way I could set a dynamic tagManager id for each environment.
So in the AppComponent:
import { DOCUMENT } from '@angular/platform-browser';
...
  public constructor(
    @Inject(DOCUMENT) private doc: any
  ) {

Then I used a private method called on ngOnInit() to insert the tag in <head>:
  private setGTagManager() {
    const s = this.doc.createElement('script');
    s.type = 'text/javascript';
    s.innerHTML = '(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push'
      + '({\'gtm.start\':new Date().getTime(),event:\'gtm.js\'});var f=d.getElementsByTagName(s)'
      + '[0],j=d.createElement(s),dl=l!=\'dataLayer\'?\'&l=\'+l:\'\';j.async=true;j.src='
      + '\'https://www.googletagmanager.com/gtm.js?id=\'+i+dl;f.parentNode.insertBefore(j,f);})'
      + '(window,document,\'script\',\'dataLayer\',\'' + environment.tagManagerId + '\');';
    const head = this.doc.getElementsByTagName('head')[0];
    head.appendChild(s);
  }

As you can see I imported the tagManager ID from the global environment, so I could use different ones for dev and production.
Also if you use Angular Universal be sure to run this code only on the server, or it will import the script twice in the browser.
Hope this helps.

@pbazurin-softheme how to change between different index.html files with configurations, any example or snippets? I tried with changing "options" but it didnt worked.

@pbazurin-softheme it seems like your snippet would work for my needs (adding  tags instead of

Seemingly that example from @pbazurin-softheme would work starting from Angular CLI 6.1.0-beta.2, as explained above.
Check the releases.

@meetai ahh. Yes. My comment was specific to cli 6.0.8. Apprciate the clarification.

This client side package should also address the original question outside the context of the Angular CLI: https://github.com/anywhichway/scriptswitch.

@lonaru solution worked for me also. Thanks!

@pbazurin-softheme Your solution is the most stable one. It prevents adding script tags at runtime (which would nullify the <noscript> tag usage). It's a little bit of maintenance overhead, but in my opinion it prevents possibly hard-to-debug errors when injecting script tags dynamically. Thanks!

The CLI doesn't provide any such functionality, no. This was requested in #4288.
In past projects what I did was having Angular services that correctly run these scripts, and use the correct analytics token provided inside the environment files.
@Ionaru has provided some pretty good solutions though, cheers!

Please edit this to point to the much better answer at https://github.com/angular/angular-cli/issues/4451#issuecomment-399888807


JSQL can't escape Single Quote

I am having query
UPDATE tablename SET  NAME='Customer 2',ADDRESS='Address ' ddad2',AUTH_KEY='samplekey' WHERE  ID=2;
I am fine if we need to do
UPDATE tablename SET  NAME='Customer 2',ADDRESS='Address \' ddad2',AUTH_KEY='samplekey' WHERE  ID=2;
This query worked fine on mysql workbench or other SQL agents.. But when I try to parse the Query in JSQL it dosent manage to parse.. Is there any other alternative??
Can you tell me meaning of these 2 regex
For both defects i think i need to play around with these regex
|   < S_CHAR_LITERAL: "'" (~["'"])* "'" ("'" (~["'"])* "'")>
|   < S_QUOTED_IDENTIFIER: """ (~["\n","\r","""])+ """ | ("" (~["\n","\r",""])+ "`") | ( "[" ~["0"-"9","]"] (~["\n","\r","]"]) "]" ) >

I think using query in this format fixes it
UPDATE tablename SET NAME='Customer 2',ADDRESS='Address '' ddad2',AUTH_KEY='samplekey' WHERE ID=2;

Right. JSqlParser only supports usage of double quotation ('') and not backslash escaping.

So could we close this one, as you provided a solution?

ok sure


Throttle Controlled avionics will not install

the mod reports AT-Utils is missing, and will not install.

What KSP Version are you trying to install it into?

I have 1.2.1 and if I manually install the mod I do indeed get the "AD" but if I delete the mod I get the error about AT-UTILS.   AT-UTILS is packaged with TCA however so it should not have to look for it, unless it has been split out as I think it is also included with Custom containers and maybe a few other of Alista's mods.

lol this, and many other mods issues I have found in the last week, just  because I just had to "fix" module manager.  I should have just left MM out of the CKAN and updated it manually. about 50% of my mods do not want to reinstall, but most of them I can sort out the issues on my own.  usually from a stray file left behind when removing the original install of the mod.

You're getting a real course in fixing CKAN issues, here!

So, when you manually installed the mod, did you install the packaged AT-Utils as well?
At some point it gets easier to just delete your entire GameData directory (other than the "Squad" folder, obviously), delete your registry.json, and start from scratch. Obviously, if you've got a lot of manually installed mods, that's a nuisance, but if you move your GameData contents off to an archive location, you can move back your manual mods afterwards.

just did this...
wiped KSP and working on the rebuild of the mods now.

Closing due to inability to reproduce and issue worked around.


add avro jvm extension

fix #782

I had to moved this extension from extensions to extensions-jvm, therefore I'm not sure if generated doc is right. @ppalaga @jamesnetherton could you please look ?


Unit tests in pylast

It says "Integration (not unit) tests for pylast.py" at the top of test_pylast.py. Where should unit tests be placed? is pylast_unit_tests.py okay. Why not have a test directory?

Yeah, test_pylast.py aren't really unit tests because they're run against the real Last.fm network.
I'm open to suggestions, including renaming test_pylast.py if that make sense (test_integration_pylast.py?), and would like to follow common Python conventions where possible. test_ prefixes seem most common for filenames.
So a tests directory is a good idea. The current test_pylast.py is quite long. For new unit tests, it may make more sense to have more, but shorter, files. Perhaps test_user.py will test the User object, or something like that.

How would you feel about switching to pytest instead of using unittest?

I'd prefer to stick with unittest as the testing framework as I'm much more familiar with it. When it comes to a test runner, I'm more familiar with nosetests (for example with coverage) but I guess both should be able to run the unittest tests.


[SDK] Add note about WAITING status. NEVER set or compare WAITING. Us…

…e isInterrupted()

retest this please


Datepicker does not render correctly on focus

The first time that the input that has the datepicker attached gets focus the datepicker does not render completely. If I move to another input then back to the date input it renders correctly. See attached image.

Using 1.6.0 inside a bootbox dialog that is part of an Angular JS app

I have solved this problem. Datpicker is fine. In an Angular JS controller it seems any loading of jquery widgets should be called from a timeout of approximately 100 ms -
    setTimeout(function () {
        initJqueryComponents();
    }, 100);

This solved the problem so I am closing this issue.


protocol: sync layer-shell with upstream

Fixes this warning:
../protocol/wlr-layer-shell-unstable-v1.xml:241: warning: since version not increasing

cc @Timidger

Whoops, missed that.


Content tweaks to accessibility.html.md.erb

I think all the content is still in date but I've made some small tweaks to the content:

added 'cognitive' to the list of disabilities we're including
made a minor change to the Assistiv Labs section which I think makes the sentence slightly easier to parse
changed 'accessibility empathy lab' to 'accessibility lab' to reflect the current name and clarified where it is
updated the prototype kit URL
tweaked a line in the alt text section to hopefully make it clearer that the alt attribute still needs to be present, but it should be empty.

Something else we should fix (in the 'Automated testing' page): aXe was re-stylised to Axe.
Not sure if we should still mention Lighthouse as it's based on Axe nowadays, although it might still be good because it doesn't need anything extra being installed. Others we could mention is WAVE and ARC Toolkit.


Add format flag to network inspect

…for consistency as docker inspect and docker volume inspect supports it too 🐙.
$ docker network inspect -f "{{.Name}}" bridge host
bridge
host

Closes #17446
/ping @albers @mavenugo
🐸
Signed-off-by: Vincent Demeester<EMAIL_ADDRESS>

Thanks, @vdemeester.
Two things, first:
The filters require capitalized names (.Name, .Containers) whereas the raw output of docker network inspect has them in lowercase (.name, .containers).
This is different from docker inspect where the unfiltered command also contains the capitalized variants (.Id).
I think the output of the unfiltered docker network inspect was implemented incorrectly with all keys being lowercased. It seems to just print the JSON.
Second, not all keys are available. .Id and .Ipam do not work:

template: :1:2: executing "" at <.Ipam>: Ipam is not a field of struct type *types.NetworkResource

@albers It's probably because it needs to be ID and IPAM
Agreed, this is stinky, really we have the same issue on docker inspect.

Maybe we can just inspect against the raw json?

@cpuguy83 not sure what you mean on that ; reading the json and applying our template/format ?
I did the simplest implementation ever (which looks almost exactly as docker volume inspect too :stuck_out_tongue_closed_eyes:)

Yeah, but volume inspect's json output matches the struct type...for now.

If you unmarshal to interface{} or even map[string]interface{} instead of the struct type, that's what I mean by using the raw json.

@cpuguy83 ok, sounds pretty good to me, I'll try that :wink:

@cpuguy83 Using interface{} or map[string]interface make the json look like :
$ docker network inspect host
[
    {
        "containers": {},
        "driver": "host",
        "id": "0ef30effd29074809e8592e71b1a580f078ca12a4fe7c7f3447607df6f8087f8",
        "ipam": {
            "config": [],
            "driver": "default"
        },
        "name": "host",
        "options": {},
        "scope": "local"
    }
]

All lowercase, feels a little bit strange compared to othersinspect commands.

I created an issue (#17519) that the output of docker network inspect should be changed to use the key names form the struct. This would improve consistency and should also ease implementaion of --format.

The api respects the types now and we don't need to use interfaces or maps here anymore :tada:

Rebased against master.
@calavera did the same as api/client/volume.go inspect for now :stuck_out_tongue:.

I just found another issue on this, since this PR hasn't been merged yet, I think it's better to modify in this commit. docker network inspect one non-exist network is inconsistent with docker inspect and docker volume inspect, for example:
$ docker inspect aaaa
Error: No such image or container: aaaa
[]

$ docker network inspect aaaa
Error: No such network: aaaa
null

$docker volume inspect aaaa
Error response from daemon: no such volume

I think it's better for them to have consistent behavior.
As @vdemeester is also adding --format for volume, I think I can leave opinions about volume here though it's not quite relevant to this PR. :smile:

I agree with you @WeiZhang555. I think the best consistent behavior is to not print any inspect output if the object doesn't exist, like the volume command does.

This would mean :
$ docker network inspect aaaa bbbbb # where bbbbb exists
Error response from daemon: no such network: aaaa
[{
# // …
}]

I'm ok with that :wink:. I'll update this PR to reflect that, and probably opens more to get the behavior consistent on other inspect if needed.

:heart: :heart:

LGTM.
It will need documentation though :stuck_out_tongue_winking_eye:

@calavera updated with some docs :wink:
ping @thaJeztah for docs, ping @albers @sdurrheimer for completion I just added :wink:

thanks @vdemeester . LGTM

Updated, thanks guys @albers @sdurrheimer

LGTM

Thanks a lot, Vincent.
bash completion LGTM.

LGTM

moving to docs review ping @thaJeztah @moxiegirl

Thanks @vdemeester one note, but LGTM otherwise!

LGTM @vdemeester thank you! :star:

@thaJeztah @moxiegirl updated :wink:

Thanks! LGTM!


About to generate mesh

Hi, I want to know when  this section of code will be added.

Hi, you can obtain the mesh from this code
https://github.com/astra-vision/SceneRF/blob/main/scenerf/scripts/reconstruction/depth2tsdf.py#L107

Hi @wangqiwangyuqing,
I added a section on mesh visualization:
https://github.com/astra-vision/SceneRF/blob/main/README.md#mesh-extraction-and-visualization


difference of the displaying information while following tutorials to build a local chain

the tutorial show the info below
2021-11-24 15:36:35 Running in --dev mode, RPC CORS has been disabled.
2021-11-24 15:36:35 Substrate Node
2021-11-24 15:36:35 ✌  version 4.0.0-dev-82b7c2c-aarch64-macos
2021-11-24 15:36:35 ❤  by Substrate DevHub https://github.com/substrate-developer-hub, 2017-2021
2021-11-24 15:36:35 📋 Chain specification: Development
2021-11-24 15:36:35 🏷 Node name: six-wash-9274
2021-11-24 15:36:35 👤 Role: AUTHORITY
2021-11-24 15:36:35 💾 Database: RocksDb at /tmp/substrateP1jD7H/chains/dev/db
2021-11-24 15:36:35 ⛓  Native runtime: node-template-100 (node-template-1.tx1.au1)
2021-11-24 15:36:35 🔨 Initializing Genesis block/state (state: 0xa59b…5331, header-hash: 0xc5d2…37f3)
2021-11-24 15:36:35 👴 Loading GRANDPA authority set from genesis on what appears to be first startup.
2021-11-24 15:36:35 ⏱  Loaded block-time = 6s from block 0xc5d2fdad35e14684753f087c1a20f022274e154d39add4f7efe34e95476a37f3
2021-11-24 15:36:35 Using default protocol ID "sup" because none is configured in the chain specs
2021-11-24 15:36:35 🏷 Local node identity is: 12D3KooWG5niQF5bjsFao3D8DZRpUUB6uWZC2pK8hCDZ94zsr8Sc
2021-11-24 15:36:35 📦 Highest known block at #0
...
...
...
2021-11-24 15:36:40 💤 Idle (0 peers), best: #1 (0xd2b5…d03f), finalized #0 (0xc5d2…37f3), ⬇ 0 ⬆ 0
But when I use the command  I only get the info below
./target/release/node-template --dev
2022-07-23 20:03:29 〽 Prometheus exporter started at <IP_ADDRESS>:9615
2022-07-23 20:03:30 🙌 Starting consensus session on top of parent 0xf0176440a52e6c0998a49bf4ef263baa061245d97d653e9831c4db0308aef22e
2022-07-23 20:03:30 🎁 Prepared block for proposing at 1 (1 ms) [hash: 0xb0d3cb165d089f6b5cd187534ff4e46f6d8fe994ec1c5c65c70580b0df5ec4bd; parent_hash: 0xf017…f22e; extrinsics (1): [0x8e73…8af4]]
2022-07-23 20:03:30 🔖 Pre-sealed block for proposal at 1. Hash now 0x66f99f33cfd26aac6a6d37ecfceb55491ea899e3cc5e8321bfa4cd06dd0c3067, previously 0xb0d3cb165d089f6b5cd187534ff4e46f6d8fe994ec1c5c65c70580b0df5ec4bd.
2022-07-23 20:03:30 ✨ Imported #1 (0x66f9…3067)
2022-07-23 20:03:34 💤 Idle (0 peers), best: #1 (0x66f9…3067), finalized #0 (0xf017…f22e), ⬇ 0 ⬆ 0
2022-07-23 20:03:36 🙌 Starting consensus session on top of parent 0x66f99f33cfd26aac6a6d37ecfceb55491ea899e3cc5e8321bfa4cd06dd0c3067
2022-07-23 20:03:36 🎁 Prepared block for proposing at 2 (0 ms) [hash: 0x28a32139004fe07f28251148092680810dbbc257348e3f29cd4f3bb30657b8e5; parent_hash: 0x66f9…3067; extrinsics (1): [0x5068…a856]]
2022-07-23 20:03:36 🔖 Pre-sealed block for proposal at 2. Hash now 0x83ca664157405295e2c11f158982023d681b43a17fb22da67f41ca962a2e0845, previously 0x28a32139004fe07f28251148092680810dbbc257348e3f29cd4f3bb30657b8e5.

I can't reproduce this issue. Can you provide additional information? Maybe it is an environment issue?


HTTP conditional requests

simple implementation of https://www.rfc-editor.org/rfc/rfc9110.html#name-conditional-requests

i coould do If-Modified-Since and If-Unmodified-Since as well..

I've made a few decisions with this implementation;

An origin server that evaluates an If-Match condition MUST NOT perform the requested method if the condition evaluates to false. Instead, the origin server MAY indicate that the conditional request failed by responding with a 412 (Precondition Failed) status code. Alternatively, if the request is a state-changing operation that appears to have already been applied to the selected representation, the origin server MAY respond with a 2xx (Successful) status code (i.e., the change requested by the user agent has already succeeded, but the user agent might not be aware of it, perhaps because the prior response was lost or an equivalent change was made by some other user agent).

I will not add logic to handle this possibility for using a 2xx code to any of the existing endpoints for simplicity. An endpoint in such a project could choose to implement this on a per-endpoint basis if the developer feels there is worthwhile gains in terms of efficiency when a change request already seems to be fulfilled; I will continue with 412 for all existing cases.

When an origin server receives a request that selects a representation and that request includes an If-Match header field, the origin server MUST evaluate the If-Match condition per Section 13.2 prior to performing the method.

To evaluate a received If-Match header field:

If the field value is "*", the condition is true if the origin server has a current representation for the target resource.
If the field value is a list of entity tags, the condition is true if any of the listed tags match the entity tag of the selected representation.
Otherwise, the condition is false.

Examples:

If-Match: "xyzzy"
If-Match: "xyzzy", "r2d2xxxx", "c3piozzzz"
If-Match: *

In my opinion, point #2 has limited value for the complexity it adds; so I will likely not support it.

Some other libraries (e.g. werkzeug) implement similar functions to here; would be nice to compare implementations for best practices


Stop services in a particular order

This orders services roughly by their dependencies. The services that rely on other services are stopped before the underlying backend services.
This is mainly meant to address a Monit issue where the controller is designated as "Initializing" sometime during the stop process, preventing any other services from being stopped until its status is resolved.
Resolves #2830.

As a test, I started a deployment, deployed two apps, and ran a down --clean 12 times in a row.
On master, I encountered the issue 4 times (the terminate took unreasonably long due to the controller service getting stuck on "Initializing").
On this branch, I did not encounter the issue at all.

@sjones4 Yes. Eventually, it might make sense to put dependency information in some kind of shared service definition that the ServiceManager can use to start and stop services. Logging a warning here seems like a reasonable behavior for now, though.

https://ocd.appscale.com:8080/job/Daily Build/5272/
https://ocd.appscale.com:8080/job/Euca-Faststart/2635/


Provide DESCRIPTIVE release notes PLEASE

Welcome to FirebaseUI and thanks for submitting an issue!
Please take a look at open issues, as well as resolved issues, to see if your issue is either already being addressed, or has been solved by someone else.
If not, please feel free to fill in the following info so we can help faster!
Step 1: Are you in the right place?

For issues or feature requests related to the code in this repository file a GitHub issue.
For general technical questions, post a question on StackOverflow tagged appropriately.
For general Firebase discussion, use the firebase-talk google group
For help troubleshooting your application that does not fall under one of the above categories, reach out to the personalized Firebase support channel

Step 2: Describe your environment

FirebaseUI version: *

Step 3: Describe the problem:
The development team needs to provide release notes for everything here.
Steps to reproduce:

See releases for this library
No step 2

Observed Results:
• A fatal crashing upon login issue happened with version 6.4.0 of this library on Android 31. There is no information in the release notes about this bug that Google both created and neglected to alert developers about.
Expected Results:

Google Developers should provide descriptive, detailed release notes instead of the generic (and lazy): "Improvements & bug fixes" for each version.

Relevant Code:
…every single release of this library.

@thefaj All of our releases contain a "Changes" sections which describes what fixes were included in that release:

Am I missing something?

@thefaj I'm closing this for now since there hasn't been any activity, but feel free to re-open if I missed anything.


Add .Site.Resource

Thinking about this, this should not be too hard (but a fair amount of work) and would have a fair amount of use cases.
So from a template:
{{ $img := .Site.Resource "images/mylogo.png" }}

(or maybe just a template func with a shorter name)
Could look for that image in

/static
/content (maybe)
/theme/static

And create a proper Image that can be resized etc. This is a metadata-less resource by design (at least in its first iteration).
This also opens up a set of interesting use cases.
{{ $css := .Site.Resource "css/main.css" }}
{{ $css := $css.FingerPrint }}

See #4268
See https://discourse.gohugo.io/t/any-plan-to-add-resize-feature-to-any-image-object/10358/13

Most likely just ran into one of these use cases:
single.html -> calls partial.html
Within single.html {{ range .Resources }} is used, which then provides data to the partial {{ partial "partial.html" . }}.
A few issues come up then.

.Name is not the name of the resource file, but of the calling index.md file
.Resources.GetMatch "*" doesn't return a result
$.Site.Resources or $.Resources doesn't work

Current workaround using scratch:
single.html:
{{ range sort .Resources }}
  {{ $.Scratch.Set "data" . }}
  {{ partial "fragments/test.html" $ }}
{{ end }}

fragments/test.html:
{{ $self := ($.Scratch.Get "data").Params }}
{{ $name := ($.Scratch.Get "data").Name }}
{{ $name_t := strings.TrimSuffix ".md" $name }}
{{ $content := .Resources.Match (printf "%s/*" $name_t) }}
{{ range $content }}
  {{ .Params }}
{{ end }}

@stp-ip no, I think you have a syntax problem. Try https://discourse.gohugo.io/

Syntax error or not, $.Site.Resources would fix this issue. But will post on discourse as suggested.

@regisphilibert @kaushalmodi @moorereason and gang:
I have pondered on a flexible design on this that do this in a decoupled way (makes adding new stuff easy) without creating these big interfaces/structs.
Here is my thought using an example:
$css :=  resource "main.css" | resource.Digest | resource.Fingerprint

 <link rel="stylesheet" href="{{ $css.RelPermalink }}" integrity="{{ $css.Digest | base64Encode }}">

The above chain the resources and differentiates between simple decorator filters (digest) and filters that changes the destination/permalink (fingerprint). It must be ordered, but we could probably handle missing steps (below: we need the digest to create the fingerprint, so just create a default one):
$css :=  resource "main.css" | resource.Fingerprint

I will probably implement the above example as a proof of concept (it has its use) and will add options to select sha256 (default) etc.
And as always: Name suggestions/improvements are always welcome.

This looks great, let get back to you shortly!

$css :=  resource "main.css" | resource.Digest | resource.Fingerprint

I looked at the PR, but still couldn't understand what .Digest and .Fingerprint do.. Can you provide a 1-line summary for each function?

The above chain (compose) the resources and differentiates between simple decorator filters (digest) and filters that changes the destination/permalink (fingerprint).

This too did not help me understand those, sorry.

$css :=  resource "main.scss" | resource.Sassify | resource.Digest | resource.Fingerprint

I have comment about .Sassify :) Anything foo-ify implies that the outcome will be foo. Let me explain with few examples (ref):

beautify, mystify, simplify

Above, they mean: make beautiful, make mysterious, make simple.
Going along the same lines .Sassify would mean, make .sass or .scss. But based on the context, it looks like it is converting .scss to a .css? I have similar reservations for the current markdownify method, because it does not output a markdown string but rather markdown converted to HTML.
So.. given we we have a transform library, would transform.toCSS be a better name. I know that name is yet hypothetical, but I thought of commenting before it gets baked in like markdownify. :)

.Digest and .Fingerprint

<link rel="stylesheet" href="{{ $css.RelPermalink }}" integrity="{{ $css.Digest | base64Encode }}">

Becomes
<link rel="stylesheet" href="main-88d4266fd4e6338d13b845fcf289579d209c897823b9217da3e161936f031589.css" integrity="ODhkNDI2NmZkNGU2MzM4ZDEzYjg0NWZjZjI4OTU3OWQyMDljODk3ODIzYjkyMTdkYTNlMTYxOTM2ZjAzMTU4OQ==">

That is the main use case of .Digest and .Fingerprint.
But I think it is best to focus on the concept here and not dig into the details of the "proof of concept". The "sassify" is just added to give some context, but I see that it can be confusing if you don't see the bigger picture.

I really like this. 🥇
The initial title seemed to only add current Page Resources package to the .Site context. Now it seems this issue has broaden to adding a template function which allows to pipe resource operation/methods on a resource.
I guess the resource function will be available to both static dir resources AND page bundle resources (as it was the initial direction of this issue), yet, it only take one parameter: a relative path.
Will the function first look for this path in the page bundle or the static dir ? Or is this reserved to the static dir ?
So will this first look for a file in the page bundle, and if not found, keep looking in the static dir ?

Out of scope in this topic, but with a little imagination one could envision: $css :=  resource "main.scss" | resource.Sassify | resource.Digest | resource.Fingerprint

Out of scope and yet, it's all I can think about... Being able to build your site without a build tool (and its dependencies), would make Hugo quiet a unique static gen. This would mean theme dev would not have to deal with a compiled css file ever. So wouldn't theme users... I would gladly fallback on whatever css/js preprocessor library is built in with Hugo (one per language would be enough I think) in order to benefit from this enhancement.

Now it seems this issue has broaden to adding a template function which allows to pipe resource operation/methods on a resource (from Page Bundle or static dir).

The resource func concept is the same as before I changed the title. I just changed it from a method to a function. That func is just relevant for non-bundled resources (ad-hoc resources, as I would call it; static resources maybe. I will certainly look in /static (both project and theme)).

Out of scope and yet, it's all I can think about...

$css := resource "main.scss" | resource.Sassify | resource.Minify | resource.Digest | resource.Fingerprint

This PR will at least add the building blocks to get there. I see lots of Hugo sites with fairly complex Gulp/Grunt setups just to do the above. So it is a tempting setup.

$css := resource "main.scss" | resource.Sassify | resource.Minify | resource.Digest | resource.Fingerprint

This syntax seems very verbose. The Sassify and Minify syntax makes sense, but needing an additional 2 function calls to process the SRI data feels unnecessary?

The Sassify and Minify syntax makes sense, but needing an additional 2 function calls to process the SRI data feels unnecessary?

It would be good if you could provide an improved alternative.
My thought here is to have small and decoupled funcs doing one thing. Use what you want.
I could do
$css := resource "main.scss"  | resource.Sassify true true true true

But that would loose lots of flexibility and is hardly easy to read.

I was thinking something more along the lines of:
$css := resource "main.scss"  | resource.Sassify

<link rel="stylesheet" href="{{ $css.RelPermalink }}" integrity="{{ $css.Digest | base64Encode }}">

ie that the .Digest etc properties are always accessible, perhaps without actually computing them until necessary

ie that the .Digest etc properties are always accessible, perhaps without actually computing them until necessary

Which works great for type-specific properties ($image.Width), but for cross-cutting resource functions (digest) I see now way to get what you want without adding God-like classes and interfaces with hard-to understand lazy loading. I suspect this will be more obvious with more exotic "resource filters" that only some would want to use in some cases. But if you have a clean way of implementing this, I'm open ears.

I would disagree with only one thing that @regisphilibert said: "[These changes] would make Hugo quiet a unique static gen." I see these changes more as bringing Hugo in line with Jekyll, which already has a reasonably robust static asset story via plugins (though using the asset pipeline involves a big performance hit). Everything else you say is spot on.
Something I do like about Jekyll (though I now avoid using it) is that you can run jekyll serve without needing to run a parallel Webpack/Gulp/whatever JavaScript Frankenstack. One of the barriers to Hugo adoption that I've encountered in the real world is that people are skittish about such Frankenstacks and requiring developers to install a multi-lingual tool chain "just to build a website." If Hugo provides even a basic resource pipeline like this, the current "hard sell" that I've had to make instantly becomes a no-brainer.
I do see a potential risk of feature bloat, with some users wanting Hugo to fully supplant the entirety of their complex front-end setup. But on the other hand, my experience suggests that a small handful of processing functions—Sass/Less to CSS, sourcemaps, JavaScript uglification—could cover a huge chunk of use cases.
In terms of interface, I have no objections to the basic approach presented at the beginning of the thread. I'm fine with the verbosity if it means more transparency.

So bringing this back to where it all began :) (for me at least)
Would this be possible:
{{ $img := resource "header.jpg" | resource.Resize "700x" }}
<header>
    <img src="{{ $img.RelPermalink }}" alt="">
</header>

@lucperkins I did not want to derail the issue thread. Can't wait to discuss it with you when moving closer to this though.

I see these changes more as bringing Hugo in line with Jekyll

There is, of course, the speed, which may bring us slightly ahead.

I do see a potential risk of feature bloat, with some users wanting

This limits itself nautrally I think.

SASS only
Minify
Digest
Fingerprint

Which cover lots of use cases.

{{ $img := resource "header.jpg" | resource.Resize "700x" }}

You would have to do this:
{{ $img := (resource "header.jpg").Resize "700x" }}


⚠ Bofrost.de has degraded performance

In 6914b77, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1723 ms

Resolved: Bofrost.de performance has improved in c96d2fe after 13 minutes.


Update platformio.md

Added support for video

Relates to https://github.com/prebid/Prebid.js/pull/2318

Hi @varashellov, could you also update the table on dev-docs/bidders.md to note you now support video?  This PR should be good with this additional change.  Thanks

@jsnellbaker
Updated https://github.com/prebid/prebid.github.io/pull/690


Create an Update button on the settings page

If you haven’t already, check out our contributing guidelines for onboarding!

Platform - version:
Web/Desktop - v1.0.1-454
Action Performed (reproducible steps):

In Expensify/Expensify.cash#1318 we updated the desktop update paradigm. When an update is available, a notification appears (as before). Except now, clicking on the notification opens the UpdateAppModal, which updates and restarts the app.
However, if the user has notifications disabled, they will never see the update notification and have no way to update the app

Expected Result:

We need users to be able to update, even if they have notifications disabled. On desktop, when an update is available, we need to create an Update button in the settings page to install the update and restart the application, just like the UpdateAppModal does.

https://www.upwork.com/jobs/~016781e062ce860b84

@bfitzexpensify is there a mockup for where this button will live?

Good question, I asked @roryabraham a little while ago but think he's having lunch — Rory, do we have a mockup somewhere or does one need to be created?

Yeah, Correct. A mock-up would be good to submit a complete proposal. But as start the Main concept would be as follows:
Proposal

Create the button on the Settings page as per the mockups.
To show the button when the update is available, we will listen to the following Onyx Key.

export default withOnyx({
    version: {
        key: ONYXKEYS.UPDATE_VERSION,
        initWithStoredValues: false,
    },
});

On Press of the Button we have to send a message to the main Process using the

ipcRenderer.sendSync('start-update', props.version);

Which will start the Update process as it does for closing or submitting the UpdateAppModal.

Are you looking for the Web platform update as well?

Nope, sorry for the confusion. This is desktop-only.

To show the button when the update is available, we will listen to the following Onyx Key

That actually won't work because that Onyx key is only set when the update notification is pressed here, but the whole point of adding the button in the settings menu is that it's possible to disable notifications entirely for the desktop client, and if you did that you would then have no way of updating it.

Ah sorry, Didn't see this part. So if this is the case. Then We can do is set the key on Onyx if the user has not given the notification permission. Something Like.
  pushUpdateAvailableNotification({version}) {
        push({
            title: 'Update available',
            body: 'A new version of Expensify.cash is available!',
            delay: 0,
            onClick: () => {
                Onyx.merge(ONYXKEYS.UPDATE_VERSION, version);
            },
        }).then(((notification) => {
        if(!notification){

        Onyx.merge(ONYXKEYS.UPDATE_VERSION, version);
        }
        });
    },

updating the push method according. or if throwing the error is not an option.
I see listening on the  ipcRenderer.on('update-downloaded') ; would be a repetitive step. As we again need to check the user notification permission and then Set the Onyx Key.

In order to solve this problem it will be necessary to put in place the update button of the application and define its appearance on two conditions to know according to the platform and the availability of update. So once the update is available it will be displayed.


Broken links in CB-Spider v0.9.6 release

https://github.com/cloud-barista/cb-spider/releases/tag/v0.9.6

@yunkon-kim

Thanks for reporting!
Fixed it.


openfl with royale compiler to port AS games to JS

Hello guys,
I was AS developer for a long time and since the browsers dropped flash support in 2020, I had many games left to die.
But thanks to the Royale SDK and ASJS compiler it is kind of possible to revive some old games.
I took the ambitious path of restoring 2 of my old games by "compiling" the AS directly to JS without rewriting the entire codebase to Haxe (that was my goal).
I've seen that openfl has npm package so the npm openfl + royale asjs compiler produces html5 JS output..but so many things weren't working and required rewriting.
MovieClip loading from Animate(Flash) fla/swf file wasn't supported in the last npm version 8.9.6...so I decided to extend the OpenFL JS library to include this.
I took the JS source from the Haxe OpenFL JS and migrated swf_exporters_animate_AnimateLibrary related code  to the npm version of OpenFL.
Now is possible to load swf (after openfl process command) and I also added dynamic MovieClip access (movie.child.subChild..) and basic timeline functionality to auto stop when 'stop' label is shown.
I also fixed one mp3 audioplay bug (some mp3 file were not playing because of that bug).
Now I finally have my 2 games ported to JS, but there are still things that are not working (hitTest methods are always returning false).
Here is my repository with ready to run demo project: @flashmandv/openfl-royale
Starling is also fully working (but FeathersUI is not). I could use the GreenSock library by making gsap.as dummy file and it was all working in the JS output. WebSockets work as well.
Any help is welcome. Ideally some of my fixes would be good to be added to a new version of the npm openfl library.

Cheers

Thank you @joshtynjala , that is super helpful. I remember when trying to make feathersui to work it had compile errors about gettters and setters not properly overriding DisplayObject. I guess this will fix it and feathers ui may work.
Do you have any suggestion about the hitTest method? I tried to debug it and I got to the point where bitmap data is compared with low level bit shift checks to the matrix..but It is super confusing to debug.
For instance, hitTest between point and BitmapData comes down to lime.graphics.ImageDataUtil.getPixel32 function..which is always returning false (0).
I assume the code itself is working but maybe there is some incompatibility between the format (bitrate) of the exported from flash bitmap data and the one the JS code expects...I don't know.

Do you have any suggestion about the hitTest method?

Sorry. No idea.

Maybe regarding this I have to ask jgranick


Too many http requests

Looks like vegas needlessly creates 1 http requests for the current html page every time it changes the image. This doesn't make sense as there's nothign new to fetch in the html page. Anyway to get rid of that? Open up fiddler and you'll see a massive # of requests.

Thanks for feedbacks.
I will try to work on it, but no time currently sorry.
Tested Pull Request is welcome.

Yeah this issue is messing with my captcha feature on my website.
Tried to replace all the .get(0) by [0] in the code (why not :D) but its still the same.
I really don't see where this GET request comes from but it's definitely there!

Got it, problem was with image loader. Replace the $images.bind('load error', ... function with the following... to the following
    $images.bind( 'load error',  imgLoaded ).each( function() {
      // cached images don't fire load sometimes, so we reset src.
      if (this.src!='' && (this.complete || this.complete === undefined)){
        var src = this.src;
        // webkit hack from http://groups.google.com/group/jquery-dev/browse_thread/thread/eee6ab7b2da50e1f
        // data uri bypasses webkit log warning (thx doug jones)
        this.src = blank;
        this.src = src;
        console.log('source: ' + src) ;
      }
    });


cliccl: add load show backups to display backup collection

PR: https://github.com/cockroachdb/cockroach/pull/61862
From release notes:

Updated load show with incremental subcommand to display incremental backups. Users can list incremental backup paths of a full backup by running cockroach load show incremental <backup_url>. [#61862][#61862]

Closing as this is a duplicate of #11494


Snack Bar Actions Not Being Displayed

What are you trying to do?
Display a snackBar with an action
What troubleshooting steps have you tried?
The action button is not displayed, and upon inspection of the html I discovered the text color is the same as the snackBar background. I am unable to change either color as the panelClass property seems to be ignored.
Reproduction
https://stackblitz.com/edit/components-issue-o2hjx6
Steps to reproduce:

Try to open a snackBar with an action text
See that the text for the action does not display

Environment

Angular: 8.3.0
CDK/Material: 8.2.3
Browser(s): Safari, Chrome, Firefox, Opera, Brave
Operating System (e.g. Windows, macOS, Ubuntu): macOS 10.14.6

The Stackblitz that you linked works for me:

I know it works on stack blitz, it doesn't work in my project though.

@kwright02, it sounds to me like the problem doesn't come from the component itself then. Or at least, not the version you've used in your sample Stackblitz app.
You yourself proved that it works pretty well on a bare project: I have an inkling that it is some styling property in your own, bigger project that is overriding the default one. It is quite hard for us to lend a hand without being able to reproduce the problem you're facing!
The style inspector of your web browser should have the capabilities to tell you exactly where the overriding style comes from; I would start looking there if I were in your position.

So I've done extensive digging through the project, and this is the color property for the action button:
`css
color: rgb(38, 50, 56);
inherit.mat-button,…oked-button	Author Stylesheet
buttontextinput:matche…ton, button	User Agent Stylesheet
initialinput, texta…ect, button	User Agent Stylesheet
#263238.mat-simple-…kbar-action	Author Stylesheet
rgba(255, 255, 255, 0.7).mat-snack-bar-container	Author Stylesheet
white !importantsnack-bar-container	Author Stylesheet
texthtml`
It seems to override my !important css class to make the text white, and rgb(38, 50, 56) seems to be the background color of the snackBar.
Someone has also built a custom theme for the project and that is as follows:
`css
@import '~@angular/material/theming';
@include mat-core();
$messaging-app-primary: mat-palette($mat-green, 900);
$messaging-app-accent: mat-palette($mat-blue-gray, 900);
$messaging-app-warn: mat-palette($mat-red);
$messaging-app-background: mat-palette($mat-grey, A100);
$messaging-app-text: #FFFFFF;
$messaging-app-font: "Source Sans Pro";
$messaging-app-font-family: sans-serif;
$messaging-app-font-size: 20px;
$messaging-app-font-size-heavy: 25px;
$messaging-app-font-weight: 300;
$messaging-app-theme: mat-light-theme($messaging-app-primary, $messaging-app-accent, $messaging-app-warn);
@include angular-material-theme($messaging-app-theme);`
I'm really stumped here

Hey,
I'm not on my computer right now but I'll take a look at it soon.
I really think a Stackblitz reproducing your issue would go a long way,
however.
I think you understand that an ! important rule can't be overridden by a
non-important one, and that is what is puzzling you -- understandably so!
The root of your problem probably lies there -- Angular may use shadow DOMs
for its components. That is configurable! Maybe you could switch to a
different style encapsulation technique an see whether your style still
mysteriously aren't applied.
Alternatively, try putting the style into your main, global stylesheet
instead of that of your component (styles.(s)css probably).
NB: that wouldn't be a proper fix, but getting this to work would mean that
we figured what is going on. I would encourage you to read up on [Angular's
view encapsulation] (https://angular.io/api/core/ViewEncapsulation) if any
of these recommendations does work :)
On Tue, 5 Nov 2019, 8:12 PM kwright02<EMAIL_ADDRESS>wrote:

So I've done extensive digging through the project, and this is the color
property for the action button:
`css
color: rgb(38, 50, 56);
inherit.mat-button,…oked-button Author Stylesheet
buttontextinput:matche…ton, button User Agent Stylesheet
initialinput, texta…ect, button User Agent Stylesheet
#263238.mat-simple-…kbar-action Author Stylesheet
rgba(255, 255, 255, 0.7).mat-snack-bar-container Author Stylesheet
white !importantsnack-bar-container Author Stylesheet
texthtml`
It seems to override my !important css class to make the text white, and
rgb(38, 50, 56) seems to be the background color of the snackBar.
Someone has also built a custom theme for the project and that is as
follows:
`css
@import https://github.com/import '~@angular/material/theming';
@include https://github.com/include mat-core();
$messaging-app-primary: mat-palette($mat-green, 900);
$messaging-app-accent: mat-palette($mat-blue-gray, 900);
$messaging-app-warn: mat-palette($mat-red);
$messaging-app-background: mat-palette($mat-grey, A100);
$messaging-app-text: #FFFFFF;
$messaging-app-font: "Source Sans Pro";
$messaging-app-font-family: sans-serif;
$messaging-app-font-size: 20px;
$messaging-app-font-size-heavy: 25px;
$messaging-app-font-weight: 300;
$messaging-app-theme: mat-light-theme($messaging-app-primary,
$messaging-app-accent, $messaging-app-warn);
@include https://github.com/include
angular-material-theme($messaging-app-theme);`
I'm really stumped here
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/angular/components/issues/17553?email_source=notifications&email_token=ABUBVEKJOSXCF7DRIIEOWN3QSHATFA5CNFSM4JHLC7Q2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDD7DWI#issuecomment-549974489,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABUBVEMZBWV2DTIUW4ORKT3QSHATFANCNFSM4JHLC7QQ
.

We don't use !important for the color of the snackbar action buttons. This looks like an issue specific to your project. Most likely related to custom styling in your project.
Closing as there is no issue we can see on our end. If you think there is one, please help us providing a reproduction that we can look at.


Should deprecated stuff be available?

Currently this crate doesn't make available deprecated items in polyfilled mode. This includes:

The compare_and_swap method on all atomic types
The ATOMIC_XX_INIT consts
The spin_loop_hint function

To me this doesn't seem a big deal because if you're migrating some code from core::sync::atomic to atomic_polyfill you're already doing modifications,
OTOH it might be annoying to have code that compiles in non-polyfilled mode and fails in polyfilled mode. If we aim to be a complete drop-in replacement maybe deprecated items should be available too...
Thoughts?

Could put it behind an allow_deprecated cargo feature that's off by default, if you really wanna encourage people to move away from the old stuff by default.

These have been missing for a while and no one has complained, so I guess the answer is "no, they're not available" :)


self as property name leads to assignment error

When a property with the name self exists in a class, it leads to
a runtime error.
See this definition
class AwsDefaultSecurityGroupPropsIngressProps():
    def __init__(self, *, self: bool):
        """
        :param self: -
        """
        self._values = {
            'self': self,
        }

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Thanks for this contribution!
This is currently missing a test that demonstrates the issue is fixed.

This is currently missing a test that demonstrates the issue is fixed.

Could you point me to a similar test?

I think right now this will cause a warning to be emitted, but it will not fix code generation so the name is correctly slugified.

Yes, I think so too. What would be the correct way to slugify this?

AWS CodeBuild CI Report

CodeBuild project: AutoBuildProject6AEA49D1-Blkkw9bQFn8A
Commit ID: d8503b24e71a95ca561226a50f17ea7bf868f334
Result: FAILED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

With respects to the slugification, there appears to be a duplicated reserved words list in jsii-pacmak that fails to include self (bonus points if you find a way to de-duplicate, but I'm cool if you don't want to bother with that, too):
https://github.com/aws/jsii/blob/1ff25571a08652c59b23d6a2938dd3f426cd2665/packages/jsii-pacmak/lib/targets/python.ts#L71-L76

With respects to the tests... This is going to involve:

Adding stuff in jsii-calc to reproduce the issue you've identified:
https://github.com/aws/jsii/blob/1ff25571a08652c59b23d6a2938dd3f426cd2665/packages/jsii-calc/lib/compliance.ts#L896-L961
Adding a new test in the Python runtime's test suite that "runs into the bug" (which would pass with the fix in, so you know you've nailed it for good!)
https://github.com/aws/jsii/blob/1ff25571a08652c59b23d6a2938dd3f426cd2665/packages/%40jsii/python-runtime/tests/test_compliance.py#L1168-L1170

In any case - we'll happily provide help if you don't know how to proceed!

Reading up a bit, it appears that self is technically not a keyword in Python, so we're abusing a little here if we add it to the PYTHON_KEYWORDS list in jsii-pacmak (it's actually "fine" to have a warning about it in jsii, still).
I reckon the real fix is going to possibly be with code-generation of instance methods in jsii-pacmak (the targets/python.ts file is where it's at).
I can let you have a look here and see if you find your way around what needs to change... And then I can have a look, too, if you get nowhere or can't afford to spend that kind of time on this :)

Cool, thanks for providing me the context. I'll take a look at it.

I have improved the solution here, but realized the current Submodules feature of jsii generates invalid Python code for the test I would like to introduce (making it impossible to load).
This would need fixing before the compliance test can be added, however we could ship as-is since the original bug is likely addressed. I'd still kind of prefer being able to add the next test however (because I'm not sure the instance property/method name conflict results in code that'll behave as intended).

AWS CodeBuild CI Report

CodeBuild project: AutoBuildProject6AEA49D1-Blkkw9bQFn8A
Commit ID: 50e3f845bbf0f63c054eaec25868305d2b13069f
Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: AutoBuildProject6AEA49D1-Blkkw9bQFn8A
Commit ID: 098c0bb795d1adfb8dba93c6284409716ff7b1a5
Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: AutoBuildProject6AEA49D1-Blkkw9bQFn8A
Commit ID: cbff2d18da236eff2cef79fe555674389354b2e4
Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: AutoBuildProject6AEA49D1-Blkkw9bQFn8A
Commit ID: b686c68bd98f110904aa4b755041ba2deadba575
Result: FAILED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: AutoBuildProject6AEA49D1-Blkkw9bQFn8A
Commit ID: c3935cb01cf5b3bafb9070f1960d2e12815f9f98
Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository


[INJIMOB-2277] Handle VC expiration

Reference - https://github.com/mosip/inji-wallet/pull/1679

Holding for release as its not testable right now