luci-app-siitwizard: web page shows "Model 'clamav' not found"

Steps to reproduce:

opkg install luci-app-siitwizard
go to: Network → SIIT 4over6 assistant

Actual behavior:

Runtime error
Unhandled exception during request dispatching
/usr/lib/lua/luci/ucodebridge.lua:23: /usr/lib/lua/luci/cbi.lua:53: Model 'clamav' not found!

Additional Information:
OpenWrt version information from system /etc/openwrt_release
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='23.05.2'
DISTRIB_REVISION='r23630-842932a63d'
DISTRIB_TARGET='mediatek/filogic'
DISTRIB_ARCH='aarch64_cortex-a53'
DISTRIB_DESCRIPTION='OpenWrt 23.05.2 r23630-842932a63d'
DISTRIB_TAINTS=''

Probable Cause:
Should the "clamav" be changed to "siitwizard" in this line?
https://github.com/openwrt/luci/blob/835ac7529e5cbd5a855fbc3ae07033b11e8d4ed3/applications/luci-app-siitwizard/root/usr/share/luci/menu.d/luci-app-siitwizard.json#L7
https://github.com/openwrt/luci/commit/625abbfdbe94dada023ebd8ea69778173d1a7351#diff-f44880b78c0e61b0fa3bed9999472416568a145bc4f3a5976385a2a19b6a1ef2R7

It certainly looks like it. I can amend that, and you can see whether that fixes your problem.
I don't even know what siitwizard does...

It certainly looks like it. I can amend that, and you can see whether that fixes your problem.

I edited the file luci-app-siitwizard.json like in your commit, and the web page showed up successfully.

I don't even know what siitwizard does...

Neither do I. It turned out what I need is kmod-nat46 instead of kmod-siit, so I stopped digging siit side of things.

First of all thanks for your commit.

It certainly looks like it. I can amend that, and you can see whether that fixes your problem.

I edited the file luci-app-siitwizard.json like in your commit, and the web page showed up successfully.

I don't even know what siitwizard does...

Neither do I. It turned out what I need is kmod-nat46 instead of kmod-siit, so I stopped digging siit side of things.


Support to print the editor contents

VSCode Version: 1.0
OS Version: Windows 10.0.10586.218

Steps to Reproduce:

Open a File in VSCode or enter some code
Try to print it to a printer

Sometimes paper is unbeatable.

Is printing support still on the backlog?  It is tedious to have to switch temporarily to another editor just to print.

NetBeans handles this very nicely.  Unfortunately the course I am taking (edx, naturally) defaults to Microsoft.

Is editor printing going to be ready soon?
An editor without printing seems strange.

I hope it will be in the pipeline anytime soon in '17 at least for insiders edition of vscode

Should be available.

I am adding this as a wishlist item.

Adding my vote for printing. Sometimes not so much as to dead trees but as to a PDF.

Is there any official answer to why the printer function is not easy?
Such as foundation issues, electron limitations, git version, consideration of security, license issues....

I don't print files frequently, but occasionally I really need a paper copy.
I was shocked, when I tried to print a file for the first time, to find that VSCode lacked this basic facility!  It is standard in almost all editors.  Currently I must switch to another editor, such as BBEdit, for a tidy syntax colour-coded printed copy.  I would prefer to have the same syntax colouring for screen and paper.
I would think this facility should take precedence over some of the tweaks and features recently added to VSCode...
Please, can we have a definite deadline for adding printing to VSCode.

Printing is useful, in addition paper printing, PDF file output or something else are needed in some cases.
Is the root cause is he limit of the foundation? V8 engine or some middle layers.

Please add the ability to send your code to a printer.  You'd think this would have been a 1.0 feature.

One thing to add here -- print isn't necessarily to a printer. It would be very convenient to print the preview window of a diagram (PlantUML) or Markdown file to the Microsoft PDF printer to obtain a sharable document.

I'd really like to be able to print Markdown - nothing is more legible than print on paper, and reviewing (and scribbling) on hard copy is a key part of my documentation workflow.

So, since MSFT is sending a royal we-couldn't-care-less (kind version of what I'd like to say) to all of us because they think this isn't an important feature to address, I've found the following to help those of us that are willing to try and implement this ourselves.  May take a stab at it at some point when time is more on my side if it doesn't get hit on soon by someone.
There's a node.js module dubbed node-printer that @tojocky has developed that brings native printing support to whatever OS you may be on.  Not sure if that would be a good starting point or not:
https://github.com/tojocky/node-printer
Also, found this thread that has some good insights within it:
https://discuss.atom.io/t/silent-print-support-add-to-print-queue/19072
Will keep looking around for options...

I would love this feature, because I have to print code for the university..

 This is absolutely basic.

@roundand About printing Markdown and other editor content:  I'm looking at a few things for that until Microsoft finally adds printing in VSCode:

The vscode-pandoc extension lets you quickly render markdown files as a pdf, word document or html file. I'm exploring this in my workflow.

the TeX capable Markdown+Math extension for more complicated markdown

There's also some tips in the following post for Printing Github Markdown  I'm looking to see if anything be appropriated.

@anthcool had a tip/pointer to the node-printer project.

I just find myself opening up notepad++ and doing the printing. Which sorta indicates that this is probably not that hard to integrate.

+1 We need this feature absolutely!

I am going to add my two cents worth.  As someone else said in a duplicate ticket about this - What are the people who write text editors like Sublime Text, Atom, VSCode thinking???  Well the answer is they are not!  Printing used to be a basic feature of editors but it seems now days developers figure we do not need to print. That is not correct.  Editors like VSCode are used for more than coding.  I use my text editors for note taking, copying text to them to print, as well as coding and even with code I need to print sometimes.  I would like to see the ability to print as well as print selections.
This should be the VSCode developers top priority.

Ok, since I opened this thread, I have the feeling, that I have to write something again:

It's great to see, that I am not alone with my request, which I filed over one year (!!!) ago.
VSCode has come along very nicely since then, including the PowerShell Extension which I use daily.
It's a pity that I still have to use Notepad2-mod for printing. It's IMHO the best combination of code coloring and printing support. It's a workaround I can live with, but I'd really love to have the VSCode coloring in the printout. It's so much better in detail and visibility!
@RangerGH , I don't think there is any need to attack anyone, though I can understand the frustration over the lack of a basic software feature, which nobody would have thought of missing out until Microsoft came up with ISE (Yes, even they did not implement it! You need ISESteroids for hat (which I personally don't like at all)). I am sure these people are thinking a lot about what to implement into their product.
But maybe they sometimes loose the big picture for basic needs over all the bells and whistles they are working on? I know this happens, it happened to me, too, before.

So, to all my fellow requester: thanks for supporting my request and I hope there will be more raising their hand for this request.
And to the developers: please don't make us wait another year until VSCode supports colored code printing. Like @hbarr already noted more generally, I could have easily done without e.g. multiple cursor support instead.

@OtterKring Sorry if it came across as an attack as it wasn't meant to be but simply trying to express a very deep frustration that such a very, very, very basic feature is lacking not only from VSCode, in which I think I finally found a good editor, but most text editors these days.  I haven't gone looking for editors for years and was astounded to find that none of them actually have a native print function!  Back when I last looked printing was a given!!  Yup, not only ISE but Sublime Text, Atom,  and others that I've tried.  Seems like Geany, notepad, and the other older ones are the only ones that implement printing.
Amen to not waiting another year.  Let's get the basics, then build on that.

In my case, it caused me a problem, because a lot of students use it which I first. And our study projects must also be rendered in print.

@RangerGH A big one you missed that's always had a print function: Vim, GVim.  Easy key press or menu direct selection. And the feature options and capabilities are deep.
http://vimdoc.sourceforge.net/htmldoc/print.html
Yeah, I can't believe this still hasn't been addressed. I mean even the Windows default Notepad has print and page setup features. Is there access to the VScode source code associated with implementing a simple print feature the community could work on?

@sc0ttwad3 How can I forget vim which I use every day!
They've been too busy with the bells and whistles as OtterKing said.
Check this out.   Please implement print capability in VSCode or I'll simply go back to Notepad++ (seriously)!

For what it's worth, printing code is very important to me when reviewing code written by colleagues. It's so much more pleasant to print it off and sit on a sofa with some pens. Syntax highlighting, line numbers, etc are really useful, so I want to print from a code editor.

@simonl65 I wish they would do Notepad++ for other operating systems like Linux.
The sad thing is that VSCode is one of the best editors I've found and I've tried Atom, Sublime Text 3, and others some paid, some not but printing is not a priority for some reason.

@RangerGH Agreed, Notepad++ on Linux would be ideal. Like you, I've also tried many editors and I also agree that VSCode is probably the best so far. I'll be sticking with it for the foreseeable, but I HATE having to cut-n-paste from VSCode to NP++ just to print - it's annoying 👎

Is the reason that VS Code can't print is that cross-platform printing is difficult to implement?

There are contents.print and contents.printToPDF commands in Electron, so I don't think sending data to the printer would be the main issue ?

@cecilemuller That's interesting! I see that there are at least two "print" packages for atom https://atom.io/packages/print-code & https://atom.io/packages/print-atom, so it must be possible. Unfortunately they're not compatible with vscode and I've never coded for Electron - anyone else want to have a go at converting the atom packages to vscode (Microsoft, you there?)

At least vscode should expose the electron API so that we can achieve it with extension. #20869

@neilsustc I've +1'd that. I guess we're stck if the Electron API hasn't been exposed :-(

Looking at the VSCode content window using "Help > Toggle Developer Tools", it shows that it would take more than calling Electron .print because the window only contains the lines that are visible given your scroll position in the file, not the whole file being edited (most likely because it would be slow with large files) which I think is the main reason why it's not yet supported in VSCode.

@cecilemuller You make some very useful comments.  Thanks!
One approach might be to create a new (hidden) window that shows the entire file, and nothing else, using the code that vscode uses for the editor area to layout and colour code.  Then all we need to do is to use the existing window print mechanism.
Of course, easier said than done...

I'm wondering if VSCode Tasks could be utilized to somehow "glue together" printing functionality (from a third-party module or tool) to VSCode?
Has anyone investigated the node-printer module?

A workaround for printing I use at the moment is:
install lite-server (NPM intall lite-server)
Run lite server and open the file you want to print in your webbrowser..
In chrome I installed sight extensino for Syntax Highlighting
Now I can (Fairly easy) print form my vscode environment.
However actually getting the print feature implemented would be HIGHLY welcome...

Either make an official Print package or integrate it into the core. This really is ridiculous, even if Atom and Sublime lack the feature too. Atom at least has a package you can install to print... at least it seems that way.

This is shocking to me that there is no way to print, even adding an extension. I am trying to be polite, but it seems quite ridiculous.

I also vote to have a printing feature.
Currently use notepad++ just to print.  It highlights code correctly by language, & has line numbering.
Would be more convenient to be able to print from VS Code, while I have the project files open. :-)
Hopefully this will be added in the next release.  The revamped integrated terminal window was more crucial (and solved all of my problems), so I am willing to wait.

Still no word on the status of printing request?
I remain convinced  Visual Studio Code is the best editor around with the product team and community doing outstanding work with it! The attention to issues and handling of pull requests remains top-notch.  Regarding user requests, however, I find a major way for the community to participate missing.
When Microsoft retired the User Voice for Visual Studio Code site in favor of using GitHub Reactions, original announcement, they eliminated a quick and easy way to view, vote, and prioritize community requests sorted by number of votes.
Maybe a better explanation around how to duplicate missing functionality after the change would make most of this post--except for the original request this thread suggests--unnecessary?
With GitHub Reactions no such central collection and "visualization" of the community's most pressing requests exists; no central, direct and clear view of the collectively expressed and prioritized requests that are being made. Adding a thumbs up on a preexisting issue comment is a solitary and singular event. Are users expected to recursively search through issues to find one similar to their request and add their "thumbs up/thumbs down vote" toward the aggregated emoji? Should every user create a new issue for their request not found and hope others can find it to hop-on?
The full Visual Studio product continues to use a User Voice for Visual Studio site. Why does that much larger and complex product and community still find User Voice to be the best mechanism, while Visual Studio Code does not?
IMHO, using Reactions seems scattershot at best; turning the volume down on the collective voice in favor of singular quieter handling of requests by the product team . Without direct centralized overview ranking of what requests are getting the most votes, what the community is prioritizing, the collective participation ability seems missing.
Requests like this one for simple editor text printing continue to grow without any "official" response and no true idea of how high a priority it has become relative to others. This thread is itself nearly a year and a half old. This basic functionality has been asked for since Visual Studio Code was first available.
Is there a roadblock preventing implementation? Is it not a high enough priority? Can the community assist with development and get this functionality into this product? Can relevant APIs provide greater exposure to extensions, such as @cecilemuller suggestion?

+1 would like to see this feature in vscode

I would like to export markdown preview into pdf.
Supporting printing would allow this.

I would like printing too

I would like printing too!

I'd like printing as well, especially for markdown though. If possible, it would be great to include support for print only stylesheets as well in the workspace settings (especially combined with print to PDF as an option). I imagine it should just use media queries (i.e., @media print {}) by default.

I would like to be able to print both source code and rendered Markdown.
For source code I would like to be able to optionally include line numbers, preferably with the ability to specify whether the line numbers in a selection are those of their original context or restarted for the selection.
Markdown is convenient for those of us who use Visual Studio Code, Atom, GitHub, Bitbucket, and such, but non-developer colleagues do not always have access to those applications and services, so being able to print rendered Markdown to PDF for them would be great.

In addition i would like to see posibility to print all files in a folder or currently opened. Sometimes it's important to make a paper documentation.

Its not just printing to paper that useful. Printing to a PDF or any other non-paper tech. Right now I cut and paste into Notepad++.

currently i'm using intellij for printing, which it does well. vscode would be nice, too.

Printing is very useful!!

Search the store for PrintCode by nobuhito.
Bewildered by the lack of printing support in the official app though.

I couldn't find this in the thread so mentioning it here:
I use a2ps on my linux system to print any source code.
It is "pretty"!!

Since #5953 is out there since 28 Apr 2016, and since at least my clock tells me 22 Mai 2018,
I pretty much assume, that this "closed" issue is far from beeing closed soon, since it seems
not possible for microsoft to include this requested feature for about TWO YEARS now.
Is that correct ?

That would be a great PR story by the way:
Microsoft, creator of Microsoft Windows, is in the 21. century not capable of implementing
a print-me option inside one of its own most important coding products, eventhough
requested by a f* lot of people for more than 2 years now.
Instead, Microsoft seems to refer to already build-in options like notepad.exe, which is already
capable of printing text on such things called printers since 1985.
Programmers of 1985 have been much more capable of doing things right.
It seems that programmers today are only capable of making things more complicated
and worse, instead of focussing on the real important issues like printing code or textfiles
for example.
Why would someone even want to print something? Really.
Why would someone even try to start a computer to open an application?
You could use a black computer screen for looking into a mirror on shiny days instead.
Microsoft: „Be What's Next.“
"Be What's Gone." should be more appropriate - at least one could print something.

But it should not be that huge kind of a deal to implement a single line of text and the powershell call to the printer or something like this.
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/out-printer?view=powershell-5.1
It's a pure certificate of poverty. Nothing else in my opinion.

And weather open-source or not - it's from Microsoft FROM top-notch-developers FOR developers who used sublime-editor or other tools to show their capabilities - hence a pure shame.

It's like a car without the capability of opening the windows or something like this,
trying to convince people coming from cars who might not be that fast and beautiful,
but can open the windows instead.

Coming from a company who invented "Windows" so to speak.

So noone of all you guys tried a pull-request in that issue before - you were just "talking" in here because of plain "boredome", so it's only up to a guy like me hinted by a guy like you to start
a pull-request after 2-years of requesting an issue discussed in here without ANY result hinted by a microsoft guy named #weinand to adressing this issue in here - is that what you are talking about?
Just curious.

@sbusch Sorry Sebastian, VSCode is not my main editor.  It is on trial as my main editor for one project.  VSCode is a mixed bag, with some very nice features and some not so nice ones.
It may be open source, but so are a lot of other commercial packages, and it does belong to M$.
For me, the inability to print files is a killer.  When I want to print, I am forced to return to my main editor (with different rendering choices).
Why should it be necessary to run two editors to have what vscode could supply rather easily?
Why, exactly, do you think M$ is resisting the requests to add that key feature...?  And adding some rather trivial things instead?

Just curious.

You're not just curious @Neohiro79, but I'm not going to keep increasing the noise here beyond this comment.

  M$ owes nothing to users of VSCode. It's open source. Fork it, submit a pull request, don't use it anymore. It doesn't matter what you do really - but at least learn how to be polite and respectful to developers of open source projects.
Similarly, if you have more to say after you submit a comment, find the edit button (I can already see you know how to use it).

it's from Microsoft FROM top-notch-developers FOR developers who use(d) sublime-editor or other tools / is that what you are talking about?

Lack of printing support is a minor inconvenience at best. You can copy and paste to other software to print if needed. There are other priorities for the "top-notch-devs" to focus on. It's also not quite as small as you've implied either. Plenty of considerations to be made in terms – i.e. should rendered markdown be printed, or just raw code period. Pretty code? What about support for HTML and CSS?
It'll get done when it gets done (they haven't closed it and marked it as a wontfix yet). Rants with multiple comments won't get it done faster though. Pull requests might.

@ BinaryBen This is the first feedback from you which really helps getting things solved now. I might wrongly assumed that having VSC distributed by Microsoft itself (https://code.visualstudio.com) is also in great support of Microsoft itself. Hence I might have adressed that issue as you said way to harsh to just "open-source-loving-developers" without any company in the background. But you do know, that the official Microsoft logo is on that page, right?
I've found the edit button, indeed. Sometimes people do have a specific style to make specific points,
and as far as I can tell right now, it might have worked - at least the bees are coming out of their hive.
Some people do appreciate this kind of talking - some don't. That's something I am aware of. But for your sake and wellbeeing I will think about your pain of two statements before making two statements in a row the next time, just as you said, to make things not worse, instead we should focus on SOLVING things.
So I am really thankful for your informations in this last post - and that's no joke.
As far as I can read it, you might be involved in the project in one way or another,
and the problem you're dealing with since two years is not that you do not want to implement it,
but that things are more complicated than thought (as usual in programming) - and that the resources
bound in a simple topic like this like "just printing" are way to heavy for this feature or for Microsoft, so more important things need to be done with the resources you or Microsoft have.
I can live with that. However, if things like this "happen" it might be useful (even for just open-source-developers without a huge company behind) to make a statement or post from those involved in the project that they are aware of the issue, that they take care on the needs of the fan community (or not), and that they are working on it, that it takes longer than expected, and that noone can say right now when it will be done - but it will be done - one way or another.
You can even say we give a shit about it - that at least would be honest and fair - and everybody would know for a fact that it makes no sense at all to talk about it any more.  Pretty simple. Straightforward.
That would be great - don't you think?
Guys like me would not have the need to make statements like I did, guys like you would not be offended by a second or third e-Mail in your account following the chat - and guess what - it would
also decrease the number of incoming e-Mails into your account at all, since I seem to be not the only one having requested this feature over time, hence not the only one popping up in your e-Mail account.
Yes, of course I want .md files to be printed with a style I prefer - and of course I want to be able to define that, and of course I want .html and .css and whatever files to be printed not in raw code but instead as seen in the editor itself with a good and editable syntax-highlighting, because if you are
developer, you do care about things like that. That's not a question, it's a demand.
And THAT would be a killer-feature. THAT would be something which would add the perfect spice to this really awesome editor - while leaving a lot of others on the street. THAT is something I do expect from a company like Microsoft, weather open-source or not - not thousands of new features noone ever heard of and noone has the time to read or go through, but instead focussing on the application itself, that it does what needs first and foremost to be done, while not getting bloated or way to overbloated through the time.
By the way, there is a company similar but not the same like Microsoft, who indeed brought this to perfection, at least as their lovely founder was still alive. And as far as I know, this company did well and is loved all over the world. Something one not really can say about Microsoft.
The arrogance of thinking that an issue like printing can be named or labelled as "minor inconvenience" is in itself a "major inconvenience" - even more having the Microsoft logo on the download-page.
Is it really so hard to understand that people do want and do need to make documentations of their code (ie. for security reasons or to find mistakes or to mark them for better working experience at all with things called markers - or using so called red pens to go through for things you would never see on the monitor itself) - and do NOT WANT TO CHANGE THEIR ENVIRONMENT for this really 'minor inconvenient demand' ?
It would 100% sure decrease the errorrate and bug susceptibility in code at all.
Not only for VSC, but even more for ALL code projects.
Yes, it would release more funny-printed-papers into this world.
But it would make a difference in code-quality and documentation, I am sure of.
Yes, it can be a pain to print code with more than 1000 lines.
But it would be less pain to go through 1000 lines on the monitor sometimes
and still haven't found the error. I've recently found so much errors on a printing sheet
I couldn't believe, I have not seen them on the screen.
And no - sorry, I will not submit a pull-request - since I have no multi-billion-dollar-company
behind - instead I might just change the code-editor and add some more bold negative points
in my head to products of Microsoft - and that's it.
The devil is in the details.
Alone the detail that a REALLY GREAT EDITOR still cannot PRINT is a shame.
Coming from Microsoft - as said - is even more a shame.
But as you would classify it: a minor inconvenient shame.
So peace for all.

The extension PrintCode might be what you're looking for in the meantime.

@cecilemuller Thank you so much for your information.
I've tested it and came to the following conclusions:
@BinaryBen regarding your previous comment above, here shown below:

"I'm sure the team would consider it if you submitted a pull request.. after all, it's just one line right? Please stop spamming this issue though. Some of us our following it in case someone has something of value to add."

Now here comes your requested value:
Do you think or consider it so difficult or close to impossible for the superior-programmers of Microsoft, to take action in just this issue in implementing hence including the great-extension of PrintCode which seems to be open source (and just to be more specific here and then) into the sourcecode of VSC itself, so that it magically might happen to appear inside a new and fresh opened VSC instance by default so that everyone of the community who might want to finally print something might see a "print me" title in the menu bar like expected and having a feature-experience of a print-me panel like expected?
The first possible milestone:
Instead of using my above meantioned Powershell-Command to link inside VSC code to the new-to-be-created TITLE inside the VSC menubar "FILE > PRINT", using an  implemented extension of PrintCode - instead of having to deal with an extra  super-command-console-call "PrintCode" for "just beeing able to print from VSC" AFTER having the need of 1. KNOWING about this extension at all and 2. the need of INSTALLING it first.
This will automatically trigger the browser-print-panel as expected, after beeing clicked under "FILE > PRINT".
Is this possible?

@BinaryBen regarding your previous comment above, here shown below:

"It's also not quite as small as you've implied either. Plenty of considerations to be made in terms ... i.e. should rendered markdown be printed, or just raw code period. Pretty code? What about support for HTML and CSS?"

In a "second milestone" you could release 'the option' to set a printing css-preset-file under preferences somewhere for the "print me" call to be able to decide the default.css file, which will then in return "will-be-able-to-style" a "html-file" temporarily beeing created somewhere, in which you just need to put the following tiny snippet inside (after proper HTML begin-end-tags of course ...)
<code id="stylable-content"><!-- __@SOME_VAR__ to be filled with ALL or only the SELECTED VSC-CurrentTabTextContent(s). --></code>

... hence to be later in the "process" be called by default as exact that HTML page, which PrintCode is referring to in it's description, which will in turn trigger the browser-print panel, and shows me exactly
the above meantioned "temporarily-created-html-and-css-files"?

And in a "third milestone" you could release the option of beeing able to also do this with an implemented .md to .html converter first, before generating the temporarily-printing-template, as above meantioned.

It's also not quite as small as you've implied either

Hope I've described a possible and simple solution you above seemed to request.
I'm really looking forward for a next impressing FEATURE UPDATE on VSC.
And everybody is happy. Including me.

Microsoft Visual Studio Code
Feature Update: Now you can even print!

So to summarise

the workload for the core team does not permit this in the foreseeable future
it's open source, nobody's stopping you from scratching your own itch
print raw or print rendered?

I'm willing to have a crack at this. But I'll need some guidance, devs-who-are-busy.
The approach I propose is to render HTML into a temp file and then shell to an HTML printing utility to print that. Here are my uncertainties. I don't expect a long answer, but I'd really appreciate nutshell guidance and required-reading links or appropriate search terms at least.

As I understand it the VSC editor renders a sliding window of a file using formatting callbacks that are either baked in or provided by an extension, is that right?
I imagine there is some kind of API for paging based on the extents of the window and some sort of "current position" in the file, is that right and where can I learn about it in detail?
Presumably the rendering into HTML does all that good stuff like line numbering, if not you better point me in the direction of whatever does it.
It may be necessary to embed styling, how should I fish that out of VSC? During installation I see a lot of resources of this sort being copied so presumably it's in the file system somewhere.

Once I have HTML and supporting CSS getting it to the printer is fairly straightforward:
rundll32 mshtml.dll,PrintHTML "fullpath\to\file.html"
will pop the printer selection dialog and do all the heavy lifting.
This doesn't help for platforms other than Windows, but I can't help with that. Linux users can either write something themselves or exploit the comprehensive support from FOSS they're always telling me about.

@PeterWone

As I understand it the VSC editor renders a sliding window of a file using formatting callbacks that are either baked in or provided by an extension, is that right?

As I understand after taking a short look into the extension-js-file of the already existing and meantioned extension it might be found in here:
https://github.com/nobuhito/vscode.printcode/blob/master/src/extension.js
look for the getHtml(editor) function (line 126), where the text seems beeing grabbed and the HTML seems beeing build.
The .css and paper-specs are also defined in there.
Since it's MIT-License it should be possible to use this as a fork in a way that an implementation into VSC into the VSC menubar "FILE > PRINT" should be possible as a complete "new" renamed powerful great "now-it-can-print"-extension - which might also be a proper name for the extension itself the longer I think about it.
The only "thing" one might need is the proper-maybe-microsoft-or-node-dev-knowledge of how to do this in a proper manner with an extension in VSC, which might be possible to be grabbed some day or somewhere in the internet when knowing where to look.

I imagine there is some kind of API for paging based on the extents of the window and some sort of "current position" in the file, is that right and where can I learn about it in detail?

As commented above - this might be the "editor.document.getText();" line 128 in the above meantioned extension-js-file.

Presumably the rendering into HTML does all that good stuff like line numbering, if not you better point me in the direction of whatever does it.

I personally think you will not need to take care on something like this - it should be enough just to make the extension work while beeing able to "pass" a custom .css-file (if not use a default.css) into the output before the print-preview of the extension is beeing triggered, which, as far as I can read the extension-js-file code - might start in line 285.

It may be necessary to embed styling, how should I fish that out of VSC? During installation I see a lot of resources of this sort being copied so presumably it's in the file system somewhere.

See comment above - would be the same answer (at least with my knowledge), adding this:
Styling should be an individual custom.css based on a default.css which this extension is already providing inside the extension.js file through an include of an external default.css-file and/or custom.css file beeing defined in/or through the VSC menubar interface somewhere and beeing implemented somewhere in line 285 on a custom.css/default.css include-basis - should be possible in node.js as far as my knowledge goes.

If I can be helpful for you assisting in that issue at all let me know, but my knowledge in this specific framework (node.js) and in building extensions in VSC is far from advanced. However, I might be able to read and edit some javascript.
 It's like talking to a wall ...

Well, here's to hoping this get's put on the calendar for the next year this month in their planning they're doing this iteration.  Really hoping to see it in the roadmap this time.  If I had gobs of time on my hands, I'd try and create a pull request with something legit that could help, but I'm strapped down doing Xamarin dev.
Here's hoping for a miracle!

I recently found the extension PrintCode for VSCode. Not perfect and somehow a strange concept how it enables printing, but it works, is easy to use and does what I want. Happy.

That's pretty awesome and as described, easy, and manages to actually print code! ;-)

+1, waiting for the feature in the future release. Love VSCode

@Cloudmersive - thank you for your piercing insight, I would never have thought of that. How does one configure Notepad to print line numbers and do syntax colouring?

@PeterWone - no need to thank someone for an obvious piercing but still true insight. Why care about the interior of a house if the house itself is not even standing somewhere? Unix line breaks? Who gives a s*** - I want to PRINT - alone the "ability" to PRINT SOMETHING - even if it's just "doohh - I cannot do a proper unix linebreak yet" would be AWESOME. But "NOTHING" because "it cannot unix line break" is still NOTHING - hence LESS than notepad and all other applications worldwide can do. I cannot think of one application which cannot print. Well, videoplayer maybe. And MICROSOFT Visual Studio Code.
Now that I think about it, you haven't really understood the problem yet.
Again:
If the extenstion "printcode" can print - hence the "application" VSC should be able to handle that extension as a build in "add-in", triggered by a text-menue? Don't you think that would be a good start for "beginners".

@Neohiro79 - That one can fall back to notepad is so obvious I think the purpose of the observation was to belittle the desire for better.

There are many possible motivations. I presented a few.
My original MSHTML proposition has problems associated with it. Since then I have been very successful at creating a web service that accepts HTML and CSS and renders it to a printer. I still don't have the other part of the problem, which is making VS Code render to HTML (as it does for the editor).

@PeterWone - I realised that you are on something, but I guess it's just not worth it to try to add another complicate layer into the whole topic, since they don't care about complicated stuff which takes too much time to include - hence my suggestion of just implementing an existing already working extension and add all the flavour later to it.
I'm talking about the extension "printcode" - and no other new solution, since the whole topic is completely messed up.
I think the only problem seems to be the option how it is shown on the printout (hence CSS).
This problem can be easily fixed in my opinion in grabbing the text before it gets printed and just adding a print.CSS-codeline above which in turn will print like specified.
And the user can decide weather to use a "default-print.css" or a "custom-print.css".

The editor (VSC) is not rendering the HTML for print - nor is there a need to. The extension "printcode" triggers the browser to open a "print-panel" as far as I am aware of - hence there is nothing to do than adding a css-line above the to-be-printed-text, whatever it is - and if someone uses other code than html (like javascript or css or whatever) it's up to the community to add to those the ability of syntax-highlighting via "ability-to-print-css-syntax" "ability-to-print-js-syntax" whatever - since Microsoft is not interested in doing it by themselves any time soon.
Like this for example:
https://chrome.google.com/webstore/detail/prettyprint/nipdlgebaanapcphbcidpmmmkcecpkhg

Yes, I agree that an extension is the way for the community to ship it. I just don't like the nonsense of spawning a browser to do the actual printing.
So I'm looking at buhito's code, which is open source, to see how he rendered the code with syntax colouring and line numbers. I hope to combine this with my print service.
At the moment my print service requires the full dotnet framework (not core) because it makes win32 calls to manipulate Windows printer queues. There is a high chance it will be possible to implement this with Core3 but it will remain Windows specific.

As you probably know, VS Code is based on Electron and ultimately HTML5. The syntax colouring extensions are responsible for parsing language elements and indicating colours accordingly but I think Electron does the conversion from plain text to HTML for display. Nevertheless, buhito seems to be able to do it, which is promising.

He didn't as far as I know - he just put the text in plain-text into the browser.
That's why I suggestet to just put a css stylesheet into it. The browser will handle it properly and use this for styling the text as specified in the print-css-stylesheet.

But if you need help let me know - the problem I see is that they still have not even put a "print me" option into consideration - hence even if it works, it's still an extension, not build-in.

He's done a little bit of syntax colouring himself. It's pretty good for JS, very basic for C#. There are syntax colourisers on the web but mostly for JS. I will have a rummage.

Yes, indeed ... it seems he has done some significant changes in the source itself, even the support of an external css stylesheet to be included:
https://github.com/nobuhito/vscode.printcode/blob/master/src/content.js
Instead of syntaxhighlighter he uses codemirror - which is also a great lib for syntax highlighting.
Guess we are only seconds away from a great-VSC-can-even-print-now menue-entry inside the application itself.

I think highlight.js might be a better choice... incredibly comprehensive. I'm been busy learning about extensions and how to integrate them. I can get a Print item into the context menu on the file explorer pane but no luck trying to add one to the File menu even though the docs imply you can.

Have you tried to just do this with the existing extension right now? I mean adding it to the explorer pane.
As far as I can read the source-code, it is already fix implemented, meaning that codemirror related lines are integrated from line 10 to 26.
https://github.com/nobuhito/vscode.printcode/blob/master/src/content.js
If you can switch or make the existing line 10
let mode = funcs.resolveAliases(language);
work for highlight.js and rewrite all other lines to then match with highlight.js instead it might also work.
Note that there also is a codemirror-class line 117-120.
But it would be interesting if it works "at all" via a file-explorer pane, that alone would be a large improvement at all.

As you say he's outsourcing to codemirror. As bloody usual nobody has bothered testing with anything but Chrome and there's a scrollbar across the bottom when I print but adding in another stylesheet can correct that. So I have been tinkering with shell integration and it seems to work in the context menu.

Yes, ... business as usual - but your screenshot looks promising AND awesome. I guess it might be worth it to go for highlight.js since codemirror seems a bit overbloated for just a printout-screen since it's more a editor-like integration into a webpage at all with a highlight system.
Besides the shell integration go for the sidepanel (or explorer pane how you call it)!
The more prominent we can make it the more likely the chance it will also get its menue entry in the right menue.
If you need a printer icon let me know, I'm gonna provide you with one if there is none, but I guess they work with a symbol font.
Did your syntaxhighlighter.js work?

My stuff works so very differently it will take me a while. However, when I release it will not depend on a cloud service. I think I will borrow his idea of using a browser to print, but I will define a setting controlling whether to spawn a browser or call my printing service. With my printing service you pass the name of the Windows print queue that you want used and you supply HTML or a URL from which HTML can be obtained, so it can talk to the same endpoint the browser would.

Hope you will send me a link to that git if you have something to test. Try to make it simple to configure, it must have a default.css - and an option to overwrite those defaults with your own custom.css. And it should be choosable if you want to add the custom.css beyond the default.css just for small corrections or if you want to replace the default.css with the custom.css instead.
If you're using syntaxhighlighter.js I guess there mit not be much to add into a custom.css - but alone the option to be able to might be superior.

I’m trying to use https://highlightjs.readthedocs.io/en/latest/api.html because it’s the only one I’ve found that operates on an HTML string rather than a DOM but I’m having the devil’s own time using it from Typescript.
This<EMAIL_ADDRESS>was easy enough to install and VS Code gives me code completion. It all compiles ok but when the extension is loaded it can’t find highlight.ts
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10

From: Neohiro79<EMAIL_ADDRESS>Sent: Sunday, February 17, 2019 11:06:30 PM
To: Microsoft/vscode
Cc: Peter Wone; Mention
Subject: Re: [Microsoft/vscode] Support to print the editor contents (#5953)
Hope you will send me a link to that git if you have something to test. Try to make it simple to configure, it must have a default.css - and an option to overwrite those defaults with your own custom.css. And it should be choosable if you want to add the custom.css beyond the default.css just for small corrections or if you want to replace the default.css with the custom.css instead.
If you're using syntaxhighlighter.js I guess there mit not be much to add into a custom.css - but alone the option to be able to might be superior.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/Microsoft/vscode/issues/5953#issuecomment-464454710, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFPoOAQqn7Oz8EsonUov_GFL7BmMYcBpks5vOVPWgaJpZM4ISCN8.

Sounds like @types is just a package for highlight.js - might be better to include it inside the extenstion itself, since a package manager might not be the best choice for only one "include".
It sayse This package contains type definitions for highlight.js - meaning that there is no highlight.js included, hence can't find I would guess.

Might be this?
https://www.npmjs.com/package/highlight.js

It’s declared in my dependencies. Tell you what, I’ll create a GitHub repo and push to it and you can grab the whole song and dance from there.
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10

From: Neohiro79<EMAIL_ADDRESS>Sent: Sunday, February 17, 2019 11:17:58 PM
To: Microsoft/vscode
Cc: Peter Wone; Mention
Subject: Re: [Microsoft/vscode] Support to print the editor contents (#5953)
Sounds like @typeshttps://github.com/types is just a package for highlight.js - might be better to include it inside the extenstion itself, since a package manager might not be the best choice for only one "include".
It sayse This package contains type definitions for highlight.js - meaning that there is no highlight.js included, hence can't find I would guess.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/Microsoft/vscode/issues/5953#issuecomment-464455937, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFPoOMbu6yVMoiZXAG43hEIMNc3hIeIZks5vOVaGgaJpZM4ISCN8.

Yes that’s the one
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10

From: Neohiro79<EMAIL_ADDRESS>Sent: Sunday, February 17, 2019 11:20:10 PM
To: Microsoft/vscode
Cc: Peter Wone; Mention
Subject: Re: [Microsoft/vscode] Support to print the editor contents (#5953)
Might be this?
https://www.npmjs.com/package/highlight.js
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/Microsoft/vscode/issues/5953#issuecomment-464456211, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFPoOK8fH5f1agrBxtyH5T2bF7yoMWr4ks5vOVcKgaJpZM4ISCN8.

Sounds good - waiting for the link to inspect ;-)

https://github.com/PeterWone/vsc-print
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10

From: Neohiro79<EMAIL_ADDRESS>Sent: Sunday, February 17, 2019 11:21:44 PM
To: Microsoft/vscode
Cc: Peter Wone; Mention
Subject: Re: [Microsoft/vscode] Support to print the editor contents (#5953)
Sounds good - waiting for the link to inspect ;-)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/Microsoft/vscode/issues/5953#issuecomment-464456406, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFPoOMMFpTe9E--Mb9n83WlUiZEKeRjXks5vOVdogaJpZM4ISCN8.

Is it a working extension already? It does not show up in VSC after copied the whole folder into the VSC extension path. Guess there is a index.js and .vsixmanifest etc. file missing or how am I going to be able to test the functionality?

Run it in VS Code (F5) and it will spawn another copy of VSC with the extension loaded. Open one of your own projects and in the files sidebar right click on a file. It will barf because it can’t load highlight.js but if you edit extension.ts and comment out the imports and the line of code that tries to use highlightjs then it will run. Put a breakpoint on the line where the active editor text is loaded into the variable text and run it, your breakpoint will be hit.
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10

From: Neohiro79<EMAIL_ADDRESS>Sent: Monday, February 18, 2019 12:04:00 AM
To: Microsoft/vscode
Cc: Peter Wone; Mention
Subject: Re: [Microsoft/vscode] Support to print the editor contents (#5953)
Is it a working extension already? It does not show up in VSC after copied the whole folder into the VSC extension path. Guess there is a index.js and .vsixmanifest etc. file missing or how am I going to be able to test the functionality?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/Microsoft/vscode/issues/5953#issuecomment-464461046, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AFPoOOTJQ9t1RK6ke-gRBdlMRy4ALIFPks5vOWFQgaJpZM4ISCN8.

I got the special VSC-load of that folder.
First message inside:
The terminalprocess has beeing terminated with exitcode 1

I think it would be appropriate to move this discussion to issues on our project's own repo.

If you've read all the way to here you would probably like to know the finished product (currently with no known defects) is available from https://marketplace.visualstudio.com/items?itemName=pdconsec.vscode-print.
We ended up sticking with using a browser as an intermediary. It provides two important things: platform independence and print preview. The original brief was completely fulfilled. We also supporting rendered printing of Markdown, and now we're looking at supporting markdown extensions like KaTeX and PlantUML.

Using an extension doesn't allow for easy syntax highlighting. Meaning if I got C/C++ code and want to print it with either VS Printing or PrintCode, both have no clue how to properly highlight the code, without manual input from the user. This is normal from languages unsupported by the current VsCode instance, but is unintuitive and annoying otherwise. This still a needed built-in feature from my point of view.

Using an extension doesn't allow for easy syntax highlighting. Meaning if I got C/C++ code and want to print it with either VS Printing or PrintCode, both have no clue how to properly highlight the code, without manual input from the user. This is normal from languages unsupported by the current VsCode instance, but is unintuitive and annoying otherwise. This still a needed built-in feature from my point of view.

You are mistaken.
VS Code Printing uses highlight.js to do syntax colouring and one of the reasons I chose it is its extraordinary breadth of support for languages. VS Code Printing is written so that when VS Code knows what language, I instruct highlight.js to treat the text as a specific language, otherwise I fall back to using highlight.js language detection.
I believe Stack Overflow recently switched to using the same library.

As far as I remember one of the necessities or proposals I came up with initially was to be able to set a specific stylesheet in case you want special "treatment" - since I basically wanted to "just print" at all - and as Peter meantioned above already he came up with the basic idea of implementing highlight.js by default so to get rid of most needs of implementing some special stylesheet.
As far as I saw in the settings there still is this option - but how it basically works you might need to clarify a bit @Peter

The way it works is highlight.js parses and lexes and marks words or phrases with spans to which it applies CSS classes. The stylesheets determine exactly what CSS those classes imply.

Jesus - now I know less than before. "vs2015" does not sound like a "path-to-a-css-file" - neither do I know how to "style" my code in the case of "hightlight.js is not knowing which language it is". Is there any "useful" and "understandable" link or whatever regarding this topic?

Basically this hightlight.js help helps how?

Jesus - now I know less than before. "vs2015" does not sound like a "path-to-a-css-file" - neither do I know how to "style" my code in the case of "hightlight.js is not knowing which language it is". Is there any "useful" and "understandable" link or whatever regarding this topic?

@Neohiro79 vs2015 is not a path to a CSS file. The files are copies to a cache to improve reliability in the face of transient network paths.
The documentation supplied with my extension directly answers this question in detail.

Yeah, right. Pressing F1 results in this error:
TypeError: Cannot read property 'replace' of undefined
at escape (c:\Users\XXX.vscode\extensions\pdconsec.vscode-print-0.7.15\node_modules\highlight.js\lib\highlight.js:63:18)
at Object.highlightAuto (c:\Users\XXX.vscode\extensions\pdconsec.vscode-print-0.7.15\node_modules\highlight.js\lib\highlight.js:625:14)
at c:\Users\XXX.vscode\extensions\pdconsec.vscode-print-0.7.15\out\extension.js:231:33
at Generator.next ()
at fulfilled (c:\Users\XXX.vscode\extensions\pdconsec.vscode-print-0.7.15\out\extension.js:5:58)
at processTicksAndRejections (internal/process/task_queues.js:94:5)

@Neohiro79 that's new, would you mind gathering up your evidence and logging an issue on my repo?

No, I can do that. Would just be so nice if we could all come to the conclusion that noone knows everything, especially when it comes to web and development.

Thanks, as you know I take a lot of pride in making VSCPrinting absolutely reliable, we can't have this!

Don't worry. No need to hustle really. It works for me if I want to "print" something like in any other application. It's a shame till today that they don't offer a menue entry under files like "print". I just wanted to know the answer for Arturace and others and me, how to implement the css file in case I don't have the syntax automatically applied, and in that case, how to find a "demo" of how to build a proper stylesheet.

@Neohiro79 broadly, if autodetection doesn't handle it this means

VS Code doesn't know what it is and isn't supplying a langId to my extension
highlight.js can't identify it

If you have a language not handled by highlight.js they take requests, and as ever with OSS the fastest way is often DIY and submit a PR.
In some cases when the syntax you want is closely related to a known one you can write a stub extension that registers it. The Arduino extension does this for ino files which actually contain C.

Ok that helps. That means there is no way for me to "write" the css "quickly" by hand - I will need to submit a PR directly to highlight.js to make it work.
And if I don't see a highlighted code in VSC itself, it most likely also means that highlight.js is not knowing this language either, since VSC uses another library to detect code - or uses even the same library?

Using an extension doesn't allow for easy syntax highlighting. Meaning if I got C/C++ code and want to print it with either VS Printing or PrintCode, both have no clue how to properly highlight the code, without manual input from the user. This is normal from languages unsupported by the current VsCode instance, but is unintuitive and annoying otherwise. This still a needed built-in feature from my point of view.

You are mistaken.
VS Code Printing uses highlight.js to do syntax colouring. One reason I chose it is its extraordinary breadth of support for languages. VS Code Printing is written so that when VS Code knows what language, I instruct highlight.js to treat the text as a specific language, otherwise I fall back to using highlight.js language detection.
I believe Stack Overflow recently switched to using the same library.
Syntax colouring does not require specific pathing.

Sorry for not being clear. I am aware of the use of highlight.js and vscode for language detection.
What I meant is that the syntax highlight that I see in vs code is not what gets printed. It's close enough to be readable code, but is not the exact thing. Function definitions of classes don't get any coloring, reference declaration character &  does not get highlighted, macros either, operator overrides, etc.

I am aware of the use of highlight.js and vscode for language detection.
What I meant is that the syntax highlight that I see in vs code is not what gets printed. It's close enough to be readable code,
but is not the exact thing. Function definitions of classes don't get any coloring, reference declaration character & does not get > highlighted, macros either, operator overrides, etc.

That's maybe why VSC is not using highlight.js for it's syntax coloring (hence another library) and in that case I can only guess the theme of VSC itself also plays a role in this, regarding syntax-highlighting.
Do you get the same highlighting when pasting the code into Highlight.js Playground?

I'm sorry to intervene, but I think this conversation is a little bit offtopic because its about an extension trying to fix the missing feature. Do you mind moving the conversation to an issue at the extensions repo?

While you might be right because we seem to talk about an extension, on the other hand this conversation is in fact because VSC is not capable of printing overall - and till today is not doing well in this regard.
But I guess that's too complicated to understand in a thread where it is about the printing feature in VSC.
Sure, if Peter doesn't mind we can just shut up from now on and talk about nothing in a thread about nothing in here - that's anyway what it is all about in here I guess.

I'm sorry to intervene, but I think this conversation is a little bit offtopic

Irrespective of opinion in the VS Code team, the wider community thinks that printing is basic functionality that should have been intrinsic.  As a result, this repo is the first place people look when they want to know how to print.
It's one thing to set priorities and take the position that VS Code is built for extension and if printing is that important someone will get their OSS finger out and build it. It's quite another to object to discussion of it as part of VS Code.
Technical discussion of the bug mentioned above have already moved to the extension repo.

I am aware of the use of highlight.js and vscode for language detection.
What I meant is that the syntax highlight that I see in vs code is not what gets printed. It's close enough to be readable code,
but is not the exact thing. Function definitions of classes don't get any coloring, reference declaration character & does not get
highlighted, macros either, operator overrides, etc.

That's maybe because VSC is not using highlight.js for it's syntax coloring (hence another library) and in that case I can only guess the theme of VSC itself also plays a role in this, regarding syntax-highlighting.
Do you get the same highlighting when pasting the code into Highlight.js Playground?

Yes, I get the same highlighting in the playground as with your extension, minus the colors being a bit different, matching some of my vscode colors. It is the same syntax elements that get highlighted.
My original comment was exactly on this behavior. While your  extension (and others) gets the job done for the printing and some highlighting, it matches the editor theming only partially (probably best of its ability). It might be getting the syntax marking right internally (with the css classes), but it doesn't apply the correct coloring. This might be because of various css classes vscode uses, compared to hightlight.js, as you said. And yes, thanks to the additional stylesheet option, this can be fixed, but it should not have to be fixed...
Knowing that vscode is built on electron, and after some light googling, that it is possible to print using electron, I decided to comment here saying that an extension for this functionality should not be necessary. Implementing it directly into vscode should and would result in expected coloring (what you see is what you get).
All this being said, I hope I will have time to try contributing to this issue by implementing it without an extension.

Yes, I get the same highlighting in the playground as with your extension, minus the colors being a bit different, matching some of my vscode colors. It is the same syntax elements that get highlighted.
My original comment was exactly on this behavior. While your extension (and others) gets the job done for the printing and some highlighting, it matches the editor theming only partially (probably best of its ability). It might be getting the syntax marking right internally (with the css classes), but it doesn't apply the correct coloring. This might be because of various css classes vscode uses, compared to hightlight.js, as you said. And yes, thanks to the additional stylesheet option, this can be fixed, but it should not have to be fixed...
Knowing that vscode is built on electron, and after some light googling, that it is possible to print using electron, I decided to comment here saying that an extension for this functionality should not be necessary. Implementing it directly into vscode should and would result in expected coloring (what you see is what you get).
All this being said, I hope I will have time to try contributing to this issue by implementing it without an extension.

Paper is forced to a "light theme". Most users like the dark themes on screen. Using the same theme for paper and screen won't work.
There are serious technical challenges in printing cross platform. You are signing up for a world of pain. Even if you do a great job of it I predict they won't accept your PR even if you make it work because it will require ongoing maintenance commitment they don't want to be saddled with when your day job makes it all too hard.

I'm sure I will encounter those issues and it might go nowhere. Worth a try still. If anything, it's an opportunity to look into an open source project, which I don't usually have the opportunity to do.

@ Arturace
That's exactly why this whole topic makes me crazy. First, I'm not the creator of the extension, that's Peter, he did all the heavy lifting, I did the heavy ranting beforehand as you might see in this whole thread. Second, if it would not be Peter - it would be exactly noone in here doing anything at all regarding this topic - it still does not exist - printing - what's that? Who potentially might need something stupid like that, even more in an editor writing code only?
Peter tried to implement the feature, but figured out it was way to unpredictable for different reasons to trigger the print event on different systems, so we found the perfect solution in "printing to the browser" - which everybody has on his machine, and also is pretty familiar in using.
Then he also came up with the perfect fix to get the syntax right. Since you meantioned electron, I can only assume they used "some other highly recommended node-package" to get and make the syntax-highlighting feature work in the editor.
Since both syntax-highlighting features seem to have different "views" on how to highlight the code you will get a different output, assuming that they do not use "highlight.js" - and also like Peter meantioned - assuming you're using a dark background or another theme in VSC.
Now here comes the final beauty:
Since they are more interested in adding other "important features" noone really need or asked for each month you can just skip this whole issue or thread or whatever and go with Peter's solution - since as far as I can say it's the best you can - and will ever get.

It's a shame - and it's a pain in the a* - but it is what it is.
But what they can and will do is trying to shut you off or complaining about you talking about this very topic in a thread about this very topic, like the one you've recently seen above.

https://github.com/microsoft/vscode/issues/73693

Still no native printing?

If your VSC editor is "up to date" and you're looking into the first menu named "file" && cannot find or see anything looking like "P" for "Print", then you might come to the conclusion I stumbled upon a long long time ago, asking myself, "am I stupid" - "that can't be true" - it's Microsoft - sure they do have an option to print something.
But no, they don't. And no, they won't.
So to answer your question "in short":
No.

Microsoft can make a credible argument that [a] it's a minority of VS Code users who want print and [b] there are two extensions that support this, and one of them is even maintained. By doing a good job of this I have pushed it so far down their priorities as to make it unlikely ever to happen.

Yeah ... well, as usual Peter, you find a way to express nice diplomatic words around this f*-up.  :-)

Want to see me be un diplomatic?  The context menus are dynamic and you already can contribute to them. They are (re)created when they are shown. The main menus could be handled as context menus created when they are shown and positioned under the menubar item that shows them. This is how the recent files menu works so don't piss in my ear and expect me to get a warm feeling about it.

I knew it I'm not alone in the dark! :-)
But wait, since the threadthreats seem to be a real threat in here: Please be quiet now. Please move along. There's really nothing to discuss in here.

It is an open source project. I could take it on myself to re-engineer the menu system. I might even do that, one day...

I don't think that's worth the time, just to figure out how to put a single text-string into a menu you need to clone a "gigabyte" project. I mean what a waste of resources.
I was looking a little bit into the electron documentation, since it's javascript-based:
https://www.electronjs.org/docs/api/menu
Maybe try this:
Menu.getApplicationMenu();
To append "something":
menu.append(menuItem);
Also:
https://www.electronjs.org/docs/api/menu-item

Additionally, you might want to look into this example, since it's Javascript, this should work:
https://codepen.io/neohiro79/pen/xxgzywm?editors=1111
Since I haven't worked with electron yet, I cannot tell if this works - but since it's Javascript, it should.

They've been intelligent.

LOL ... :-) I thought so.

Unwatching this issue. Not constructive. 🙁

@PeterWone I've moved this topic out to your repo since I knew there would at some point some children in here cry out loud, who cannot handle even the most basic and simple discussions.

@PeterWone I've moved this topic out to your repo […]

Good idea. Thanks.

I did not expect to find people arguing for years over a feature that exists in every text editor known to mankind. Where's the beef?

It's July, 2022 and Microsoft is STILL intransigent about adding a basic feature that should be built in, like it is in every other code editor in the world!

Any updates on this?

Haven't you heard? We live in the paperless office of 1978. We have transcended the primordial written communications based on tree pulp and squid ink.

i use this for printing

Thanks.  I'll give that one a try.  EVERY other plugin I've tried has been horrible about colors matching what is displayed in the editor.
Greg

From: xemulat @.>
Sent: Tuesday, September 13, 2022 10:51 AM
To: microsoft/vscode @.>
Cc: Gregory Dyess @.>; Comment @.>
Subject: Re: [microsoft/vscode] Support to print the editor contents (#5953)
i use this for printing
[image]https://user-images.githubusercontent.com/98595166/189948025-b734b7d4-f2e3-49a0-bbcd-f182bfd27a01.png
—
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/vscode/issues/5953#issuecomment-1245608135, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFCDAI4QQQVCS64CDJZM25DV6CPH3ANCNFSM4CCIEN6A.
You are receiving this because you commented.Message ID: @.***>

@DyessGG did @xemulat's recommendation work well?

When he says "every other" he means the only other.
Expecting printing to use the editor colour scheme is absurd. Most people use dark mode. If you change just the background colour (paper is white) the contrast levels are too low. This is why I didn't do it when I wrote the Print extension.
PrintCode is buggy and was abandoned in 2019 which is why I created Print -- I have addressed the entire issue backlog of PrintCode, fixed several design flaws, added major features like support for remote workspaces, and the ability to print Markdown rendered and styled.

I've not had a chance to try xemulat's recommendation yet.
Yes, I DO expect printing to be a true representation of what is on the screen.  (I don't use "dark mode".  I can't stand it!.)  I DO expect things that are the same color on the screen to be the same color on paper.  Visual Studio has been able to do that in every version I've ever used.  I expect no less from a "modern" code editor/IDE.

Why is Microsoft so obstinate about this?  Are they trying to "virtue-signal" in "saving trees" by not allowing their users to print?

they are just lazy

Please lock this. We don't need the notifications every time someone is mad when they realise print (still) isn't supported.

I've not had a chance to try xemulat's recommendation yet.
Yes, I DO expect printing to be a true representation of what is on the screen.  (I don't use "dark mode".  I can't stand it!.)  I DO expect things that are the same color on the screen to be the same color on paper.  Visual Studio has been able to do that in every version I've ever used.  I expect no less from a "modern" code editor/IDE.

Why is Microsoft so obstinate about this? Are they trying to "virtue-signal" in "saving trees" by not allowing their users to print?

Given that you use a light theme, it is not completely out of the question to rip the colour scheme and generate a suitable CSS file. However, there isn't perfect correspondence between the symbol taxonomy used by VS Code and the one used by highlightjs, which is the syntax colouring engine I use to generate tagged HTML.
Unless you feel like branching highlightjs and extensively rewriting it, the best you're going to get is "similar". Have a look at this page where you can see rendered samples of various languages and try different schemes till you get something close.
All of the light themes on that page are available with Print.

@DyessGG I discovered I had a bug interfering with colour scheme delivery such that the fallback scheme was used.  It's quite possible that you tried to use the Visual Studio scheme and actually got the Atelier Dune scheme. I have fixed this, so you may wish to check out the latest release of Print and see whether you can find a colour scheme close enough to suit you.

@PeterWone Your extension is a lifesaver. Seriously, thank you!!

Does this issue imply only printing code or does this include also printing the content of the WebView panels?
I'd love to see this second part implemented. Print for abcjs extension, which renders a music score into a PDF would be a life-saver!

@alensiljak Microsoft is unlikely ever to directly support printing of any sort directly in VS Code. Only a small fraction of users seem to care and most of those use an extension like mine. In respect of printing a music score I actually looked into supporting this - specifically with abcjs -  but at the time nobody expressed any interest. It's not out of the question. If you raise an issue on my repo we can discuss possibilities.

Anno 2023. No print. Strange.

I am chief architect at a firmware security company. I needed to analyze complex code with a centennial. When I mentioned this idea, he and the interns laughed. Then I asked him to open gedit, copy-pasted, printed, went to the cafeteria, grabbed a couple of tea cups, and quietly analyzed and discussed the code. It was not trivial. We solved the problem.
The guys were surprised. :)

I am chief architect at a firmware security company. I needed to analyze complex code with a centennial. When I mentioned this idea, he and the interns laughed. Then I asked him to open gedit, copy-pasted, printed, went to the cafeteria, grabbed a couple of tea cups, and quietly analyzed and discussed the code. It was not trivial. We solved the problem. The guys were surprised. :)

This mode of use was a primary motivation when I wrote my Print extension. That's why I went to the trouble of supporting line numbers when printing selections (not just for entire files) and it's why there's an option to change the line spacing to line and a half or double spaced - it gives you room to handwrite annotations.

@PeterWone link to your extension pls?

@dgutson https://marketplace.visualstudio.com/items?itemName=pdconsec.vscode-print
https://github.com/PDConSec/vsc-print
Or just search for Print directly from VS Code extensions pane.

Honestly I consider @PeterWone to have solved this issue with their extension. What else would anyone like to see added honestly?

The bus factor. What if MS does a breaking change and Peter is no longer available to maintain it? It has to be forked, etc.
It is time for MS to formally make it part of the product.

The bus factor. What if MS does a breaking change and Peter is no longer available to maintain it? It has to be forked, etc. It is time for MS to formally make it part of the product.

This is the point of open source, surely? Nothing would stop them from on-boarding it if reports of my demise were accurate.
As a matter of interest, I just refactored the whole thing to support language associated rendering providers implemented as separate extensions. This means if you want special handling for a particular format you can achieve this without having to build a whole system for queuing and cross-platform browser wrangling. Printing of rendered Markdown is the original use-case for this, and it's re-implemented to internally use the API. There's a sample extension for printing SVG files. This is intended as a simple worked sample (you don't have to do much to embed SVG in a web page).
Refactored like this, Print proper really should be integrated into VSCode. Apart from anything else, once you have all the machinery for generating and styling HTML, there's very little remaining in building a preview pane. I was planning on getting a demo of this into shape as preparation for pitching official adoption of my project.

Nobody prints their code. What you are asking is a 1 in a million usecase.

Judging from the number of times this has been requested and the number of people clamoring for it, I believe you are incorrect.  I print code all the time when I'm reviewing it or when I know I will be away from my computer and I need to mark it up.
Greg

From: Rok Kralj @.>
Sent: Saturday, March 4, 2023 11:54 AM
To: microsoft/vscode @.>
Cc: Gregory Dyess @.>; Mention @.>
Subject: Re: [microsoft/vscode] Support to print the editor contents (#5953)
Nobody prints their code. What you are asking is a 1 in a million usecase.
—
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/vscode/issues/5953#issuecomment-1454821249, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFCDAI73GKOGXXXJ4B4QCSDW2N6U5ANCNFSM4CCIEN6A.

People DO want to print their code.  That is why we are asking for the capability.
Other programming environments provide printing as a standard.
I have been writing code, in many languages and environments, and printing it out for decades.
If you only write simple stuff, you can make do with looking at it through the keyhole of a screen.
But for large and complex programs, I find it best to review code with a printed copy so i can write on it.
There are so many advantages in doing it that way.

On 4 Mar 2023, at 17:54, Rok Kralj @.***> wrote:
Nobody prints their code. What you are asking is a 1 in a million usecase.
—
Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode/issues/5953#issuecomment-1454821249, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFKJ2Q5HJHSG4HTQDRNV2A3W2N6U5ANCNFSM4CCIEN6A.
You are receiving this because you were mentioned.

Nobody prints their code. What you are asking is a 1 in a million usecase.
Maybe "Export to PDF" could be useful, but print that PDF however you see fit.

Uninformed, unconstructive, and overall unnecessary addition to this conversation, but thanks for your opinion?

Nobody prints their code. What you are asking is a 1 in a million usecase.

500 nobodies install my print extension every day. I'm fairly sure the user base for VS Code isn't 500 million.

Let me explain you the use case that I concretely was going through needing the functionality of requiring paper based copies of the source code.
I was teaching c language to young children aged 12 to 14 years old.
I had code examples, skeletons, that I wanted them to complete. However to check if they really u understood the code, wanted them to FIRST complete on paper before they could type in the examples.
What is wrong with this approach? Seems your feedback is very narrow minded. A decent source code editor should be able to print code on a piece of paper.

By nobody I did not mean the literal nobody, chill folks. I meant a tiny fraction. Printing dependencies are heavy and there is no reason the majority of users carry this cost of a tiny minority of users.
This is why I suggested you export the code to PDF, then print the resulting PDF in a program of your choice.
VS code is already quite bloated, and we managed to cut the printing stuff out (see bug https://github.com/microsoft/vscode/issues/166511). So technically your feature request is even farther from being delivered now, and that is definitely right thing to do.

You created a GitHub account in 2022 and you seem to focus on Scala.

Wrong. I created my GitHub account in 2013 and Scala is only my passion, not my job.

Since when are library dependencies are reason not to include a functionality?
Strangely there are 3rd party developers who have added print functionality to vs-code without the need for heavy library dependencies ...
If I would have known that these extensions existed I would have used them to print the papers.
So folks: for your clarity, there will be no print function in vs-code, to ensure you all understand it. Vs-code is an editor that does not need a print function. Only a tiny fraction of users want to print code on paper.
This is honestly one of the most incompetent feedback I've seen in years. Mind boggling.
I printed my source code in visual studio instead.

When I'm on Windows, that is the option I go for.  I do the majority of my work on Linux, so Visual Studio isn't an option unless I save my file on a common location, turn to my Windows machine, pull up the source file and print.
It seems M$ has been intentionally making printing harder and harder to do.  VS2008 was great.  VS2015, you can't even save your page layouts!  Every time I start VS2015 and go to print, I have to reset the margins, headers, etc because they cannot be saved!
I guess the uninformed are more firmly in control at M$ than I thought.
Peter, thanks for your extension.  I wish it were not necessary.
Greg

From: Sven Van de Velde @.>
Sent: Sunday, March 5, 2023 9:07 AM
To: microsoft/vscode @.>
Cc: Gregory Dyess @.>; Mention @.>
Subject: Re: [microsoft/vscode] Support to print the editor contents (#5953)
Since when are library dependencies are reason not to include a functionality?
Strangely there are 3rd party developers who have added print functionality to vs-code without the need for heavy library dependencies ...
If I would have known that these extensions existed I would have used them to print the papers.
So folks: for your clarity, there will be no print function in vs-code, to ensure you all understand it. Vs-code is an editor that does not need a print function. Only a tiny fraction of users want to print code on paper.
This is honestly one of the most incompetent feedback I've seen in years. Mind boggling.
I printed my source code in visual studio instead.
—
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/vscode/issues/5953#issuecomment-1455117495, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFCDAI4WYTDSTXFPGQ3UK3DW2ST3HANCNFSM4CCIEN6A.
You are receiving this because you were mentioned.Message ID: @.***>

This is why I suggested you export the code to PDF, then print the resulting PDF in a program of your choice.[...]

In which way exactly is that different to "printing"? Do you suggest to create PDFs without taking concepts like paper sizes, layouts, colors, text rendering etc. into consideration?

 :-)

Thorsten, stop being abusive.PDF is really an encapsulation of PostScript, which was developed at Adobe for driving displays and printers. If the software can generate PDF, it just needs a generic printer driver to actually print documents. By the way, I have a laser printer. Plenty of people have printersWith a little thought you can probably realise the reasons for that. Sent from my iPhoneOn 5 Mar 2023, at 20:23, Thorsten Schöning @.***> wrote:
This is why I suggested you export the code to PDF, then print the resulting PDF in a program of your choice.[...]
In which way exactly is that different to "printing"? Do you suggest to create PDFs without taking concepts like paper sizes, layouts, colors, text rendering etc. into consideration?
 :-)
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

Some while back @strelec raised [Regression] Vscode has a hard dependency on a printing library (CUPS), but does not even offer printing (#166511). I investigated this. and it's because Electron has support for printing.
You'll never guess how they do it. They generate HTML and pull the chain of Chrome.

Can we lock this conversation please?

Just tried to print some YAML today to review it while I was going to be PC-less temporarily - Ctrl-P doesn't Print. :)

Some while back @strelec raised [Regression] Vscode has a hard dependency on a printing library (CUPS), but does not even offer printing (#166511). I investigated this, and it's because Electron has support for printing.
You'll never guess how they do it. They generate HTML and pull the chain of Chrome.

I mean, if you already have most of Chrome under the hood for HTML rendering, JS runtime, etc. - I've heard worse plans, assuming this hasn't been stripped from the VSCode build.

VS code is already quite bloated, and we managed to cut the printing stuff out (see bug #166511). So technically your feature request is even farther from being delivered now, and that is definitely right thing to do.

So that was Debian-specific CUPS removal. How does that affect the basic build and other platforms (Windows, specifically, doesn't use CUPS).

You'll never guess how they do it. They generate HTML and pull the chain of Chrome.

I mean, if you already have most of Chrome under the hood for HTML rendering, JS runtime, etc. - I've heard worse plans, assuming this hasn't been stripped from the VSCode build.

Sure, but I get a lot of "waah I don't wanna use your hacky extension that drives a browser, I want real printing"

VS code does not have a printing features AND I need to install a 3rd party extension.

Why is installing an extension such a problem? It's not as though you have to pay for it.

Compromise: Printing is an extension. An official Microsoft extension installed on-demand when navigating to a Print option. Somewhat like VSCode does already when it detects a document type that could be handled by a Marketplace Extension?

Compromise: Printing is an extension. An official Microsoft extension installed on-demand when navigating to a Print option. Somewhat like VSCode does already when it detects a document type that could be handled by a Marketplace Extension?

One of the ideal scenarios.

Compromise: Printing is an extension. An official Microsoft extension installed on-demand when navigating to a Print option. Somewhat like VSCode does already when it detects a document type that could be handled by a Marketplace Extension?

One of the ideal scenarios.

Compromise: Printing is an extension. An official Microsoft extension installed on-demand when navigating to a Print option. Somewhat like VSCode does already when it detects a document type that could be handled by a Marketplace Extension?

That behaviour is actually pretty trivial for Microsoft to implement, There's a recommendations mechanism. Source code repos can use it to suggest extensions. There are also "baked-in" recommendations to which you refer. These respond to detected language identifiers, which is how they know to suggest eg the C# tooling. Print applies to damn near everything. What do you think should trigger the suggestion?
There is also the issue of differences between the built-in Markdown preview, which is non-optional and impossible to replace with a better one, and printing via a browser the way I do it in the Print extension.
They ought to use the same rendering pipeline so that you can expect anything that works in preview to work in print. This is why, despite the point-blank refusal of the vscode team to support an API for the Markdown rendering pipeline, I had to use a hack to access it. Because it's not a supported thing, the fellow responsible for the Markdown rendering pipeline (let's call it the MRP I'm tired of typing that) feels free to change things with no regard to anyone else's needs. I have a quarter of a million users but from his perspective only one person cares about this (me).
As a result, the built in MRP is becoming more trouble than it's worth and I'm looking at running my own MRP with common markdown-it extensions baked-in. The problem with this from the user's perspective is it doesn't cater for user driven Markdown extension, and there is drift between the built in preview and printing.
The solution is for me to provide both preview and print. This is an improvement on several fronts:

Preview and print are in perfect sync
Support for new document types via installable language renderers (by default there are three, one for source code with syntax colouring and line numbers, one for plain text and one for rendered Markdown)
When preview is in a browser you can put it on another monitor
You can preview more than one document at a time
This will allow me to resolve Markdown extension clashes eg Mathpix and Mermaid

Frankly I'd be very happy about it if MS put me on the payroll to maintain print/preview. But they won't for a variety of reasons. Some extensions need to render in the browser, which means you have to serve script. This introduces security considerations and potential liability.

Copeeel @memark

It would be great if Microsoft can consult with @PeterWone to improve this part of VS code if they have not already.

Where is File->Print?

Where is File->Print?

The official justification has to do with technical problems in localising dynamic menus. Personally, I find this unlikely. VS Code has handled dynamic menus since day one (the file history) so there must be some other reason they don't want to do it.  Get the menu label text from the contributing extension dynamically and there's your localisation, or not, depending on the extension.
Don't hold your breath.

The official justification has to do with technical problems in localising dynamic menus.

Is this justification public somewhere?

They seemed to have been able to do it just fine with their other products.

From: Jose Angel Torres @.>
Sent: Tuesday, October 1, 2024 10:28 PM
To: microsoft/vscode @.>
Cc: Gregory Dyess @.>; Mention @.>
Subject: Re: [microsoft/vscode] Support to print the editor contents (#5953)
The official justification has to do with technical problems in localising dynamic menus.
Is this justification public somewhere?
—
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/vscode/issues/5953#issuecomment-2387557636, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFCDAI44KPBSMDIKZTJJWQTZZNR7DAVCNFSM4CCIEN6KU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMZYG42TKNZWGM3A.
You are receiving this because you were mentioned.Message ID: @.***>

Print Extension by PD Consulting works good enough for me.
I am not affiliated.

They seemed to have been able to do it just fine with their other products.

Their other products aren't based on Electron. But as I said above, I think the technical obstacles are surmountable and they just don't want to. If you compare Sublime Text with VS Code it's pretty obvious that VS Code was ... heavily inspired by Sublime. And Sublime doesn't have a print facility.


Our first system test!

This can be improved a lot, but we have to capture a beach-head first.

Works locally, works on Travis:
https://travis-ci.org/j2objc-contrib/j2objc-gradle/jobs/77048032#L2741
ptal @brunobowden

LGTM
You should also see if you can validate a build error. E.g. by posting a PR that breaks the Hello World... both the 'java' build and then translated, e.g. using some OCNI junk.

That's a really good point.  Will do

Errors correctly fail:
https://travis-ci.org/j2objc-contrib/j2objc-gradle/jobs/77052795
merging


[0.5pt] Add header - group task

Create page header according to the wireframe:

Page header created according to the wireframe.
This is the link to the pull request


feat: add markers

Link to related issue (if applicable)
#278
Summary of proposed changes
add markers option to custom some markers on the progress bar
...
markers: {
  enabled: true,
  points: [
    {
      time: 10, // marker point time
      tip: 'first marker', // marker point hover display tip
    },
    {
      time: 20,
      tipHTML: 'second marker', // or you can custom marker hover tip by innerHTML
    }
  ]
}
...

Love this feature! For those interested, I've merged it into my fork with a few additional changes. Here's the PR: https://github.com/ClassHook/plyr/pull/8
@ForeverSc feel free to include some of those changes in this PR if you think they're relevant. I'd also be happy to create a separate PR if it's easier.

@sampotts can we get this merged?

Thanks! I'll write up some docs and get this published!

This is awesome, thanks @sampotts I've been really waiting for this release

Thanks, @evansque. The current Plyr UI design doesn't really adapt well to chapter/marker support but it's definitely something we'll consider for the Vidstack UI.

@sampotts Hello, I just (also) took 3.7.0 version, but doesn't work.
Is there something wrong with this code?
var defaultOptions = {             captions: {                 active: true,                 update: true,                 language: 'en'             },             markers: { enabled: true, points: [{ time: 20, label: 'Label 1' }] }         };
new Plyr(video, defaultOptions);


Report seed for failed Proptest tests in CI

Describe the feature
If proptest fails, we have no insight into how to reproduce the failure. We should report the seed used for the test run.
I'm sure there's a native way to do so in proptest-rs.
Additional context
No response

hey @shekhirin I'm down to work on this

looking into proptest a little, it seems it will by default report the seed in stdout and create a proptest-regressions with this failing seed.
It is then recommended to commit this file in order to avoid regression. We could have the CI create a PR on failing proptests to merge the proptest-regresssions file but might be a little much. Let me know where you want to go with this @shekhirin.

https://proptest-rs.github.io/proptest/proptest/failure-persistence.html

@greged93 here's a failure that we recently had https://github.com/paradigmxyz/reth/actions/runs/10615954550/job/29425196986
Now that I look deeper into it, I think it's not a proptest failure, but just a benchmark failing due to bad test vectors that were generated with proptest https://github.com/paradigmxyz/reth/blob/e1a701204d76b3e151d512f5eedd8c678a3fa9b4/crates/cli/commands/src/test_vectors/tables.rs#L82-L83
What we should do is to print to stdout the seed that was used to generate test vectors, so we can reproduce the error in benchmarks locally.

ah got it, will look into getting the seed out of benchmarks


Would like to ask some questions

Hello, I recently made sirius development, i am gald to see your project, but there are some questions about the project? For example, how to package the project into eclipse plugin.There are some graphical problems too.I hope you can get help from you. my email is<EMAIL_ADDRESS>Looking forward to your reply

Hi there,
The projects are already Eclipse plugin projects so you can just export them or include them in an updatesite or something. Look into some tutorials for Eclipse plugin development, packaging & deployment. That is a whole topic, start reading here http://lmgtfy.com/?q=eclipse+export+plugin
What graphical problems are there? I'd rather discuss it here so other people with similar problems can benefit. I suspect that if you are using a newer version of Eclipse/Sirius some incompatibilities would be present.

If you are interested in learning more about Eclipse I could recommend the Vogella tutorials and books
http://www.vogella.com/tutorials/EclipsePlugin/article.html

Thank you for your prompt reply


Android Fetch and Graphql requests hang for several minutes

Description
in a Expo project Fetch and Graphql requests sometimes hang for several minutes before being sent, even after APK build,
I tried to fetch jsonplaceholder.typicode.com and hanging still occurs
Here is Logs:
LOG  12:53:17 Fetch start
LOG  {"completed": false, "id": 1, "title": "delectus aut autem", "userId": 1}
LOG  12:55:39 Fetch End
Sometimes it takes 2 seconds to get response, sometimes it waits ~2 minutes to send request,
And this happens with every web requests
React Native Version
0.72.4
Output of npx react-native info
System:
OS: Windows 10 10.0.19045
CPU: (4) x64 Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz
Memory: 1.01 GB / 3.88 GB
Binaries:
Node:
version: 18.17.1
path: C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm:
version: 9.6.6
path: C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK:
AllowDevelopmentWithoutDevLicense: Enabled
Versions:
- 10.0.19041.0
IDEs:
Android Studio: Not Found
Visual Studio: Not Found
Languages:
Java: Not Found
Ruby: Not Found
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.4
wanted: 0.72.4
react-native-windows: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: Not found
newArchEnabled: Not found
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
Steps to reproduce
1 - npx create-expo-app my-app
2 - Added a TouchabpleOpacity  button that calls fetchJson function
3 - Open via Expo Go
4 - Leave the phone for 5 minutes
5 - Press button
6 - Loading for ~2 minutes (if not again leave for 5 minutes)
That's it
import React, { useState } from "react";
import {
  ActivityIndicator,
  StyleSheet,
  Text,
  TouchableOpacity,
  View,
} from "react-native";

export default function App() {
  const [loading, setLoading] = useState(false);

  const fetchJson = async () => {
    setLoading(true);
    console.log(new Date().toLocaleTimeString() + " Fetch start");
    await fetch("https://jsonplaceholder.typicode.com/todos/1")
      .then((response) => response.json())
      .then((json) => console.log(json));
    console.log(new Date().toLocaleTimeString() + " Fetch End");
    setLoading(false);
  };

  return (
    <View style={styles.container}>
      <TouchableOpacity style={styles.button} onPress={() => fetchJson()}>
        {loading ? <ActivityIndicator color={"#fff"} /> : <Text>Fetch Json</Text>}
      </TouchableOpacity>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: "#fff",
    alignItems: "center",
    justifyContent: "center",
  },
  button: {
    height: 50,
    width: 100,
    borderRadius: 15,
    backgroundColor: "#007AFF",
    alignItems: "center",
    justifyContent: "center",
  },
});

Snack, screenshot, or link to a repository
<EMAIL_ADDRESS>https://github.com/JKKholmatov/my-app/tree/master
UPDATE:
I tested with VPN on Android and it works as expected
Also tested with iPhone and  it works as expected

Duplicates https://github.com/facebook/react-native/issues/37907


[Feature] Run all tests

java -jar flank.jar app.apk test.apk
Usage: Flank

I'd expect ^ to run all tests. Instead I have to specify a package. Thoughts on allowing all tests to run when the package is omitted? This is more in line with the gcloud CLI. Package is optional and default is to run everything.

I like the idea. Lets see what we can do.