[Plugin] Implement my own backend plugin

Hi, I would like to hook up my own backend database to Backstage's frontend UI. From what I can see now, the catalog model is tightly coupled with the existing database model, and I'm not sure how creating a plugin for my backend database would work in the existing framework. Is there documentation that explains how to do this?
Thanks!

Hi! What data is it that you want to present?

I'd like to be able to list and display API specs which the existing backend implementation does really well. I'd just like the ability to use my own backend (e.g. CosmosDB) if that's possible.

OK! I'll unfortunately have to get back to you about this next week, I've left for the day. But let's talk more!

Sounds good, thanks!

Hey @freben, any information on how I can do this?

Sorry, I have been swamped recently.
You say that the current backend implementation displays API specs, would you mind elaborating on what that means? I am a bit unclear on what you have and where you want to go with it.
However, you also say that you want to back it with CosmosDB. The backend plugins that come out of the box are written using Knex. It does not list CosmosDB as a supported database, but I am not familiar with the capabilities of CosmosDB to say whether that poses a problem or not.
However if you make some NEW plugin to the backend, there's nothing stopping you from making that plugin talk to any technology that has a functioning js driver.

Thanks!
I mentioned CosmosDB as an example of a backend datastore, but I think my real question is around having Backstage call into our backend API instead of calling into the catalog-backend plugin and following the processor/yaml model that's currently defined. And like you mentioned, I think I could definitely create a new plugin to do this - was just curious if there's documentation or list of integration requirements I could use for reference?

Ah - yes you may replace the entire catalog backend implementation even though it's not a recommended path at this point - you can make the frontend plugin make requests to [a different endpoint]https://github.com/spotify/backstage/blob/master/packages/app/src/apis.ts#L157), including one that you happen to be proxying to your very own API.
However, your API of course has to conform to the built in catalog API exactly, and that can be a moving target particularly in these alpha times. What you may want to do is to build an ingestion from that third party system into our catalog, or build a backend plugin that exposes the catalog API but does requests to your service and does payload translation on the fly. It kind of depends on what the use case is, how fast your service is at responding to interactive queries, and how much they differ semantically.

Can you describe your existing catalog a bit? Is it written entirely in-house or is it a product of some sort?

I may be wrong but they way I understand the question, you don’t really want to replace the catalog but just call out to a backend that exposes and API for your plugin?
If that’s correct then there is not reason to go through the catalog at all.

Thanks for the responses!
@freben, since the defined catalog model is a moving target like you said, we'd like to be able to either completely sidestep it or replace it with our own model. I think @stefanalund correctly stated that we just want to be able to make calls to a backend that exposes an API for our plugin...but I don't see how to do that without using the catalog model (which requires a locationURL, component yaml, etc.). Is there a straightforward way to use a different model, say something written in-house that isn't location based? Which plugins/parts of the code would we need to change?

Ok!
So, for starters, a frontend plugin will always be at liberty to do essentially anything it wants. At one extreme end of the scale, you could always make a plugin that has absolutely no relation to the catalog or anything else, but instead just issues fetch queries to your existing backend and renders the results. We have a lot of plugins internally that do things like that. You may or may not choose to use our backend and proxy facilities to do so, it's all essentially optional.
However the cost of that, if it's catalog related  data, is that it will tend to be a bit of an isolated island of functionality. OTHER parts of the ecosystem may rely on the existence of a catalog - and the shape of the entities is part of that API contract. For example, the scaffolder may want to access template data stored in the catalog, and it needs to understand the data format to do so.
This may or may not be perfectly fine, depending on your needs and plans for how you intend to use Backstage. You can write features any way you please, but to unlock the full power of the integrations and of the rapidly growing ecosystem of plugins, they need to have a common language between each other.
Maybe we can help you find a path for getting your entity data into our catalog form?

Got it, thank you for that explanation. At the moment, my team is still in the investigation phase and we don't yet have a concrete design for our entity model. The options you described, however, make a lot of sense and give us a place to start. I will let you know if I have more questions as we move forward. Thank you!

Ok! Closing this for now then.


hstream-server: refactor streamingFetch handler

PR Description
Type of change

[x] Breaking change

Summary of the change and which issue is fixed
Main changes:
refactor streamingFetch handler.
Basic idea:

the client will send a streamingFetchRequest RPC for every subscription key, which means the fetch process for each key is independent of each other, and the associated state exists only in memory. If the fetch thread is destroyed, the associated state also should be destroyed. So we can use a thread local variable to keep the state associated with each key. This way, we can avoid lock/unlock everywhere and stay simple when cleaning up resources.
for each fetch process, separate slow IO operations to be executed in a sub-thread, put all operations involving state modification into the main thread for serial execution. using channels to gather different events send from sub-thread so that we can avoid using lock explicit.

currently, we have these events:

ACKTIMEOUT: which will trigger a retransmission
ACK: received acks from client
DATAREADY: get records from hstore and notify server to send to client
STOP: stop the whole fetch process

also it's easy to add/remove an event if needed and make the program easy to scalable.

Checklist

I have run format.sh under script
I have commented my code, particularly in hard-to-understand areas
New and existing unit tests pass locally with my changes

I think this pr can be reviewed now, although in my local machine, some of the java-client tests will fail.
The reasons for failure may be:

the client cannot distinguish between scenarios where the key is different but the RecordId is the same;
the watcher thread is not closed in time when the client is closed, the server is still pushing data to the closed client and the subsequent watcher threads will get stuck and cause the test to fail;
some test cases will fail occasionally (the reason is unknown).

Anyway, the main logic of the function should be correct, so I think we can review it first, and in the meantime, I will try to locate the specific cause of the above errors.


[ConstraintSolver] When searching for viable bindings treat `DynamicT…

…ypeOf` constraint specially
When trying to find bindings let's avoid type variables which
represent left-hand side of the DynamicTypeOf constraint,
because such type variables might be (implicitly) convertible to
[existential] metatype, but at the same time bound to something else
(e.g. Any), which fails when solver tries to simplify DynamicTypeOf
constraint itself.

@swift-ci please test

@swift-ci please test source compatibility

@swift-ci please smoke test

@swift-ci please smoke test

@swift-ci please test source compatibility

Build failed
Swift Test Linux Platform
Git Sha - 3c37c89e3aae19273b3fe81a691a0831594ae33b

@swift-ci please smoke test

@swift-ci please smoke test

@rudkx Thanks! I'll run source compatibility just in case before merging...

@swift-ci please test source compatibility

@swift-ci please test source compatibility


'Expected the file "Rewired_Core.dll"' error on Windows 10.

I downloaded TLD v1.56 to try some old mods, but the Modloader throws the above error. It's basically the same issue as the Mac user has in one of the other threads, but then it can't be, since I am on Windows. Any ideas?

Downloaded version appeared to be v1.56, but is really v1.8. Thanks for pointing it out. Will post update if and when it is solved.

When downloading the old version, I used DepotDownloader instead of using the Steam Console. For some reason the Console grabbed the wrong game version. Using DepotDownloader to grab the old manifest instead of using the Steam Console does the trick. I followed Verulean's guide on how to get it done, linked here: youtube.com/watch?v=44HBxzC_RTg
When you get to the cmd command, copy/paste the following string to download v1.56 of TLD:
dotnet DepotDownloader.dll -app 305620 -depot 305621 -manifest<PHONE_NUMBER>168775351 -username  -password
Game version is now v1.56 and ModLoader should work fine.


Replace async-std with smol crates

It would be nice to be able to use this in environments where I use
smol. However this crate imports the async-std crate for I/O. This
commit partially replaces async-std with the equivalent combinators from
futures-lite and async-io, two smol crates that async-std depends on
anyways.
The task spawn is still left in, as replacing it will be controversial. Thus far I've just replaced it with async-global-executor, which is what async-std uses anyways. This is a placeholder until we can discuss what the best way of not using a global executor is.

@joshtriplett Are you the primary maintainer of this crate? If so, can you review this?

"primary maintainer" no, but I'm one of the maintainers.
Reducing dependencies seems reasonable to me. That will let more things build in parallel, and as you said, allow using this in environments that don't need all of the dependencies.

Thanks for merging!

"primary maintainer" no, but I'm one of the maintainers.

Hmm, is there someone better I should request reviews from in the future?

Async-h1, along with the other http-rs crates, is not actively maintained


Create a consumer group with initial offset earliest

Is there a way to specify that when you "start a new consumer group", it's offset will be the earliest?
CC @dim

Found it, the way to configure this is by setting cfg.Consumer.Offsets.Initial = sarama.OffsetOldest


Create View for creating musig addresses in multisig-toolkit

Description
Add a tab to the multisig-toolkit for creating Sui MultiSig Addresses 'on-the-fly' ✈
Ref #12932
Test Plan

Get PubKeys!

  AB3VXSdvFq6ym0ulqnVNuEI9xxI5b8RY21azMU6ybWp1
  ADue3nTTYz9pE75pMKEnnLIrcTSS/c0uwr6WEU5nz4RM
  AIPVXOb2rbm8dX0LBL4PEgN4HPQDpwUIHpIy2THr/it1

run locally pnpm run dev
goto localhost:5173/multisig-address
add pubkeys and weights
create!

If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process.
Type of Change (Check all that apply)

[ ] protocol change
[ ] user-visible impact
[ ] breaking change for a client SDKs
[ ] breaking change for FNs (FN binary must upgrade)
[ ] breaking change for validators or node operators (must upgrade binaries)
[ ] breaking change for on-chain data layout
[ ] necessitate either a data wipe or data migration

Release notes

Current Progress:

can input N pubkeys + weights 💪
hardcoded threshold 🙀
output is currently to console 📜

Current Progress (pairing with @georgedigkas )

Current Status


merge media queries

Should we add a media query merge tool to group together styles that are under the same media query?
e.g:
.foo {
  width: 240px;
}

@media screen and (min-width: 768px) {
  .foo {
    width: 576px;
  }
}

.bar {
  width: 160px;
}

@media screen and (min-width: 768px) {
  .bar {
    width: 384px;
  }
}

would result to:
.foo {
  width: 240px;
}

.bar {
  width: 160px;
}

@media screen and (min-width: 768px) {
  .foo {
    width: 576px;
  }
  .bar {
    width: 384px;
  }
}

I know about the mqpacker

Would be nice to have results from some real projects. Please, test it on 2 or 3 current projects. Test the size and also problem with specificity (order).

How do you think it would work if we do something like:
.foo {
    position: relative;
    margin-top: 10px;

    @media screen and (max-width: 500px) {
        margin-top: 5px;
    }

@kettanaito I don't really see the issue with that media query. Regarding this plugin, it just takes duplicate media queries and merge them to single one, so this would just create another media query group, and if more selectors would have it, they would be merged together under one media query. But as I tested now, if you are using a default bootstrap 4 mixin you end up with @media (min-width: 768px), if you write another one like @media screen and (min-width: 768px) with screen it would create a new media query. So maybe we should agree on which one to use.
But as Honza said, maybe there could be some specificity issues. I'm gonna test it on Walmark, but I think we also had it on metro core project and we didn't have any problems.

I don’t think we need that from the performance perspective, see https://helloanselm.com/2014/web-performance-one-or-thousand-media-queries/
Regarding the filesize, we should try it on a large project (maybe zindulka) and compare gzipped results. I belive gzip will almost strip the difference but let’s see…

Exactly, do not forgot to gzip.

I'm closing this issue as I see it's not valid so much


It is not working

Description

Instagram-Pofile
I try to create a clone like this and I take the help of your code but when I run the code it is not showing profile and it always shows no profile when you put the right profile also.
Maybe Instagram has changed her police for showing profile it is asking for login when you open any profile .so can anybody help me regarding this.
And also I am a new coder and Learning from those greater Projects. These projects help me quite a lot so that for all creator that has contributed to this project

hello manishdaga,
i would like to make the following enhancements to the project.
Enhancement 1:  I will capture the same video and will send to AWS kinesis
Enhancement 2:  We will be able to fetch the captured video from AWS into our own application
Enhancement 3: This AWS service will be able to be stored in other ML applications such as image recognition and/or prediction application
Do let me know about it, hoping to hear more from you. Cheers!

hello manishdaga,
i would like to make the following enhancements to the project.
Enhancement 1: I will capture the same video and will send to AWS kinesis
Enhancement 2: We will be able to fetch the captured video from AWS into our own application
Enhancement 3: This AWS service will be able to be stored in other ML applications such as image recognition and/or prediction application
Do let me know about it, hoping to hear more from you. Cheers!

Thanks for replay I never use aws before


HDDS-8971. Example integration with Iceberg and Trino

What changes were proposed in this pull request?
Create add-on for ozone docker-compose environment to demonstrate integration with Iceberg and Trino.
https://issues.apache.org/jira/browse/HDDS-8971
How was this patch tested?
Added test script to verify the setup:

create S3 bucket in Ozone
create table and insert data in spark-shell (example taken from Spark and Iceberg Quickstart)
describe table and insert more data in trino
check that data/metadata is stored in Ozone

CI:
https://github.com/adoroszlai/hadoop-ozone/actions/runs/5437385105
(Interesting part begins here.)

Thanks @ayushtkn for starting to review.

A quick question: we are using tabulario image which isn't official but from a vendor, which we won't have any control, are we ok using that?
Spark/Iceberg might be having official image may be, can we use that?

I found this image from Tabular at https://iceberg.apache.org/spark-quickstart/ - if there was an official Apache Iceberg image, I guess they would have used that in the example.  I'm open to using any other image.  BTW, this is just a small experiment to help answer #4973.
Spark does have official images, will explore those.

@SaketaChalamchala please take a look, too

There's a code against again the latest.

There's a code against again the latest.

@jojochuang thanks for taking a look.  Conflict has been resolved.

@jojochuang we don't distribute MinIO in any way.  Users running this example download the MinIO docker image from Docker Hub.
But I'm fine abandoning this PR.


Adds more directional signs. Fixes directions on existing

Mapper Notice: Warning sign ID changes > E.g. from SignRadiation to SignWarningRadiation.
About the PR
Thought some more signs for my new map would be ideal, especially for helping players get around these new maps where they might not be familiar and don't want to pull up a wiki map. Also noticed the existing directional signs were inconsistent with arrow and directions.

Fixed the direction of all existing directional signs so placing them is now correct.
Changed arrow direction for left arrow so all signs now match (see salvage sign in screenshot to see how they were (on the right), now left arrow is on the left for all signs).
Added directional signs for Hydroponics, Brig, Chapel, Washroom, Dorms, Salvage, Solars, cryo and Gravity Generator.
As per header notice, all warning signs are now under the correct ID so they can be searched easier. In future I will also change the sprite to fit the style of SS13 rather than being massive and ugly.

Screenshots

Everything from supply to left is old, everything on the right is new. Supply does in fact face the correct direction now, that was fixed after the screenshot but left it in for comparison.

Changelog

:cl:

add: Added new directional signs for more departments. Look out for these in a future map update.

feels like we can easily layer-ize these, like

base layer (sign base)
color layer
arrow direction layer
area name layer

feels like we can easily layer-ize these, like
* base layer (sign base)

* color layer

* arrow direction layer

* area name layer

Would this be benificial / cut down on size much? Also since I've corrected the left arrow to the left side would the layering work or would it have to go back to the right?

I'm not sure if splitting into re-colourable layers is super useful here, because in this specific instance if you wanted to create a new department sign you'd still have to edit the RSI for the text, and couldn't just re-colour the existing sprites. This isn';t the case for stuff like airlocks or door remotes.
And while I have no idea how important it is, I image its easier for clients to draw a single pre-defined layer than 4 separate re-colourable ones, so its probably fine as it is?

at least layering the dept marking + arrows would be good. doesnt need to be colored necessarily

at least layering the dept marking + arrows would be good. doesnt need to be colored necessarily

So is this the general consensus for this to be merged? I have another few more to add (AI, Head offices or just HEAD).
So would you like them separated into base + text + arrow. And for arrow will it be an issue the left arrow not being on the same side? Also would you need different coloured bases? Say 1 for each department if we don't want loads?

The arrow not being on the same side wouldn't be a problem if sprite layer transforms worked properly, but they don't atm. So that might actually be an issue.

So is this the general consensus for this to be merged? I have another few more to add (AI, Head offices or just HEAD).

I guess get a third opinion, because like I said I don't really think its all that important for these signs to be layered. I don't see people really needing to make use of that in a way where it wouldn't be just as easy to make a whole new sign sprite/state.

conflicts, otherwise lgtm

you coming back to this @Peptide90 ?

you coming back to this @Peptide90 ?

Will fix conflicts tonight and add the AI and Head / HoP sign.


SecurityError

is it possible to ignore a SecurityError?
i am passing a long list of securities to a dm.BbgDataManager()."some field"
some of the securities are not valid securities and a get an error such as:
Exception: SecurityError: ("string i passed as security", BAD_SEC, Unknown/Invalid security [nid:960] )
is there a way populate to return a NaN instead of breaking the code?
here is an example:
if i have:
sids = mgr[valid_security_name, not_valid_security_name]
then sids.PX_LAST will return the above error message
while i wish to have
PX_LAST
valid_security_name                                   price
not_valid_security_name                          NaN

sorry...  just realize there is a ignore_security_error=1


Install script

Hey slok!
I've created a simple bash script which will install everything (but the terminal emulator font selection) in just one execution.
Here it is: https://gist.github.com/elegos/f426eda926f39fab081fe5b390b33544

Wow! that's awesome, I'll put a link on the Readme. Thanks :)


Extend "Res. Availability Lines" not possible?

Hi everybody,
I'm currently trying to extend the "Res. Availability Lines" by two new fields from Resource.
For this i need to access the variables "Res", "NetAvailability" or AmountType for example.
Actually this is not possible because there are no events, which i can subscribe to and and the variables "are not accessable due its protection level".
I think we need a fix for this...
Best regards,
Hendrik

Hi @hendrik244, if you feel that you are missing some events in some base app objects, can you open a new issue specifying where you want the events to be called in the code, in which object and with which signature. You can find a lot of examples of event requests in this repo. Just look for issues that are tagged with the label event-request.

Just to add to the above reply, the event requests should now be filed on: https://github.com/Microsoft/ALAppExtensions

I just created a event request on the recommended repository: https://github.com/Microsoft/ALAppExtensions/issues/26


link error

everytime when i'm trying to install
c:\lua\lua52.dll : fatal error LNK1107
shows up

where can I find lua5.3.lib?

This is still happening on Windows 10 with Lua 5.2.

c:\Users\soapdog\prog\lua\luarocks-2.4.0-win32>luarocks install luafilesystem
Installing https://luarocks.org/luafilesystem-1.6.3-2.src.rock
cl /nologo /MD /O2 -c -Fosrc/lfs.obj -IC:/lua/include src/lfs.c
lfs.c
link -dll -def:lfs.def -out:lfs.dll C:/lua/lua52.dll src/lfs.obj
Microsoft (R) Incremental Linker Version 14.00.24215.1
Copyright (C) Microsoft Corporation.  All rights reserved.

C:\lua\lua52.dll : fatal error LNK1107: invalid or corrupt file: cannot read at 0x330

Error: Build error: Failed compiling module lfs.dll

@soapdog  Do you have c:\lua\lua52.lib in your system?
Try editing your LuaRocks config file and change the value of LUALIB to point to the lua52.lib file.
LuaRocks will tell the location of your config file if you type luarocks with no arguments.

@hishamhm I don't have it. I have lua52.dll and liblua52.a. My lua prebuilt binaries came from luabinaries project. They are not shipping lua52.lib on their windows download. Should the lib point to a DLL on windows? Also, thanks for the quick reply, I moved this to #82 because this issue is closed here.


Set up basic monitoring of WeVoteServer

Perhaps pingdom? Something that lets us know when the API server is down.

@DaleMcGrew Yes. Setup an account and we will get it setup

Pingdom account set up and sending notifications to<EMAIL_ADDRESS>within 5 minutes of either wevote.me or api.wevoteusa.org going down. Please let<EMAIL_ADDRESS>if you would like to get these notifications.


NTR: 7SK snRNP

Could I request a new complex term:
7SK snRNP
is_a small nuclear ribonucleoprotein complex
https://en.wikipedia.org/wiki/7SK_RNA
Def: A complex composed of the 7SK small nuclear RNA (7SK snRNA) and protein. The 7SK snRNP plays a central role in RNA polymerase II elongation control by regulating the availability of active P-TEFb.
PMID:28431135, PMID:18249148
GOC:ha

Is this the same as RNASE P or is it something else. What are the proteins then I can check....

LARP, MEPCE, HEXIM1

Not the same as RNase P. Doesn't have ribozyme function.

OK thanks. We have LARP, MEPCE,  but I don't think we have the RNA annotated. I'll look into that...

@ValWood - Let me know if you see evidence for 7SK in pombe. Otherwise, it might be good to put taxon constraints on this term as the Wikipedia page for  7SK RNA says the following, which is consistent with my recollection from SGD days about the snRNAs present in metazoans that are not present in yeast (admittedly my view of yeast is often limited to cerevisiae):

7SK is an abundant small nuclear RNA found in metazoans.[1] It plays a role in regulating transcription by controlling the positive transcription elongation factor P-TEFb.[2] 7SK is found in a small nuclear ribonucleoprotein complex (snRNP) with a number of other proteins that regulate the stability and function of the complex.

Don't think that it is a yeast thing.
Wasn't that long ago that they found it in D.mel!

I reckon it will likely be conserved, because we have 2 of the 3 proteins and the RNA probably preceded the proteins. The problem is that  divergent RNAs are even more difficult to detect than divergent proteins.
I'll put this  on a list  to search in our ncRNAs for candidates.... so add the taxon restriction for now It can be removed if we discover it.

It stayed hidden in D.mel for quite sometime and it is pretty important in the regulation of transcription elongation, so you're prob correct :-)

Somebody in the RNA world now lookin'  ;)

It seems that P-TEFb, as such, does not exist in cerevisiae:
Wood A, Shilatifard A. 2006. Bur1/Bur2 and the Ctk complex in yeast: the split personality of mammalian P-TEFb. Cell Cycle. 5(10):1066-1068.

Not  only  can  P-TEFb  target  the  Pol  II  CTD,  but  it  also  inhibits transcriptional repression by DSIF (DRB sensitivity-inducing factor) and NELF (Negative Elongation Factor; 9-12) Thus, P-TEFb has separate functions to promote transcription, one by blocking the action of transcriptional repressors and another by mediating phosphorylation of the CTD during the productive phase of transcription elongation. While P-TEFb activity is typically localized to one complex in higher eukaryotes, there are two homologues that  recapitulate  the  activities  in  Saccharomyces  cerevisiae:  the  Bur1/Bur2  and  the  Ctk kinase complexes (consisting of Ctk1, Ctk2 and Ctk3) (Fig. 1).

Here are a couple papers that talk about the distribution of 7SK and the fact that it was originally identified due to its abundance, so I agree it's appropriate to add the taxon constraint at this time and it can be removed if we learn otherwise.
Peterlin BM, et al. 2012. 7SK snRNA: a noncoding RNA that plays a major role in regulating eukaryotic transcription. Wiley Interdiscip Rev RNA. 3(1):92-103.

The human 7SK small nuclear RNA (snRNA) is an abundant noncoding RNA whose function has been conserved in evolution from invertebrates to humans.

Yazbeck AM, Tout KR, Stadler PF. 2018. Detailed secondary structure models of invertebrate 7SK RNAs. RNA Biol. 15(2):158-164.

The 7SK snRNA is a Pol-III transcript in animals with a typical length of about 330nt [1,2]. Its sequence is very well conserved in vertebrates [3,4], but shows a high level of variability in invertebrates [5,6]. Due to its abundance it has been known since the 1960s.

reopened until I confirm that taxon constraint propagates like I expect

Taxon constraint looks good so closing.

Thanks, @krchristie 👍


Use cargo's build-std instead of xargo

Apparently cargo recently gained the ability to build Rust's standard library: https://doc.rust-lang.org/cargo/reference/unstable.html#build-std this command replaces xargo.
I just tried this locally, it's just a matter of updating rustc and cargo:
diff --git a/nix/default.nix b/nix/default.nix
index 7588024a..4f33d260 100644
--- a/nix/default.nix
+++ b/nix/default.nix
@@ -41,7 +41,7 @@ let
         # Rust nightly
         (self: super: let
           moz_overlay = import self.sources.nixpkgs-mozilla self super;
-          rust-channel = moz_overlay.rustChannelOf { date = "2020-07-22"; channel = "nightly"; };
+          rust-channel = moz_overlay.rustChannelOf { date = "2020-12-29"; channel = "nightly"; };
         in rec {
           rustc-nightly = rust-channel.rust.override {
             targets = [ "wasm32-unknown-unknown" "wasm32-unknown-emscripten" ];

and updating the Makefile:
diff --git a/rts/Makefile b/rts/Makefile
index c23f3fdf..7d980bbd 100644
--- a/rts/Makefile
+++ b/rts/Makefile
@@ -164,7 +164,7 @@ _build/wasm/libmotoko_rts.a: | _build/wasm
        # NB. codegen-units=1 is to make debugging easier, not strictly
        # necessary
        cd motoko-rts && \
-           xargo -v rustc --target=wasm32-unknown-emscripten --release -- \
+           cargo -v rustc -Zbuild-std=core --target=wasm32-unknown-emscripten --release -- \
                -Crelocation-model=pic -Ccodegen-units=1
        cp motoko-rts/target/wasm32-unknown-emscripten/release/libmotoko_rts.a $@

However I couldn't make this work in nix-shell and nix-build. There's always some dependency issue, and other errors that I don't understand.
When I try locally outside of nix-shell I can build the release RTS and link it, but the final linker command fails when producing debug RTS:
wasm-ld -o mo-rts-debug.wasm \
        --import-memory --shared --no-entry --gc-sections \
        --export=__wasm_call_ctors \
        --export=memcpy \
        --export=memcmp \
        --whole-archive \
        _build/wasm/libmotoko_rts_debug.a _build/wasm/rts_debug.o ...
wasm-ld: error: motoko_rts-a73c3d27a1126524.3lq75tfopvybv06x.rcgu.o: Bad relocation type:
make: *** [Makefile:200: mo-rts-debug.wasm] Error 1

I don't know if this is a cargo/rustc bug or me using the command incorrectly.

This is implemented with #2761, closing.


A new rule for line break style

It'd be great to have a rule to checks consistency of \n vs \n\r in the end of lines, similarly to eslint's linebreak-style.
LF is allowed, CRLF throws an error:
 "remarkConfig": {
    "plugins": ["remark-preset-linebreak-style", "unix"]
  }

CRLF is allowed, LF throws an error:
 "remarkConfig": {
    "plugins": ["remark-preset-linebreak-style", "windows"]
  }

Both CRLF and LF are allowed (the rule is off):
 "remarkConfig": {
    "plugins": ["remark-preset-linebreak-style", false]
  }

What do you guys think of adding this? I can consider crafting a PR, but it'd be great if someone more knowledgeable overtook me, because figuring out the internals of the library for a newbie like me will take some time.

Yay! Many thanks @wooorm, I'm looking forward to try this!

:+1:
Will try to do some more stuff before I publish a new version!

Released!


Thread 'main' panicked at 'called Option::unwrap() on a None value'

Describe the bug
The attached image seems to crash while attempting to decode with the following error (referencing this line)
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value'

To Reproduce
// "raw" is an &[u8] of the raw file.
let png_pong::Step { raster, .. } = png_pong::Decoder::new(raw)
	.unwrap()
	.into_steps()
	.last();

Screenshots

Desktop (please complete the following information):

OS: Debian Buster
Rust: stable-x86_64-unknown-linux-gnu (default) / rustc 1.52.1 (9bc8c42bb 2021-05-09)

@joshstoik1 Thanks!  I'll look into fixing this.

@joshstoik1 Should be fixed in 0.8.1

Thanks @AldaronLau!
Version 0.8.1 fixes the panic for me, but when I try the following, the PngRaster's palette and trailing vec are both empty:
// Loading from a slice, works A-OK now.
let png_pong::Step { raster, .. } = png_pong::Decoder::new(raw)
	.map_err(|_| Error::Source)?
	.into_steps()
	.last()
	.ok_or(RefractError::Source)
	.map_err(|_| Error::Source)?
	.map_err(|_| Error::Source)?;

// Trying to extract the inner raster bits...
let raster = match raster {
	PngRaster::Palette(x, y, z) => {
		println!("{:?} {:?}", y.len(), z.len()); // 0 0
	},
	...
}

If I use into_chunks() instead of into_steps(), there is a Palette object in there with the correct number of colors for this image. So basically the data just doesn't make it into the step's PngRaster::Palette(_, here, _).
png_pong::Decoder::new(raw)
	.map_err(|_| RefractError::Source)?
	.into_chunks()
	.for_each(|x| {
		match x {
			Ok(Chunk::Palette(Palette { palette })) => {
				println!("{:?}", palette.len()); // 221
			},
			_ => {}
		}
	});

If I remap the grey indexes from steps to the above palette, all's right with the world. :wink:

@joshstoik1 Thanks for the extra information!  I just tried your code, and with your provided PNG everything works fine (the palette makes it into PngRaster).  The alpha vec should be empty since there's no alpha channel in the image.  Full test code:
fn main() -> png_pong::decode::Result<()> {
    let raw = std::fs::read("test.png").unwrap();
    let raw = raw.as_slice();

    let png_pong::Step { raster, .. } = png_pong::Decoder::new(raw)?
	    .into_steps()
	    .last()
	    .unwrap()
	    .unwrap();

    let raster = match raster {
	    png_pong::PngRaster::Palette(x, y, z) => {
		    println!("{:?} {:?}", y.len(), z.len()); // 221 0
	    },
	    _ => {},
    };

    Ok(())
}

I'm not sure what you're doing different, any ideas?

@joshstoik1 Just figured out why that's happenning, I'll release 0.8.2 in a moment.

@joshstoik1 Just released 0.8.2, should be fixed now!


Best way to include pure html post

Hello,
Apologies for the ignorant question, but I am a researcher interested in using this theme to host/log my work for easier sharing/reproducibility.  Much of my work is done in R Notebooks, which are designed to export to standalone single-file html pages for easy deployment.
My question is:  would it be possible to take these plain html pages and have the website treat them as "posts"?  As it is, I can toss the static file in a folder in the github repo and access/render it directly,( e.g. https://sgfin.github.io/files/Aetna_Epilepsy_Cohort_Building.nb.html), but this is obviously not the same as creating a post, or even having it as a page on the site with the normal header/footer/etc.
Thanks,
Sam

Hi,
I'm not able to test it right now, I'm really busy :/ But you may try to load the html inside an iframe (http://stackoverflow.com/q/30233461) or check if it's possible to export/save the notebook as a markdown (I know that it's possible in python)

Thank you for taking the time to answer.  Exporting as markdown is a wee bit clunky, bc I have to manually update the image links (at least until I make an automation script or something) -- but it gets the job done!
Thanks,
Sam

OK, so I looking into this a tiny bit on the jekyll side, and saw that it is perfectly valid to add a html file to the post folder, provided that (a) the title (before ".html") is of the same format, and (b) you still include a YAML header just as with the .md files.
I tried this, and it worked, but the formatting looked super weird.  I'm guessing it's a simple fix for someone who knows what they're doing.
I know you're busy, but if/when you ever get a chance to look at this, I'd really appreciate it.  Happy to provide more info or an example file later.
Thanks,
Sam

Nevermind one last time. :) . The key is just to carefully go through the html and make sure it doesn't have any css or anything that may jack up the page.


Remove model specific changes for BERT and DistilBERT

Remove model specific changes for BERT and DistilBERT

Was both fixed in onnxruntime that we do not need model fix any more?

Was both fixed in onnxruntime that we do not need model fix any more?

Was fixed with this PR: https://github.com/microsoft/onnxruntime/pull/7679


You can enter vehicles while crawling

This can be fixed by adding
DisableControlAction(0, 23, true) between line 73 and line 74

fixed in https://github.com/Bluethefurry/crouch-n-prone/pull/10


Render breaking in IE11 when width and margin is applied to parent container

When the following css is used on the parent container, bootstrap-switch does not render properly in IE:
.container-full {
	margin: 0 auto;
	width: 95%;
}

	<input type="checkbox" id="envToggle" >

The above works just fine in Chrome and Firefox.
IE Version: 11.0.9600.18349
Bootstrap-switch Version: 3.3.2

An update: seems like the switch only works in IE when it's in its own row. For example the following renders just fine:

				Description...

		<input type="checkbox" id="envToggle" />

However the following does not work:

				Description...

			<input type="checkbox" id="envToggle" />

Is there a known workaround to get this all to work on one line in IE?

Found a temporary workaround for the issue using the default class text-center in bootstrap, so the following would render properly in IE11:

				Description...

			<input type="checkbox" id="envToggle" />

I was able to fix this by setting the width to 100% here:
.bootstrap-switch {
    width: 100%;
    ...
}


Windows 10 - Taskbar entry context menu is empty

Issue Type: Bug

Install VSCode (tried both stable and insiders) for current user
Open installed VSCode
File -> Open Folder (open several different folders to fill "recent" list)
Right click on VSCode's icon on Taskbar

=> There is no recent folders, only task "New Window"
VS Code version: Code - Insiders 1.56.0-insider (48387dfc3d691558404cff1ea2582e3862a40080, 2021-04-13T05:15:20.350Z)
OS version: Windows_NT x64 10.0.19042
Extensions: none

Please see if you can find any logged output that could help us find the source of the issue:

run code --verbose from the command line and attach the output
in Code select Help | Toggle Developer Tools and select the Console
attach any output you see in the Console you can find

Thanks!

It seems this is what we're looking for
TRACE Error while resolving configuration file 'vscode-userdata:/c%3A/Users/etimokhov/AppData/Roaming/Code%20-%20Insiders/User/settings.json': Unable to read file 'vscode-userdata:/c:/Users/etimokhov/AppData/Roaming/Code - Insiders/User/settings.json' (Error: Unable to resolve non-existing file 'vscode-userdata:/c:/Users/etimokhov/AppData/Roaming/Code - Insiders/User/settings.json')
log.ts:272 TRACE Error while resolving configuration file 'vscode-userdata:/c%3A/Users/etimokhov/AppData/Roaming/Code%20-%20Insiders/User/tasks.json': Unable to read file 'vscode-userdata:/c:/Users/etimokhov/AppData/Roaming/Code - Insiders/User/tasks.json' (Error: Unable to resolve non-existing file 'vscode-userdata:/c:/Users/etimokhov/AppData/Roaming/Code - Insiders/User/tasks.json')

Hm, no. That is an error but I think unrelated.

Probably the full log from devtools would be better then?
-1618492618863.log
Let me know if I can provide you anything else.

And here is one from command line
[main 2021-04-15T13:16:07.057Z] Starting VS Code
[main 2021-04-15T13:16:07.058Z] from: c:\Users\etimokhov\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app
[main 2021-04-15T13:16:07.058Z] args: {
  _: [],
  diff: false,
  add: false,
  goto: false,
  'new-window': false,
  'reuse-window': false,
  wait: false,
  help: false,
  'list-extensions': false,
  'show-versions': false,
  version: false,
  verbose: true,
  status: false,
  'prof-startup': false,
  'prof-v8-extensions': false,
  'disable-extensions': false,
  'disable-gpu': false,
  telemetry: false,
  debugRenderer: false,
  logExtensionHostCommunication: false,
  'skip-release-notes': false,
  'disable-telemetry': false,
  'disable-updates': false,
  'disable-keytar': false,
  'disable-crash-reporter': false,
  'crash-reporter-id': '11681bbe-6fa9-4a86-a82f-8eb0c752dc92',
  'skip-add-to-recently-opened': false,
  'unity-launch': false,
  'open-url': false,
  'file-write': false,
  'file-chmod': false,
  'driver-verbose': false,
  force: false,
  'do-not-sync': false,
  trace: false,
  'force-user-env': false,
  'force-disable-user-env': false,
  'open-devtools': false,
  __sandbox: false,
  'no-proxy-server': false,
  nolazy: false,
  'force-renderer-accessibility': false,
  'ignore-certificate-errors': false,
  'allow-insecure-localhost': false,
  logsPath: 'C:\\Users\\etimokhov\\AppData\\Roaming\\Code - Insiders\\logs\\20210415T161607'
}
[main 2021-04-15T13:16:07.063Z] Deleting Chrome cached data path: c:\Users\etimokhov\AppData\Roaming\Code - Insiders\Code Cache
[main 2021-04-15T13:16:07.070Z] Resolving machine identifier...
[main 2021-04-15T13:16:07.070Z] Resolved machine identifier: 296f235928e1b68fc33673c97b16f0858b160bf30d9bc1a25ce864b568b8a91f
[main 2021-04-15T13:16:07.080Z] Main->SharedProcess#connect
[main 2021-04-15T13:16:07.131Z] StorageMainService: creating global storage
[main 2021-04-15T13:16:07.131Z] lifecycle (main): phase changed (value: 2)
[main 2021-04-15T13:16:07.132Z] windowsManager#open
[main 2021-04-15T13:16:07.134Z] windowsManager#open pathsToOpen [
  {
    workspace: { id: 'bf0fb64e91d1d2217f5a316b57076d19', uri: [w] },
    exists: true
  }
]
[main 2021-04-15T13:16:07.136Z] IPC Object URL: Registered new channel vscode:a851c0dd-d5f3-41d7-a7bf-4e0dc21f17d9.
[main 2021-04-15T13:16:07.137Z] window#validateWindowState: validating window state on 2 display(s) { mode: 0, x: 2547, y: 381, width: 1443, height: 768 }
[main 2021-04-15T13:16:07.137Z] window#validateWindowState: multi-monitor working area { x: 2061, y: -255, width: 2419, height: 1440 }
[main 2021-04-15T13:16:07.138Z] window#ctor: using window state { mode: 0, x: 2547, y: 381, width: 1443, height: 768 }
[main 2021-04-15T13:16:07.139Z] window#ctor: vscode-file:// protocol is explicitly disabled
[main 2021-04-15T13:16:07.265Z] StorageMainService: creating workspace storage (bf0fb64e91d1d2217f5a316b57076d19)
[main 2021-04-15T13:16:07.267Z] windowsManager#open used window count 1 (workspacesToOpen: 0, foldersToOpen: 1, emptyToRestore: 0, emptyToOpen: 0)
[main 2021-04-15T13:16:07.270Z] lifecycle (main): phase changed (value: 3)
[main 2021-04-15T13:16:07.290Z] update#setState idle
[main 2021-04-15T13:16:07.292Z] resolveShellEnv(): skipped (Windows)
(node:23624) electron: The default of contextIsolation is deprecated and will be changing from false to true in a future release of Electron.  See https://github.com/electron/electron/issues/23506 for more information
[main 2021-04-15T13:16:07.656Z] [File Watcher (node.js)] [CHANGED] c:\Users\etimokhov\AppData\Roaming\Code - Insiders\User\globalStorage
[main 2021-04-15T13:16:07.658Z] [File Watcher (node.js)] [CHANGED] c:\Users\etimokhov\AppData\Roaming\Code - Insiders\User\globalStorage
[main 2021-04-15T13:16:07.720Z] resolveShellEnv(): skipped (Windows)
[main 2021-04-15T13:16:07.869Z] [File Watcher (node.js)] >> normalized [CHANGED] c:\Users\etimokhov\AppData\Roaming\Code - Insiders\User\globalStorage
[main 2021-04-15T13:16:08.667Z] [File Watcher (node.js)] [CHANGED] c:\Users\etimokhov\AppData\Roaming\Code - Insiders\User\globalStorage
[main 2021-04-15T13:16:08.669Z] [File Watcher (node.js)] [CHANGED] c:\Users\etimokhov\AppData\Roaming\Code - Insiders\User\globalStorage
[main 2021-04-15T13:16:08.691Z] SharedProcess: on vscode:createSharedProcessMessageChannel
[main 2021-04-15T13:16:08.691Z] resolveShellEnv(): skipped (Windows)
[main 2021-04-15T13:16:08.692Z] IPC Object URL: Registered new channel vscode:a1814ca1-ec12-4476-b138-1db64367763e.
(node:23624) electron: The default of contextIsolation is deprecated and will be changing from false to true in a future release of Electron.  See https://github.com/electron/electron/issues/23506 for more information
[main 2021-04-15T13:16:08.721Z] [File Watcher (node.js)] [CHANGED] c:\Users\etimokhov\AppData\Roaming\Code - Insiders\User\globalStorage
[main 2021-04-15T13:16:08.901Z] resolveShellEnv(): skipped (Windows)
[main 2021-04-15T13:16:08.928Z] [File Watcher (node.js)] >> normalized [CHANGED] c:\Users\etimokhov\AppData\Roaming\Code - Insiders\User\globalStorage
[main 2021-04-15T13:16:09.100Z] RequestService#request https://update.code.visualstudio.com/api/update/win32-x64-user/insider/25785b97e533b15ae3b12e48aaf4187416437e62
[main 2021-04-15T13:16:09.102Z] resolveShellEnv(): skipped (Windows)
[main 2021-04-15T13:16:09.106Z] SharedProcess: IPC ready
[main 2021-04-15T13:16:09.109Z] Main->SharedProcess#connect: connection established
[main 2021-04-15T13:16:09.151Z] SharedProcess: Overall ready
[main 2021-04-15T13:16:09.597Z] [File Watcher (node.js)] [CHANGED] c:\Users\etimokhov\AppData\Roaming\Code - Insiders\User\globalStorage
[main 2021-04-15T13:16:09.598Z] [File Watcher (node.js)] [CHANGED] c:\Users\etimokhov\AppData\Roaming\Code - Insiders\User\globalStorage
[main 2021-04-15T13:16:09.607Z] [File Watcher (node.js)] [CHANGED] c:\Users\etimokhov\AppData\Roaming\Code - Insiders\User\globalStorage
[main 2021-04-15T13:16:09.807Z] [File Watcher (node.js)] >> normalized [CHANGED] c:\Users\etimokhov\AppData\Roaming\Code - Insiders\User\globalStorage
[main 2021-04-15T13:16:37.292Z] update#checkForUpdates, state =  idle
[main 2021-04-15T13:16:37.292Z] update#setState checking for updates
[main 2021-04-15T13:16:37.292Z] RequestService#request https://update.code.visualstudio.com/api/update/win32-x64-user/insider/25785b97e533b15ae3b12e48aaf4187416437e62
[main 2021-04-15T13:16:37.294Z] resolveShellEnv(): skipped (Windows)
[main 2021-04-15T13:16:37.375Z] update#setState idle
[main 2021-04-15T13:17:03.401Z] [File Watcher (node.js)] [CHANGED] c:\Users\etimokhov\AppData\Roaming\Code - Insiders\User\globalStorage
[main 2021-04-15T13:17:03.403Z] [File Watcher (node.js)] [CHANGED] c:\Users\etimokhov\AppData\Roaming\Code - Insiders\User\globalStorage
[main 2021-04-15T13:17:03.610Z] [File Watcher (node.js)] >> normalized [CHANGED] c:\Users\etimokhov\AppData\Roaming\Code - Insiders\User\globalStorage
[main 2021-04-15T13:18:08.527Z] [File Watcher (node.js)] [CHANGED] c:\Users\etimokhov\AppData\Roaming\Code - Insiders\User\globalStorage
[main 2021-04-15T13:18:08.528Z] [File Watcher (node.js)] [CHANGED] c:\Users\etimokhov\AppData\Roaming\Code - Insiders\User\globalStorage
[main 2021-04-15T13:18:08.741Z] [File Watcher (node.js)] >> normalized [CHANGED] c:\Users\etimokhov\AppData\Roaming\Code - Insiders\User\globalStorage
[main 2021-04-15T13:19:08.519Z] [File Watcher (node.js)] [CHANGED] c:\Users\etimokhov\AppData\Roaming\Code - Insiders\User\globalStorage
[main 2021-04-15T13:19:08.521Z] [File Watcher (node.js)] [CHANGED] c:\Users\etimokhov\AppData\Roaming\Code - Insiders\User\globalStorage
[main 2021-04-15T13:19:08.736Z] [File Watcher (node.js)] >> normalized [CHANGED] c:\Users\etimokhov\AppData\Roaming\Code - Insiders\User\globalStorage
[main 2021-04-15T13:21:08.549Z] [File Watcher (node.js)] [CHANGED] c:\Users\etimokhov\AppData\Roaming\Code - Insiders\User\globalStorage
[main 2021-04-15T13:21:08.553Z] [File Watcher (node.js)] [CHANGED] c:\Users\etimokhov\AppData\Roaming\Code - Insiders\User\globalStorage
[main 2021-04-15T13:21:08.760Z] [File Watcher (node.js)] >> normalized [CHANGED] c:\Users\etimokhov\AppData\Roaming\Code - Insiders\User\globalStorage

Can you try to run code --disable-extensions --user-data-dir <directory> where <directory> is an empty folder? This will ensure Code is starting with a fresh data directory, e.g. no specific settings and without any extensions running.

Although it is a fresh installed version of VSCode Insiders (I especially installed it to check whether the issue is fixed in the next version) I can do that. I run it like this ./Code\ -\ Insiders.exe --disable-extensions --user-data-dir ./test --verbose (in the folder with installed vscode) and the issue still persist. Here are logs from this run if you need them:
From devtools: -1618556102341.log
From console:
[main 2021-04-16T06:54:42.655Z] Starting VS Code
[main 2021-04-16T06:54:42.655Z] from: c:\Users\etimokhov\AppData\Local\Programs\Microsoft VS Code Insiders\resources\app
[main 2021-04-16T06:54:42.656Z] args: {
  _: [],
  diff: false,
  add: false,
  goto: false,
  'new-window': false,
  'reuse-window': false,
  wait: false,
  'user-data-dir': './test',
  help: false,
  'list-extensions': false,
  'show-versions': false,
  version: false,
  verbose: true,
  status: false,
  'prof-startup': false,
  'prof-v8-extensions': false,
  'disable-extensions': true,
  'disable-gpu': false,
  telemetry: false,
  debugRenderer: false,
  logExtensionHostCommunication: false,
  'skip-release-notes': false,
  'disable-telemetry': false,
  'disable-updates': false,
  'disable-keytar': false,
  'disable-crash-reporter': false,
  'crash-reporter-id': '11681bbe-6fa9-4a86-a82f-8eb0c752dc92',
  'skip-add-to-recently-opened': false,
  'unity-launch': false,
  'open-url': false,
  'file-write': false,
  'file-chmod': false,
  'driver-verbose': false,
  force: false,
  'do-not-sync': false,
  trace: false,
  'force-user-env': false,
  'force-disable-user-env': false,
  'open-devtools': false,
  __sandbox: false,
  'no-proxy-server': false,
  nolazy: false,
  'force-renderer-accessibility': false,
  'ignore-certificate-errors': false,
  'allow-insecure-localhost': false,
  logsPath: 'C:\\Users\\etimokhov\\AppData\\Local\\Programs\\Microsoft VS Code Insiders\\test\\logs\\20210416T095442'
}
[main 2021-04-16T06:54:42.660Z] Deleting Chrome cached data path: c:\Users\etimokhov\AppData\Local\Programs\Microsoft VS Code Insiders\test\Code Cache
[main 2021-04-16T06:54:42.675Z] Resolving machine identifier...
[main 2021-04-16T06:54:42.675Z] Resolved machine identifier: 0d9ee7d293f9207e490bf6b0b7924aadbbfbeaae00a0ffbc7c716ed02e2d2436
[main 2021-04-16T06:54:42.681Z] Main->SharedProcess#connect
[main 2021-04-16T06:54:42.700Z] StorageMainService: creating global storage
[main 2021-04-16T06:54:42.700Z] lifecycle (main): phase changed (value: 2)
[main 2021-04-16T06:54:42.701Z] windowsManager#open
[main 2021-04-16T06:54:42.703Z] windowsManager#open pathsToOpen [
  {
    workspace: { id: 'bf0fb64e91d1d2217f5a316b57076d19', uri: [w] },
    exists: true
  }
]
[main 2021-04-16T06:54:42.706Z] IPC Object URL: Registered new channel vscode:b9840501-6e4f-432f-b5c7-e7c055fc8b09.
[main 2021-04-16T06:54:42.707Z] window#validateWindowState: validating window state on 2 display(s) { mode: 1, x: 448, y: 216, width: 1024, height: 768 }
[main 2021-04-16T06:54:42.708Z] window#validateWindowState: multi-monitor working area { x: 127, y: 0, width: 1793, height: 1200 }
[main 2021-04-16T06:54:42.709Z] window#ctor: using window state { mode: 1, x: 448, y: 216, width: 1024, height: 768 }
[main 2021-04-16T06:54:42.709Z] window#ctor: vscode-file:// protocol is explicitly disabled
[main 2021-04-16T06:54:42.785Z] StorageMainService: creating workspace storage (bf0fb64e91d1d2217f5a316b57076d19)
[main 2021-04-16T06:54:42.786Z] windowsManager#open used window count 1 (workspacesToOpen: 0, foldersToOpen: 1, emptyToRestore: 0, emptyToOpen: 0)
[main 2021-04-16T06:54:42.787Z] lifecycle (main): phase changed (value: 3)
[main 2021-04-16T06:54:42.810Z] update#setState idle
[main 2021-04-16T06:54:42.812Z] resolveShellEnv(): skipped (Windows)
(node:12488) electron: The default of contextIsolation is deprecated and will be changing from false to true in a future release of Electron.  See https://github.com/electron/electron/issues/23506 for more information
[main 2021-04-16T06:54:43.344Z] resolveShellEnv(): skipped (Windows)
[main 2021-04-16T06:54:43.358Z] [File Watcher (node.js)] [CHANGED] c:\Users\etimokhov\AppData\Local\Programs\Microsoft VS Code Insiders\test\User\globalStorage
[main 2021-04-16T06:54:43.360Z] [File Watcher (node.js)] [CHANGED] c:\Users\etimokhov\AppData\Local\Programs\Microsoft VS Code Insiders\test\User\globalStorage
[main 2021-04-16T06:54:43.569Z] [File Watcher (node.js)] >> normalized [CHANGED] c:\Users\etimokhov\AppData\Local\Programs\Microsoft VS Code Insiders\test\User\globalStorage
[main 2021-04-16T06:54:44.110Z] SharedProcess: on vscode:createSharedProcessMessageChannel
[main 2021-04-16T06:54:44.110Z] resolveShellEnv(): skipped (Windows)
[main 2021-04-16T06:54:44.111Z] IPC Object URL: Registered new channel vscode:d43344eb-7bdd-4103-80e6-9af70497b3a1.
(node:12488) electron: The default of contextIsolation is deprecated and will be changing from false to true in a future release of Electron.

Ok thanks, unfortunately I am out of ideas.

Is it possible to debug vscode without building it locally? I can try to debug it if that works, but I think I'll need your help with some points where I need to start/pat attention on and so on.

Thanks for the offer, https://github.com/microsoft/vscode/wiki/How-to-Contribute explains how to run out of sources. let me know if you need help getting there.
Btw the paths in question are not super long right? Because there is a limit

Btw the paths in question are not super long right? Because there is a limit

Yeah, it's like D:/projects/ts-transformer-properties-rename.

Thanks for the offer, microsoft/vscode/wiki/How-to-Contribute explains how to run out of sources. let me know if you need help getting there.

Cool, thanks! I'll get back here since I get any additional information/questions.

@bpasero do you have any advice where I can start debug from? Like where that list is generated or returned/set to OS?

Ok, it seems that I figure out where I need to start. I found this code (I don't use source maps):
try {
    y.app.setJumpList(f)
} catch (E) {
    this.logService.warn("updateWindowsJumpList#setJumpList", E)
}

which matches to this one https://github.com/microsoft/vscode/blob/94c9ea46838a9a619aeafb7e8afd1170c967bb55/src/vs/platform/workspaces/electron-main/workspacesHistoryMainService.ts#L386-L391
I added 2 breakpoints (and also enabled both "Pause on exceptions" and "Pause on caught exceptions"): one in try block and another one in catch block. It doesn't hit into catch block.
I tried to see what's in f variable:
[
  {
    "type": "tasks",
    "items": [
      {
        "type": "task",
        "title": "New Window",
        "description": "Opens a new window",
        "program": "C:\\Users\\etimokhov\\AppData\\Local\\Programs\\Microsoft VS Code Insiders\\Code - Insiders.exe",
        "args": "-n",
        "iconPath": "C:\\Users\\etimokhov\\AppData\\Local\\Programs\\Microsoft VS Code Insiders\\Code - Insiders.exe",
        "iconIndex": 0
      }
    ]
  },
  {
    "type": "custom",
    "name": "Recent Folders",
    "items": [
      {
        "type": "task",
        "title": "ts-transformer-properties-rename",
        "description": "D:\\projects\\ts-transformer-properties-rename",
        "program": "C:\\Users\\etimokhov\\AppData\\Local\\Programs\\Microsoft VS Code Insiders\\Code - Insiders.exe",
        "args": "--folder-uri \"file:///d%3A/projects/ts-transformer-properties-rename\"",
        "iconPath": "explorer.exe",
        "iconIndex": 0
      }
    ]
  },
  {
    "type": "recent"
  }
]

and this doesn't work. But if I modify this list like this f[0].items.push(...f[1].items) it adds my recent folder to tasks list.

So probably the issue is with custom category.

I just tried to use example from https://www.electronjs.org/docs/api/app#appsetjumplistcategories-windows and it seems it does work correctly. This is what I got:

It seems that the only type="tasks" is working at the moment

As far as I understand setJumpList does to electron native API (which I cannot debug in devtools obviously). I've tried to read the underlying code but didn't find anything specific there. Probably if it doesn't throw an error it's a issue of Windows itself?
Let me what you think about that.

Ok, I figured out what's going on here. Some time ago I've disabled "Show recently opened items in Jump Lists on Start or the taskbar and in File Explorer Quick Access" option in Windows Settings. I just enabled it and now it works fine! It isn't obvious that disabling this setting affects custom categories as well.

Sorry for inconvenience.


Add new Cpu-related fields

https://github.com/rancher/rancher/issues/7602
note: CPURealtimePeriod and CPURealtimeRuntime need to be tested manually after cattle PR being merged

LGTM

LGTM


Integration Tests: Internal mechanism to run tests pre-release

Integration testing now working via webhook, example run in this PR


Support loading cubemap json

We used to be able to load a cubemap json for engine-only users. This feature was removed with the new resource loader. We need to add it back because exported models with cubemaps will not load.

What is the format of the cubemap json and how to I generate one?

The cubemap json is already generated when we export a model archive and one of the materials references a cubemap. The material cubemap property is changed to point to the cubemap json. The cubemap json simply contains the cubemap asset data. For example:
{
   "textures":[
      "../18062/f0.png",
      "../18065/f1.png",
      "../18067/f2.png",
      "../18061/f3.png",
      "../18063/f4.png",
      "../18064/f5.png"
   ],
   "minFilter":5,
   "name":"New Cubemap",
   "magFilter":1,
   "rgbm":true,
   "anisotropy":5
}

If the cubemap is prefiltered then the json will also contain a 'prefiltered' property that points to the dds file.

Sorry, I'm not sure exactly what's missing here. We have a cubemap resource handler. The Editor seems to generate a valid zip for a cubemap. What do we need to do and (roughly) how long would it take to fix? (BTW, I just tried downloading a cubemap and loading it into one of the engine examples but the load function passed to loadFromUrl never gets called).

When loaded from the editor, cubemaps reference textures by asset id. When they are downloaded for use outside of the editor (as a json file) they reference textures as a relative path.
The resource handler needs to support path-based cubemaps which it doesn't at the moment.


Don't try to automatically handle subclasses of known types

Handles a couple of them, leaving Mappings (OrderedDict specifically) out to avoid conflicting with @lig 's work.
I'm also trying to do a better job of handling constraints on these types, e.g. MaxLen on Path.
Selected Reviewer: @hramezani

please review
(test failures are due to GHA being flakey)

I’ll revert the deque behavior and add a link to custom types doc or better info in the error messages (along with tests for those).
Agreed about the feedback and use cases. It would be good to get the feature requests and understand how that first into our new tooling for custom types then implement subclass handling and make decisions from then. Certainly better than the inconsistent / buggy behavior we have now.

Both of those tasks done, sending this to merge


Need chained select using Select2

It would be very wonderful if you add chained select feature.

I created a pretty solid example of chaining on Stack Overflow.


Clay binary segfaults on Linux

Clay compiles, but segfaults on execution.
The following upstream merge causes the segfault.

Which merge is that? Do you have a backtrace?

The only compiler-related patch I see in that timeframe is bec006f491, which just hoist everything into a namespace. Could it be a g++/clang++ codegen bug?

Starting program: /home/jeremy/Dev/clay/projects/clay/build/compiler/src/clay bar.clay
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff73491b6 in std::string::compare(std::string const&) const ()
   from /usr/lib/libstdc++.so.6
(gdb) bt
#0  0x00007ffff73491b6 in std::string::compare(std::string const&) const ()
   from /usr/lib/libstdc++.so.6
#1  0x00000000005ff137 in operator< , std::allocator > (__rhs=..., __lhs=...)
    at /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/bits/basic_string.h:2512
#2  operator() (__y=..., __x=..., this=)
    at /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/bits/stl_function.h:236
#3  std::_Rb_tree, std::less, std::allocator >::_M_insert_unique (
    this=0x7fffffffc630, __v=...)
    at /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/bits/stl_tree.h:1277
#4  0x00000000005fbc63 in insert (__x=, this=0x7fffffffc630)
    at /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/bits/stl_set.h:410
#5  clay::ambiguousImportError (name=..., candidates=...)
    at /home/jeremy/Dev/clay/projects/clay/compiler/src/env.cpp:56
#6  0x00000000005fdc9c in clay::lookupPrivate (module=,
    name=)
    at /home/jeremy/Dev/clay/projects/clay/compiler/src/env.cpp:297
#7  0x00000000005fe0ba in clay::lookupEnv (env=, name=)
    at /home/jeremy/Dev/clay/projects/clay/compiler/src/env.cpp:354
#8  0x00000000005fe119 in clay::lookupEnv (env=,
    name=)
    at /home/jeremy/Dev/clay/projects/clay/compiler/src/env.cpp:350
#9  0x00000000005fe17d in clay::safeLookupEnv (env=, name=...)
    at /home/jeremy/Dev/clay/projects/clay/compiler/src/env.cpp:367
#10 0x0000000000687a7e in clay::evaluateOnePattern (expr=..., env=...)
    at /home/jeremy/Dev/clay/projects/clay/compiler/src/patterns.cpp:596
#11 0x0000000000660d56 in initOverload (x=...)
    at /home/jeremy/Dev/clay/projects/clay/compiler/src/loader.cpp:408
#12 clay::initModule (m=...)
    at /home/jeremy/Dev/clay/projects/clay/compiler/src/loader.cpp:511
#13 0x00000000006600c9 in initModule (m=)
    at /home/jeremy/Dev/clay/projects/clay/compiler/src/loader.cpp:486
#14 clay::initModule (m=...)
    at /home/jeremy/Dev/clay/projects/clay/compiler/src/loader.cpp:490
#15 0x00000000006600c9 in initModule (m=)
    at /home/jeremy/Dev/clay/projects/clay/compiler/src/loader.cpp:486
#16 clay::initModule (m=...)
    at /home/jeremy/Dev/clay/projects/clay/compiler/src/loader.cpp:490
#17 0x00000000006600c9 in initModule (m=)

OK, looks like a bug in ambiguousImportError. Maybe your changes introduce an import ambiguity. I'll merge your changes and have a look.

That's likely, I moved some stuff on the last couple of commits.

What was the contents of the bar.clay you used to get that backtrace?

That was just one of the small sample programs you used for a previous issue.

record Foo (i:Int, j:Int);

incr(a, n) {
    a += n;
}

main() {
    var x = Foo(0,0);

    println(x);
    incr(x.i, 1);
    println(x);
    incr(x.j, 1);
    println(x);
    incr(x.i, 1);
    println(x);
    incr(x.j, 1);
    println(x);
}

Found the crash. Looks like you have nexttoward in two places:

###############################
inline overload nextafter(x:LongDouble,y:Float) = libc.nextafterl(x,LongDouble(y));

[| MathMode?(LIBM)] inline overload nexttoward(x:Double,y:Double) = libc.nexttoward(x,y);
------------------------------------^
inline overload nexttoward(x:Float,y:Float) = libc.nexttowardf(x,y);
inline overload nexttoward(x:LongDouble,y:LongDouble) = libc.nexttowardl(x,y);
###############################
/Users/joe/Documents/Code/others/clay/lib-clay/math/libm/libm.clay(311,36): error: ambiguous imported symbol: nexttoward
  disambiguate with one of:
    import math.native.core.(nexttoward);
    import math.native.defines.(nexttoward);

I'll push a patch for the compiler crash soon after I add some tests.

@agemogolk You should double-check that 3f28ee609a is the right fix for the ambiguity. The crash should be fixed now.

Yeah, my bad. No more crash.


Add support for jsx-runtime

It would be nice to support the auto-import of the jsx runtime, removing the need to import the @kitajs/html/register sub-package.
This PR aims to do that.
@arthurfiorette let me know if this seems like an improvement and if you would like to make this the standard way of configuring the tsconfig for this library. In that case, I will adapt the docs.

Hey, can you give more details about what and why you're doing this?

For sure.
Current status
If you want to use this library in a typescript project you must use a tsconfig that looks something like this
{
  "compilerOptions": {
    "jsx": "react",
    "jsxFactory": "Html.createElement",
    "jsxFragmentFactory": "Html.Fragment",
    "plugins": [{ "name": "@kitajs/ts-html-plugin" }]
  }
}

the property "jsx": "react" tells typescript to substitute the jsx elements with a call to "Html.createElement" (or "Html.Fragment" in case there is a fragment). This implies that you have to have in your code a declaration of the Html object. The choice is to import it per file or globally using the module @kitajs/html/register as (recommended by the docs).
The catch
When you choose the global import as a way to import the Html object you are going to encounter issues when you are trying to unit test your code (that uses jsx somewhere). This is because you have to import the "register module" on top of every unit test file.
Another case could be made about the pollution of the global object, but I'm not going into detail about that.
Solution
Typescript support "jsx": "react-jsx" that will transpile the jsx code with a call to a function called jsx or jsxs that will be automatically imported from a module named what you configure in jsxImportSource concatenating jsx-runtime. Example:
{
  "compilerOptions": {
    "jsx": "react-jsx",
    "jsxImportSource": "@kitajs/html",
    "plugins": [{ "name": "@kitajs/ts-html-plugin" }]
  }
}

code
const a =
Hello

transpilled to something like
const runtime = require('@kitajs/html/jsx-runtime')
const a = runtime.jsx('h1', { children: 'Hello' })

As you can see there is no global pollution and the import to the jsx function is made by the transpiler; removing the need to have a global import to @kitajs/html/register module.
The implementation
I've followed the specification expected by typescript during the implementation of the jsx-runtime sub module.
I've created a ts configuration to test that all the current tests work using this different way of configuring typescript/jsx. I had to add "noUnusedLocals": false because all the test import the Html object that is no longer needed with this new config.
Hope this is clearer now, let's discuss about it!
Docs:
https://www.typescriptlang.org/tsconfig#jsx
https://github.com/facebook/react/blob/59831c98cffe0edf706238b067928e7cf54d1065/packages/react/jsx-runtime.js#L4
https://github.com/preactjs/preact/blob/a003d429f4cfa6c131f01eab52d556b242b3fc59/jsx-runtime/src/index.js#L4

When importing other things from @kitajs/html, should we still require the user to create the import just like when importing useState from React, or should we keep the /register-way that, once imported, Html namespace is available everywhere?
Reading more about jsx-runtime, I think we should completely remove the /register import and push the usage of jsx-runtime when global usage is wanted.

I've seen jsxDEV and __jsxDEV exports in old react project sources, should we also provide them?
I knew about react-jsx before but could not find any actual spec or implementation description to follow a standard here. That's why I never followed the path and implemented it... Is there something we could validate against?

I've seen jsxDEV and __jsxDEV exports in old react project sources, should we also provide them?
I knew about react-jsx before but could not find any actual spec or implementation description to follow a standard here. That's why I never followed the path and implemented it... Is there something we could validate against?

I don't think that this package need __jsxDEV because it does not have an actual need for it. The __jsxDEV is used to run checks during development on, for example, the fact that you are mapping elements without providing a key prop. Or other stuff like that.
I had the same problem trying to create this first draft. The implementation that I did was against the tests using the alternative typescript config. There is a lot of React-related content on the topic of jsx on the internet but very little on "server side" jsx runtimes. I guess that we should start writing our stuff driven by trial and error.

Additionally, we could drastically improve kitajs/html performance with support for precompiling JSX.
Read more:
oven-sh/bun#6878 https://deno.com/blog/v1.38#fastest-jsx-transform https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md#motivation

I'm on it

Additionally, we could drastically improve kitajs/html performance with support for precompiling JSX.
Read more:
oven-sh/bun#6878 https://deno.com/blog/v1.38#fastest-jsx-transform https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md#motivation

It looks like this is still only supported in Deno + Preact, it's a good idea, but it won't be used by anyone until support arrives later in TS or in packagers. I created a proposal at microsoft/TypeScript#57468 for this, but I'm not sure if it will be accepted by the community...
Until then, this feature will have to wait.

We need to keep the same performance for createElement and jsx/s. Thus, having more functions calls drastically decreased performance, thus I reimplemented createElement for jsxs (children: Children[]) and jsx (children?: Children).

I also simplified JSDoc comments for createElement functions, as their typings were wrong.

Current jsx implementation is still slower

jsx is only used with no children or a single one, this allows us to replace the contentsToString call which has a loop to a single if/else branch.

I also improved the original contentsToString because it previously didn't serialized false and NaN, which was probably a bug.

With react-jsx, we can safely type the Children attribute, previously it was any. This removes even more checks inside contentsToString and move them to the TSC compiler:

{{a:1}}
 // Previously was fine and was transformed to [object Object], which is unintended

now:
// ts(2353): Object literal may only specify known properties, and 'a' does not exist in type 'Promise<Children> | Children[]'

{{a:1}}

Increasing even further the performance

jsx-runtime is faster than createElement (That's probably why react itself moved to it). I think we should make it default and deprecate the createElement way.

Current tasks:

[ ] jsx and jsxs jsdoc
[ ] Move documentation to be react-jsx first
[ ] Fix serialization test (false now is "false" instead of ""...)
[ ] Add a table containing input -> outputs to be expected in the readme, like true -> "true", [1,"3"] -> "13" and so on... (Functions and objects will throw tsc errors)
[ ] Ensure everything keeps working with ts-html-plugin.
[ ] Add a way to deprecate older createElement/import Html way

I improved even further JSX/JSXS performance, using the average of kb/html and the time per iteration of our benchmarks, this is the result:

Holy shit 1.2gbps
I can finally rest in peace now XD.

https://github.com/fastify/process-warning is a great example on how to deprecate things, so I followed their pattern (without installing it as a dependency).
This is how it shows up on bun and nodejs:

And this is what the user will see after clicking the link:

I also added more examples to the serialization table.

Could you finish these two tasks below?

[ ] Ensure everything keeps working with ts-html-plugin.
[ ] Fix benchmarks to use newer jsxs syntax for kita

@JacopoPatroclo could you finish these two tasks below?

[ ] Ensure everything keeps working with ts-html-plugin.
[ ] Fix benchmarks to use newer jsxs syntax for kita

@arthurfiorette let me know your thoughts about the deprecation message I add to the register module. Moreover, I think that adding the @deprecated jsdoc property to the createElement function does not make a lot of sense since it is usually used by the transpiler and not directly by the end user. We should make it explicit in the docs and at some point in the future substitute the functionality with a throw Error that explains how to migrate and where to find the documentation to do it.

I think only using the correct way to deprecate it (process warning) is enough for now, let's see how the users react to it.

I will also add to the tasks:

[ ] Migrate tests to utilize the jsx-runtime instead of the createElement function (this will increase the code coverage also I think)

Awesome!

@arthurfiorette I'm encountering issues migrating the benchmarks to use the new JSX-runtime.
The main pinpoint is related to the fact that the benchmarks are written using es-modules but the package uses commonjs.
This should not be an issue but the jsx runtime import is transpilled by typescript like this:
import { jsx as _jsx, jsxs as _jsxs } from '../../jsx-runtime'

but as stated from the Node.js docs you can only import common-js modules using a "global import"
import something from 'common-js-module'

I've tried to convert everything to common-js but the package that we are using for benchmarking (mitata) seems to only work when imported using esm syntax. It's kind of a mess. I'm not sure how to bring home this refactor.
Side note, we should consider using pnpm-workspace to handle the benchmarks piece, it would be nice to reference the jsx-runtime using the real path (@kitajs/htm) instead of something like (../..). This could be achieved by creating a project that has between it's dependencies @kitajs/htm with the version workspace:*
Let me know what you think of my reasoning above and about the workspace approach.

Let me know what you think of my reasoning above and about the workspace approach.

You could try to self install using a file path at benchmark/package.json:
{
  "type": "module",
  "dependencies": {
    "kitajs": "file:../.."
  }
}

Regarding the workspace approach, I'll probably create a workspace to group all html related projects into a single repository:
https://github.com/kitajs/html
https://github.com/kitajs/fastify-html-plugin
https://github.com/kitajs/ts-html-plugin
But I do not have time for this now, maybe after this PR gets merged I can work on it.

@arthurfiorette let me know if my refactoring of the project suits you.
I've separated each renderer into its package, now we have a cleaner way to handle the ts compilation for each package.
The benchmark runner has the same checks and bench as before to ensure that each renderer is going to output the same markup as @kitajs/html.

Let me know what you think of my reasoning above and about the workspace approach.

You could try to self install using a file path at benchmark/package.json:
{
  "type": "module",
  "dependencies": {
    "kitajs": "file:.."
  }
}

Regarding the workspace approach, I'll probably create a workspace to group all html related projects into a single repository:
https://github.com/kitajs/html https://github.com/kitajs/fastify-html-plugin https://github.com/kitajs/ts-html-plugin
But I do not have time for this now, maybe after this PR gets merged I can work on it.

I can help with this task, I'm very familiar with Nx and pnpm workspaces.

Can you also merge from main? pnpm should resolve conflicts for us

Since we're already here, I think its safe to move ts-html-plugin and fastify-html-plugin to this repository. I'll let the monorepo setup similar to how its configured in https://github.com/kitajs/kitajs.

Just moved both packages into this branch. Could you review it?
Tasklist:

[ ] Update links and references inside all package jsons.
[ ] Ensure tests are working on all packages
[ ] Test CI/CI
[ ] Test changeset
[ ] Update docs and reference links
[ ] Do a simple publish --dry-run to ensure all files are being bundled correctly
[ ] See if there's no missing or left configuration files
[ ] Update monorepo readme's

Also, our current benchmark isn't fair with current usage of ghtml and common-tags, as it creates the entire html tree with a single call, which is unrealistic. We should create another way to measure it by using components and rendering data lists.

I'm not sure if someone is going to review these files, but if so, you can safely ignore everything inside packages/src or packages/html/*.js. No actual source code was changed since 8fb79e0a5e8b9b004291cc687c26b2e84d1f0e46 Only project setup and monorepo configurations were created.

What about creating another package just to have the benchmark code?
What do you think about the current benchmark? I'm not sure it they represent real usecase of this library. It would be awesome if we could copy a large website with components, [].map's, object styles and related stuff to compare in a real world scenario.

Also, our current benchmark isn't fair with current usage of ghtml and common-tags, as it creates the entire html tree with a single call, which is unrealistic. We should create another way to measure it by using components and rendering data lists.

Fist sorry for my delayed response. I was away for work.
So, I think that creating a common code for benchmarking is not the right approach. Each jsx framework has its way of writing jsx (see the use of className vs class for example). We should keep each renderer separate but still check their output match to one done by @kitajs/html.
Regarding the "real word benchmark" thing. We could try to strive towards real-world benchmarks but the aim should not make @kitajs/html numbers better. The aim should be to have a way to measure how fast is this approach on rendering HTML over time.
For sure template libraries (common-tags, ghtml) have a performance advantage but they are missing all good developer experience around jsx. That should be the focus in my opinion for this library. Performance is important but dev-exp is essential.
The thing that I'm saying is, that we should put more effort into improving the developer experience around this library than making it the fastest HTML template engine out there.
Regardless of your opinion on this, I will still keep contributing and using this lib because I believe in the value that provides.

@arthurfiorette I've pulled and rebased the current branch with the changes from the master to solve the conflict.

We could try to strive towards real-world benchmarks but the aim should not make @kitajs/html numbers better.

Honestly, I didn't tried to improve the kitajs/html numbers. Previous benchmarks were unfair to any JSX tool because it template benchs ware a single giant function with a single html``function call and no one creates web pages containing anything from thehtmltag to the innermostp` tag in a single template.
For example, taking the below benchmark:
https://github.com/kitajs/html/blob/2cf8bd53eb7546435f70660b48d85dcde5b4757c/benchmark/renderers/many-components.tsx#L663
it consists of a string of 1477 characters, a variable name and a string of 3416 characters being concatenated multiple times, meanwhile kita was being called 314 times, a jsx call per div created.
I know this is what happens at the end, but no one creates webpages with such giant html`` templates, its awful to maintain and develop. This is why I created a RealWorldPage, containing components, list mapping and many attributes.
I added a benchmark's readme clarifying it and added a note in the performance readme.

I'd love if you could review my grammar :)

Also, thanks for your awesome work in this upcoming PR. Would you like to become a member of kitajs?

We could try to strive towards real-world benchmarks but the aim should not make @kitajs/html numbers better.

Honestly, I didn't tried to improve the kitajs/html numbers. Previous benchmarks were unfair to any JSX tool because it template benchs ware a single giant function with a single html```function call and no one creates web pages containing anything from thehtmltag to the innermostp tag in a single template.
For example, taking the below benchmark:
https://github.com/kitajs/html/blob/2cf8bd53eb7546435f70660b48d85dcde5b4757c/benchmark/renderers/many-components.tsx#L663
it consists of a string of 1477 characters, a variable name and a string of 3416 characters being concatenated multiple times, meanwhile kita was being called 314 times, a jsx call per div created.
I know this is what happens at the end, but no one creates webpages with such giant html`` templates, its awful to maintain and develop. This is why I created a RealWorldPage, containing components, list mapping and many attributes.
I added a benchmark's readme clarifying it and added a note in the performance readme.

I'd love if you could review my grammar :)

I wrote my comment before seeing the updated benchmarks. I believe your assumptions are correct. Now the benchmarks reflect more on what a real-world use of a templating library looks like. But, in my opinion, we are still falling short of showing how performant using suspense is in certain cases; moreover, the fact that some of those "competitors" don't support it. I will try to come up with something, in the future after we close this PR, to highlight better this aspect.

Yes, for sure!

Invite sent :)

I will try to come up with something, in the future after we close this PR, to highlight better this aspect.

Maybe these benchmarks should only measure the overhead Suspense and renderToString brings to it. Something like rendering a 1s sleep suspense ends up in 1.2s, then .2s was the overhead.

I've added changesets, before commiting any feature, please run pnpm changeset, choose all changed packages by your feature and add a release note to it. Changesets will automatically bump versions, create a GH release and a changelog.md

Tasklist:

[x] Update links and references inside all package jsons.
[ ] Ensure tests are working on all packages
[ ] Test CI/CI
[x] Test changeset
[x] Update docs and reference links
[ ] Do a simple publish --dry-run to ensure all files are being bundled correctly
[ ] See if there's no missing or left configuration files
[x] Update monorepo readme's
[ ] Create a CONTRIBUTING guide to teach how to use pnpm changeset before commit.

Regarding ts-html-plugin I'm not sure what's going on with these tests, but its probably related to the @kitajs/html types, as when I change "@kitajs/html": "workspace:^" (linked locally) to "@kitajs/html": "3.1.1" (downloaded from npm), tests starts to pass.

Tasklist:

[x]  Update links and references inside all package jsons.
[x]  Ensure tests are working on all packages
[ ]  Test CI/CI
[x]  Test changeset
[x]  Update docs and reference links
[ ]  Do a simple publish --dry-run to ensure all files are being bundled correctly
[ ]  See if there's no missing or left configuration files
[x]  Update monorepo readme's
[ ]  Create a CONTRIBUTING guide to teach how to use pnpm changeset before commit.

Regarding ts-html-plugin I'm not sure what's going on with these tests, but its probably related to the @kitajs/html types, as when I change "@kitajs/html": "workspace:^" (linked locally) to "@kitajs/html": "3.1.1" (downloaded from npm), tests starts to pass.

I've figured out the issue related ts-html-plugin tests not passing using the kitajs/html workspace version. Debugging the ts-server was a pain. Hope the fix is good enough. The issue was a mix of things, starting from how pnpm links packages to how typescript resolves them in different ways depending on the status of the file system.

I've figured out the issue related ts-html-plugin tests not passing using the kitajs/html workspace version. Debugging the ts-server was a pain. Hope the fix is good enough.

For the love of god thank you!!! ts-server is a MAJOR pain.

I'll review it asaic. In the meantime, this article have been sent to me regarding  closing tags. Should we also remove it from kitajs/html?

In the meantime, this article have been sent to me regarding closing tags. Should we also remove it from kitajs/html?

React still uses self closing tags, so let's just keep it in this way.

I think were ready to merge. @JacopoPatroclo is there anything else missing?

I think were ready to merge. @JacopoPatroclo is there anything else missing?

@arthurfiorette  I think we should do a release candidate of the packages to test them inside some real projects. Just to make sure that they all are working properly. Can you manage to do that? I will test them on some of my projects as well. After that, we can close this PR.
If you like I could add Nx to enable caching and task orchestration to the monorepo. Of course, I will do it in a separate PR. Is there a place where we can discuss stuff like this outside of PR's comments?

I think we should do a release candidate of the packages to test them inside some real projects.

Me too, I'll just merge this to main because the changeset is set up there...

If you like I could add Nx to enable caching and task orchestration to the monorepo.

Pnpm already does caching, task orchestration isn't needed for now as no complicated build step is required. Changesets already does releasing stuff too, so I think its enough for now.

Anyways, thanks for the big effort you've put in here :)

Is there a place where we can discuss stuff like this outside of PR's comments?

Yes, add me on discord: @arthurfiorette


Laplacian needs upsampling of Gaussian filtered output?

https://github.com/mtyka/laploss/blob/7a1025ee1a35f779f10d61b6e88b5ee369b8f8fb/laploss.py#L28
I noticed that the Laplacian on each layer is not conducting  up-sampling. If I recall correctly, The equation of Laplacian image at layer i is

In the current implementation it looks like The second term in the equation is not expand(G_{i+1}) but rather, gaussian_smoothing(G_i). Should it not be:
t_gauss_down = downsample(t_gauss) #
t_gauss_up = upsample(t_gauss_down) #Upsampling, could be nearest for example
t_diff = current - t_gauss_up

Ref:


x/mobile: gomobile cannot add extra so library

My go project use a so library, such as example.so. After I using gomobile to make an aar and build it in android apk, I get the error that couldn't find the library example.so. There is only ibgojin.so in the aar, example.so is missing.

Following is my build command.
CGO_LDFLAGS="-L$(libs_dir)/android_arm64" CC="$(android_ndk_bin)/aarch64-linux-android30-clang" gomobile bind -ldflags "-s -w" -v -target=android/arm64

(CC @golang/android @hyangah)


Some style error at Safari

Nova Version: 2.0.1
Safari Version: Version 12.1 (146<IP_ADDRESS>.4)
When i use to a fresh installed Nova app, in my Safari brower the top looks some little error.
But at Chrome is seems nothing wrong.
Here is the screenshot.

btw. Thanks for the good theme. <B

This bug actually lies within the dependency nova-fixed-bars on issue-2.
The problem amongst a struggle for time to work on open source stuff, is testing on Safari since I'm a linux user and I'd really like to avoid installing WINE for this... If anyone is willing to help out an submit a PR, I'll buy you a beer :beer:

@bolechen Does this still happen using 1.0.2?

Fixed javascript in Nova Fixed Bars 1.0.6. Please let me know if the issue persists.

wow~ 1.0.6 worked for me, thx for your quick response.


I can't use my proxy

Hello,
I'm trying to set up my proxy, but I get the following error:
"C:\Program Files\nodejs\node.exe" D:\Projets\lbc_scraper\index.js
Try the full version of the fingerprint service which has advantages over the free one:

- Emulate fingerprints for other platforms and browsers.
- Increased limits when receiving a fingerprints from the service.
- Filters by tags, versions, screen resolution and many other parameters.
- Popular perfect canvas queries are already included in the received fingerprints.

If you want to buy the full version, please visit this website - https://bablosoft.com/directbuy/FingerprintSwitcher/2.
D:\Projets\lbc_scraper\node_modules\browser-with-fingerprints\src\plugin\connector\index.js:56
        throw new Error(prepareError(error));
              ^

Error: Failed to get proxy ip
    at D:\Projets\lbc_scraper\node_modules\browser-with-fingerprints\src\plugin\connector\index.js:56:15

Node.js v20.13.1

Process finished with exit code 1

const {plugin} = require('puppeteer-with-fingerprints');

const proxy = 'https://pr.oxylabs.io:7777';
plugin.setServiceKey('');

(async function run() {
    const fingerprint = await plugin.fetch({
        tags: ['Microsoft Windows', 'Chrome'],
    });

    plugin.useProxy(proxy);
    plugin.useFingerprint(fingerprint);
    // Launch the browser instance:
    const browser = await plugin.launch({
        headless: false,
    });

    // The rest of the code is the same as for a standard `puppeteer` library:
    const page = await browser.newPage();
    await page.goto('https://ipv4.webshare.io');

    // Print the browser viewport size:
    console.log('Viewport:', await page.evaluate(() => ({
        deviceScaleFactor: window.devicePixelRatio,
        width: document.documentElement.clientWidth,
        height: document.documentElement.clientHeight,
    })));

    // await browser.close();
}());

Impossible to correct, even going through the args option: ['--proxy-server=...'] I get the same error.
Whereas if I use puppeteer natively and the args argument, it works fine:
...
    const browser = await puppeteer.launch({
        headless: false,
        args: [`--proxy-server=${proxy}`],
    });
...

Very nice day :)

Hello. There is a difference between using a proxy in a regular puppeteer and in a plugin. The plugin automatically tries to get the output IP address of your proxy and use it, among other things, to perform substitutions.
By default, one specific service is used, but problems may arise with it, so you can specify and use your own, here was a similar problem and solution - #119.
You can also disable IP extraction logic at all:
plugin.useProxy('your_proxy', {
  detectExternalIP: false,
});

But I do not recommend doing this, as it can greatly reduce anonymity.

I understand!
Thanks for the reply and your responsiveness :)


Add Cardano Sidechains content:NOT TO BE MERGED

…u item
This PR is NOT TO BE MERGED until further notice

The scope of this PR has changed since we're going a phased release of the docs. I suggest to close this in favor of https://github.com/input-output-hk/cardano-documentation/pull/447

All the changes in this PR have been made in the Master branch, except for the correction of Peter Gaži's name.


El Capitan: Mount rejected

Hmm... I remember using Disk Arbitrator more than a year ago and it seemed to work w/o problems.
I'm now using it on 10.11.6 - mode "Read-only", Activated, and whenever I put a new USB stick (FAT32),
it writes "Mount failed: disk1s4"
The device does appear in DA's list of devices, but not in Finder (duh).
Is there anything can be done? I just want my USB stick mount as read-only for the purpose of stopping OSX putting Spotlight index files, Trashes, and all that crap... :)

Is there a solution to this? I also have this problem on macOS Ventura

++ on macOS Monterey


installModes options

 installModes:
  - supported: false
    type: OwnNamespace
  - supported: false
    type: SingleNamespace
  - supported: false
    type: MultiNamespace
  - supported: true
    type: AllNamespaces

Currently the gatekeeper operator uses AllNamespaces install mode but it is not working as expected due to gatekeeper-operator needs to set ownerReferences on gatekeeper objects. If gatekeeper CR is created in a namespace different than gatekeeper-operator's namespace, you will see following errors:

2020-11-17T21:56:37.061Z	ERROR	controller	Reconciler error	{"reconcilerGroup": "operator.gatekeeper.sh", "reconcilerKind": "Gatekeeper", "controller": "gatekeeper", "name": "gatekeeper", "namespace": "openshift-openstack-infra", "error": "Unable to deploy Gatekeeper resources: Unable to set controller reference for gatekeeper-system/gatekeeper-webhook-server-cert: cross-namespace owner references are disallowed, owner's namespace openshift-openstack-infra, obj's namespace gatekeeper-system", "errorVerbose": "cross-namespace owner references are disallowed, owner's namespace openshift-openstack-infra, obj's namespace gatekeeper-system\nUnable to set controller reference for gatekeeper-system/gatekeeper-webhook-server-cert\ngithub.com/font/gatekeeper-operator/controllers.

So in my opinion, the OwnNamespace install mode is more appropriate.

@ycao56 is this still an issue?

no longer an issue


Add tests for controller loader

Part of https://github.com/microsoft/vscode-jupyter/issues/11648

Codecov Report

Merging #12315 (f5ccb44) into main (21ce487) will increase coverage by 0%.
The diff coverage is 91%.

:exclamation: Current head f5ccb44 differs from pull request most recent head 46e9b08. Consider uploading reports for the commit 46e9b08 to get more accurate results

@@          Coverage Diff           @@
##            main   #12315   +/-   ##
======================================
  Coverage     69%      69%
======================================
  Files        497      497
  Lines      31460    31441   -19
  Branches    4925     4921    -4
======================================
  Hits       21981    21981
+ Misses      7634     7618   -16
+ Partials    1845     1842    -3

Impacted Files
Coverage Δ

...ers/commands/serverConnectionControllerCommands.ts
31% <0%> (ø)

...otebooks/controllers/controllerPreferredService.ts
76% <ø> (+3%)
:arrow_up:

src/notebooks/controllers/types.ts
100% <ø> (ø)

src/standalone/api/api.ts
31% <0%> (ø)

src/notebooks/controllers/controllerLoader.ts
83% <100%> (+1%)
:arrow_up:

...rc/notebooks/controllers/controllerRegistration.ts
94% <100%> (ø)

src/notebooks/controllers/controllerSelection.ts
100% <100%> (ø)

src/standalone/api/kernelApi.ts
71% <100%> (ø)

src/kernels/errors/kernelErrorHandler.ts
56% <0%> (-2%)
:arrow_down:

src/platform/api/pythonApi.ts
70% <0%> (-1%)
:arrow_down:

... and 8 more


vakata-dnd and contextmenu elements not accounting for body scroll

Firstly, great software. Really enjoy using it.
My issue is small and I am sure easy to fix, but I create this question due to lack of understanding from me.

When I scroll on the main body, the contextmenu and vakata-dnd elements are out of place by the exact scroll amount. Like I said, I am sure I just missed something in the documentation, but it would be great if you could send me in the right direction for a fix.
The doc viewer is in an iframe, but the records tree is injected into a div.
How do I get jstree to use the scroll amount to set the offsetTop of the elements.
Appreciate it.

Just remove position: relative on the body.

Sorry I could not help sooner - I gather you found your fix? Let me know if I should reopen.


feat: introduce auth configuration

What this PR changes/adds
Introduces a configuration extension for associating an auth implementation to a web context with configuration.
Introduces an ApiAuthenticationProvider which creates a AuthenticationService based on the input config.
The configuration plugs into the web.http.<context> mechanism adding a nested key for configuring the authentication for the specific <context>. For example for configuring the tokenbased auth for a custom context custom:
web.http.custom.path=/custom
web.http.custom.port=8081
web.http.custom.auth.type=tokenbased
web.http.custom.auth.key=apiKey

Why it does that
flexibility, cleanup, decoupling
Further notes
Some API configuration module explicitly register the AuthenticationRequestFilter and uses custom context name to be used in the ApiAuthenticationRegistry. For backward compatibility that has not been changed. For overriding the AuthenticationService for that specific api context the additional config value context is available
For example for the management context:
web.http.management.auth.context=management-api

Linked Issue(s)
Closes #4294
Please be sure to take a look at the contributing guidelines and our etiquette for pull requests.

:warning: Please install the  to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
Attention: Patch coverage is 92.68293% with 3 lines in your changes missing coverage. Please review.

Project coverage is 75.23%. Comparing base (7f20ba5) to head (516f80f).
Report is 335 commits behind head on main.

Files
Patch %
Lines

...ation/ApiAuthenticationConfigurationExtension.java
91.30%
1 Missing and 1 partial :warning:

...lipse/edc/api/ApiCoreDefaultServicesExtension.java
0.00%
1 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4321      +/-   ##
==========================================
+ Coverage   71.74%   75.23%   +3.49%
==========================================
  Files         919     1054     +135
  Lines       18457    21155    +2698
  Branches     1037     1182     +145
==========================================
+ Hits        13242    15916    +2674
+ Misses       4756     4722      -34
- Partials      459      517      +58

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

@ndr-brt
added some docs on the md file
@paullatzelsperger
I've added in the further notes the next step of refactoring that we could to to remove the AuthRegistry


Multicycle

Finally, time to push multicycle to master. Testing is being done as we speak, but I don't expect any bugs at this point.
A lot of things have changed compared to master:

Multiple cycles on a single controller
Multiple setting files, one for each cyle
The code has become a lot more readable
Things have become a lot more efficient
Probably more...

So it turned out there was one bug left. Almost a case of premature merging. It's fixed now.


Unable to navigate neighbouring breadcrumb items using arrow keys

VSCode version: 1.54.0-insider
OS: macOS Catalina 10.15.7

Steps to Reproduce:

Focus the breadcrumb using command-shift-.
Breadcrumb is now focussed with dropdown open
Press <left> or <right>
Nothing happens instead of focussing on the previous/next breadcrumb item as described in the doc: https://code.visualstudio.com/updates/v1_26#_breadcrumbs
Similar thing happens when using command-shift-;. When dropdown is not opened, pressing <left> or <right> still works, but once the dropdown is opened using <enter>, I'm just stuck in the dropdown

Does this issue occur when all extensions are disabled?: Yes

That's the workbench tree eagerly eating left/right-arrow keys

I wonder if it's a recent regression?

I wonder if it's a recent regression?

No, this has been like it ever since. The commands that bind left and right aren't properly guarded with context keys.

This line eats left / right arrow keys.
https://github.com/microsoft/vscode/blob/992cf6bd44d89f85b50199d52ff34ca14fd5358f/src/vs/workbench/browser/actions/listCommands.ts#L204
This secondary key binding will work.
https://github.com/microsoft/vscode/blob/992cf6bd44d89f85b50199d52ff34ca14fd5358f/src/vs/workbench/browser/parts/editor/breadcrumbsControl.ts#L566

Fixed by https://github.com/microsoft/vscode/commit/e5bcb02e1e9a32fb4ba1760914120dd219d25a4e