Plugins/internals

Summary

port Plugins internals wiki page
update content for ConstPlugin ideally Fixes #2275
reformat and refactor some of the MD
do small rewording where possible (there are still places where we could make this great, but it can take too long within this single PR so i leave it as is and concentrate on ConstPlugin)

Post deploy steps
Remove content from  Plugins internals wiki page and add a link to https://webpack.js.org/plugins/internal-plugins/

Hmm probably i need to rephrase this, i suspect that import and dead if () {} gets removed by uglify @Legends

@Legends i did update texts according to @ooflorent 's comments, looks good to me but wanted a double check

I have only one question left:
ConstPlugin does only evaluation of expressions in if statements and the pruning logic is done, depending on the case, by UglifyJS or some other internal webpack logic !?
I am bit irritated by the title of the existing issue:

ConstPlugin should remove dead branches in LogicalExpressions

Yes at least this is what i understand from @ooflorent 's comment, also looking at plugin source code i dont see dead branch elimination

Ok, lets keep it that way. If @ooflorent has any further comments on this, I am sure he will provide additional input if necessary.

@Legends
ConstPlugin does only evaluation of expressions in if statements and the pruning logic is done, depending on the case, by UglifyJS or some other internal webpack logic !?

The plugin handles pruning of if statements and ternaries using hooks fired by the parser.

ConstPlugin should remove dead branches in LogicalExpressions

This issue has been created because the Parser does not have a hook prune LogicalExpression nodes.

@EugeneHlushko
also looking at plugin source code i dont see dead branch elimination

https://github.com/webpack/webpack/blob/b06cca2371c3da0ede7866d33bb304a132072919/lib/ConstPlugin.js#L173-L184
https://github.com/webpack/webpack/blob/b06cca2371c3da0ede7866d33bb304a132072919/lib/ConstPlugin.js#L211-L219

thought it only replaces conditions, thanks again @ooflorent @Legends
Now ConstPlugin section mentions both if statements and ternaries. Also pointed that dead branch elimination happens further down the line using hooks fired by the parser.
This is now ready for review @montogeek

What is this syntax? webpack_foo###

@montogeek applied fixes, seems webpack_smth### was from corrupt copy paste buffer

@EugeneHlushko
If you have time, or we do it in another PR:
The categories and the category entries look the same, at first glance you cannot differentiate between them. They all have the same format and indentation. The only difference is categories start with a lowercase letter.

Expandable sections with category entries, to not iterate over the whole document, this would be nice too.

@EugeneHlushko should we put the additions into another PR?

I dont think we have this in the sidebar currently? if not lets move out @Legends @montogeek

@EugeneHlushko @Legends means in the content itself, we could do it later on rebuild branch :)

got ya, still think we dont have it implemented, lets create an issue describing feature request, can you please @Legends ?

What I meant with sidebar is the following:

"Plugins" category is expanded, below that we could put another "Internal Plugins" category, which is closed initially but expands on click showing it's subcategories like environment, compiler ....

Yeah its a sidebar indeed, but the thing is the first level categories are separate pages (sections) and inside of them are the headings from MD. So in order to get these internals in such view would mean splitting them into different md files by categories, naming file titles according to categories and also to make it aligned well create whole different section for them e.g. /internals/${page}. As i said its not in scope here sorry :/

@EugeneHlushko I will be off for the next 10 days.
Thanks for all the work done!
Of course the above would be another PR.  We'll see ....

Thanks!


Add Jaloompa advice to Advice.txt

Thanks so much for your contribution to Tiny Troves of Dev Wisdom. 😄
The current game build  will be updated frequently throughout Hacktoberfest 2023 so check back often to see new contributions!


grabber & filter fixes

Filter: do not filter empty content:
The DOMXpath() in PicoFeed\Filter\Tag->removeBlacklistedTags( ) throws a fatal error if the feed item content is empty. XmlParser::getDomDocument($data) returns false on empty data, where DOMXpath() expects an instance of DOMDocument as argument.
Grabber: use encoding specified in html content
This one is exposed by the switch to iconv for charset conversion.

@Raydiation any feedback on this is highly welcome.

:+1:

I've changed the "do not filter empty content" commit once more. Looks way more cleaner now and covers a few more corner cases like content items that contain only whitespaces.

Sorry, the close of the miniflux ticket was not intended.

It's not your fault, Github have this behaviour by default.


Bump Base Image from 12.1.0 to 12.6.0

While testing I reciveed a deprecation notice. This bumps to the latest similar Ubuntu version to 12.6.0 https://hub.docker.com/r/nvidia/cuda/tags?page=&page_size=&ordering=&name=12.6.0-devel-ubuntu20.04
==========
== CUDA ==
==========

CUDA Version 12.1.0

Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.

This container image and its contents are governed by the NVIDIA Deep Learning Container License.
By pulling and using the container, you accept the terms and conditions of this license:
https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license

A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience.

*************************
** DEPRECATION NOTICE! **
*************************
THIS IMAGE IS DEPRECATED and is scheduled for DELETION.
    https://gitlab.com/nvidia/container-images/cuda/blob/master/doc/support-policy.md

To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

LGTM!


gateway process analysis

gateway process analysis

add English document
put the picture in the static resource directory

add English document
put the picture in the static resource directory

processed

This pr has not been active for a long time, I will turn it off first. If you need to, you can re-open it.


[storage] state in swagger which values you want as constant

With latest modelerfour, single value enums now no longer default to constants. Should go through the storage swaggers and clearly state which ones we still want to be constants by adding "x-ms-enum": {"modelAsString": false} to these definitions

I see it supposed not what's the next step off here !!!?


Masylum updated tests to libp2p swarm

Following https://github.com/diasdavid/node-libp2p-kad-routing/pull/4
Sorry if it came out of the blue, I had started a issue on libp2p-swarm to discuss the revisit and added to my sprint this week. Ref: https://github.com/diasdavid/node-libp2p-swarm/issues/8
I was unable to run the compliance tests with your PR, so I updated it and added Spdy and Identify to the mix.
// for the record
» npm run compliance

><EMAIL_ADDRESS>compliance /Users/david/Documents/code/ipfs/libp2p/node/peer-routing/libp2p-kad-routing
> node tests/compliance.js

TAP version 13
# Simple findPeers test
ok 1 null
/Users/david/Documents/code/ipfs/libp2p/node/peer-routing/libp2p-kad-routing/node_modules/libp2p-swarm/src/swarm.js:66
      callback()
      ^

TypeError: callback is not a function
    at Server.ready (/Users/david/Documents/code/ipfs/libp2p/node/peer-routing/libp2p-kad-routing/node_modules/libp2p-swarm/src/swarm.js:66:7)
...

Now tests pass:
» npm run compliance

><EMAIL_ADDRESS>compliance /Users/david/Documents/code/ipfs/libp2p/node/peer-routing/libp2p-kad-routing
> node tests/compliance.js

TAP version 13
# Simple findPeers test
ok 1 null
ok 2 null
ok 3 should be equal
# time: 145 ms

But still has the same bug described on https://github.com/diasdavid/node-libp2p-kad-routing/issues/2.
What happens is that because it gets crazy hard to close gracefully all the streams opened with all the wrapping involved by doing multistream handshakes and upgrades to stream muxer, it is easy to miss some of the parts to close so that the whole thing can end.
Thank you for helping looking into this :)

In my machine the bug was fixed by this: https://github.com/diasdavid/abstract-peer-routing/pull/1
Teardown is not being called which means that since we don't close the connections we keep, somehow, adding events to the event loop therefore never reaching the end. I wonder what is responsible for that.

@masylum closing a listener only occurs when all the streams on top of that listener are close, since we have spdy on top of it, spdy only closes when all its muxed streams are closed. It should work, but I'm missing something :( It will be solved by adding more coverage and edge case tests I'm sure, all help is welcomed :)


How to overlapping_submaps_trimmer_2d

Hello!
I am trying to use the submap trimmer functionality to remap parts of the map.
I added to the trajectory_builder.lua the following code as specified here and here #1534

overlapping_submaps_trimmer_2d = {
fresh_submaps_count = 2,
min_covered_area = 2,
min_added_submaps_count = 5,
},

However, as soon as I start the cartographer_node I get the following error:
[FATAL] [/cartographer_node] [2021-03-02 16:20:44]: F0302 17:20:44.000000 2345413 lua_parameter_dictionary.cc:410] Check failed: 1 == reference_counts_.count(key) (1 vs. 0) Key 'overlapping_submaps_trimmer_2d' was used the wrong number of times.
And then it dies. Do I need to setup something else first?
Thanks for the help!

Solved it, the overlapping submaps trimmer was moved to the PoseGraphOptions #1408. So instead of adding the options in trajectory_builder.lua, they should be added to pose_graph.lua. That means that the suggestion in  #1534  is misleading.