Binary templates: read data without labeling it

Great to see the new Binary templates in version 2.9! I have a few feature requests - most of them you have probably thought of yourself.

Read data without labeling it
Expanding on your PNG template, I tried to label sections based on their type (see below). But when the type is read into a variable in the Tcl script, it is also immediately labeled and put on screen, so an unwanted additional label comes into view above the section.
To allow for more sophisticated binary templates, it would be very useful if data could be read from the open file without being labeled.

Scroll the hex view along with the template
This one I'm sure you have already thought about: when clicking on something from the Binary template view, you'd want the hex bytes to be visible as well.

Select bytes using the Binary template view
It would be useful if you could change the (hex-view) selection to select the bytes that a certain label refers to, for instance by double-clicking the label in the Binary template view.

Highlight entire section when section label selected
A minor UI thing: when a label is selected in Binary template view, the corresponding bytes are highlighted in the hex view. This doesn't happen yet when a section header is selected.

Interpretation column in Binary template view
Another column in the Binary template view would be very useful, where the Tcl script can interpret the bytes to draw conclusions about what is going on. For example in the PNG template: when it gets "Color Type" = 3, the script could add a text in the third column that explains what color type 3 means. I'm not talking about a general "help" text, but a text based on the value. Scripts could show whether a CRC checksum is correct, etc.

The PNG template:
big_endian
requires 0 "89 50 4E 47 0D 0A 1A 0A"
ascii 6 "Signature"
move 2
while {![end]} {
	move 4
	set type [ascii 4 ""]
	move -8
	switch $type {
		IHDR {set secname {Image header}}
		PLTE {set secname {Palette}}
		IDAT {set secname {Image data}}
		IEND {set secname {Image trailer}}
		tRNS {set secname {Transparency infomation}}
		gAMA {set secname {Image gamma}}
		cHRM {set secname {Primary chromaticities}}
		sRGB {set secname {Standard RGB color space}}
		iCCP {set secname {Embedded ICC profile}}
		tEXt {set secname {Textual data}}
		zTXt {set secname {Compressed textual data}}
		iTXt {set secname {International textual data}}
		bKGD {set secname {Background color}}
		pHYs {set secname {Physical pixel dimensions}}
		sBIT {set secname {Significant bits}}
		sPLT {set secname {Suggested palette}}
		hIST {set secname {Palette histogram}}
		tIME {set secname {Image last-modification time}}
		default {set secname {(Type unknown)}}
	}
	section "$secname" {
		set chunk_len [uint32 "Chunk Length"]
		set chunk_type [ascii 4 "Chunk Type"]
		if {$chunk_type == "IHDR"} {	;# Image Header
			set img_width [uint32 "Width"]
			set img_height [uint32 "Height"]
			set bitdepth [uint8 "Bit Depth"]
			uint8 "Color Type"
			uint8 "Compression Method"
			uint8 "Filter Method"
			uint8 "Interlace Method"
		} else {
			if {$chunk_len > 0} {hex $chunk_len "Chunk Body"}
		}
		hex 4 "CRC"
	}
}

I think simplest way to implement this is to make the label argument optional, so if it's not present then it doesn't get added and just returns the value.

If you right-click an item you can select "Jump to Field" which I think does what you want. Problem is making this default might be annoying if you're scrolled somewhere but wanting to look at data elsewhere.

I think double-click would work here, and/or add a new context menu option.

I had this implemented, but since the template has the ability to move position within a section, not all items within a section necessarily fall within the same range. For most of the time though it'd probably make sense. I can look at bringing that back.

Sounds like a good idea. Maybe a "Notes" column?

I think simplest way to implement this is to make the label argument optional, so if it's not present then it doesn't get added and just returns the value.

Perfect!

If you right-click an item you can select "Jump to Field" which I think does what you want. Problem is making this default might be annoying if you're scrolled somewhere but wanting to look at data elsewhere.

I hadn't seen that yet. I guess it is a matter of taste - my thinking would be: if you want to look at hex from one part of the file and labels from elsewhere, you could scroll the label view without selecting something; when you actually click on a label in the template view (or select it with an arrow key), you probably intend to look at the corresponding hex bytes. But it's up to your judgment.

I think double-click would work here, and/or add a new context menu option.

Great.

I had this implemented, but since the template has the ability to move position within a section, not all items within a section necessarily fall within the same range. For most of the time though it'd probably make sense. I can look at bringing that back.

That does complicate it. Perhaps selecting a section could highlight the parts that would be highlighted if every sub-item in the section were selected?

Sounds like a good idea. Maybe a "Notes" column?

"Notes" is neutral but sounds user-editable, "Meaning" is perhaps too specific... Hard to think of the perfect label.
Thinking through all this, I came up with number 6. Raw bytes command
Once you have implemented 1. and 5., the Binary templates become much more powerful. That would probably make it useful for the Tcl scripts to load any number of raw bytes from the file.
At the moment only the ascii, utf16 and hex commands retrieve an arbitrary number of bytes. The ascii command can't be used for raw bytes: it returns incomplete data when a 0-byte is involved (it is implemented with an NSString, and a C string gets terminated by a 0-byte). Utf16 is really only valid for data in that encoding. Only the hex command can deliver the full data to Tcl, but a command like
set bts [binary decode hex [hex $len]]

looks and feels like a workaround. If a bytes command could be added, such that
set bts [bytes $len]

would work, it's more natural. (That would be the only such command that wouldn't accept an optional label, as 'raw bytes' is not a display format.)

If you right-click an item you can select "Jump to Field" which I think does what you want. Problem is making this default might be annoying if you're scrolled somewhere but wanting to look at data elsewhere.

Why not make it a preference? Even if there's no UI for it (requiring defaults write).

In 07bea4c99dd45c8ab5b25b0905a50d4050ccf81f I made the label argument optional, so it can be used without adding it to the UI.
Here's a example that reads the first byte n then reads n-many bytes or until the end of the file:
set n [uint8]
goto 0
for {set i 0} {![end] && $i < $n} {incr i} {
	uint8 "Byte $i"
}

In 54c29c8cc14ed5239972bdf3bfba176b56aa3f38 I added the two selection features hidden under prefs which you can set via the command line:
defaults write com.ridiculousfish.HexFiend BinaryTemplatesOnSelectionJump -bool YES

Equivalent to "Jump to Field" menu but on selection.
defaults write com.ridiculousfish.HexFiend BinaryTemplatesOnSelectionSelect -bool YES

Equivalent to "Select Bytes" menu (new) but on selection.
If people find these useful I can add UI for them in the Preferences window.

Reading data without putting a label on it seems to work well!
I have a few miscellaneous remarks and questions:

An apparent bug: I tried release 2.10b3, and the status bar seems greyed out.

When Hex Fiend restarts, it now has the same binary template activated that was there before, but the template isn't actually run (it's just the active choice in the dropdown). Is that intentional?

The message when a require statement fails looks just like a script crash - are you planning to change that into something like "Template not applicable"?

Another thing I'm trying to understand: when you select a template from the dropdown and then select another one, running it on the same file, does the template script run in the same Tcl session, or does it spawn a fresh one? In other words, could variables that have been set by a template script, or modules imported by it, affect the running of other template scripts on the same file?
I have this question because (as a workaround for some other problem) I had to rename the hex command temporarily, and then rename it back, in the PNG script, and some errors arose when I ran the template again (changing to another one and then changing back).

An apparent bug: I tried release 2.10b3, and the status bar seems greyed out.

What macOS version? Would you be able to post a screenshot?

When Hex Fiend restarts, it now has the same binary template activated that was there before, but the template isn't actually run (it's just the active choice in the dropdown). Is that intentional?

It doesn't run if there is no content, which is what happens at startup when the untitled document is shown.

The message when a require statement fails looks just like a script crash - are you planning to change that into something like "Template not applicable"?

yes, I can do that.
Regarding your last question, yeah, we should probably create a new interpreter for each run. Currently it's created once when the program launches. I'll fix that.

A little test script to see if a new interpreter is created each time:
if {[info exists n]} {
	set n [expr $n + 1]
	puts "Exists: $n"
} else {
	set n 0
	puts "Doesn't exist: $n"
}

For the first 3 runs it currently outputs:

Doesn't exist: 0
Exists: 1
Exists: 2

Good find!

Here's a screenshot of v2.9 and v2.10b3. I'm on macOS 10.13.4.

Just tested with the latest commit. The binary templates have come a long way in a short time!
A few things that struck me:

Features 1, 2 and 6 from my request are completely functional. So is the "Template not applicable" message and the new Tcl shell every time a template is run.

For 3, the context menu now has "Select Bytes". I think selecting the bytes by double-clicking the label would still be a good addition, because it is very logical/intuitive (double-click a word on a web page and it gets selected).

4 (highlighting an entire section): At the moment, all section labels are anchored to the start of the document. That creates a strange experience: when going through the labels with the arrow keys, the document jumps up and down as you pass a section label. I still think something like "highlighting all items in the section" or "highlighting all items in the section and all bytes in-between them (meaning: a contiguous block of bytes)" would make it more pleasant to use. If those are not desirable, perhaps the document position can simply be unchanged when a section label is selected.

Maybe I may add another one (this should be the final request): 7. Resizable template pane: when resizing the window, it only affects the bytes and text view, but it would be useful to be able to change the width of the template results as well.

As the focus of development has understandably shifted to other important things (Dark mode, iOS compatibility), I would like to understand the next steps for the binary templates. In my opinion, the main improvement to be made is highlighting the sections in a logical way - as noted above, I think the most logical and intuitive way is to set the section borders at the file offset when the section and endsection commands were given. It would amount to this patch:
diff --git a/app/sources/HFTemplateController.m b/app/sources/HFTemplateController.m
index 767de0f..2693cb7 100644
--- a/app/sources/HFTemplateController.m
+++ b/app/sources/HFTemplateController.m
@@ -359,10 +359,16 @@ - (unsigned long long)length {
 - (void)beginSectionWithLabel:(NSString *)label {
     HFTemplateNode *node = [[HFTemplateNode alloc] initGroupWithLabel:label parent:self.currentNode];
     [self.currentNode.children addObject:node];
+    node.range = HFRangeMake((self.anchor + self.position), 0);
     self.currentNode = node;
 }

 - (void)endSection {
+    if((self.anchor + self.position) > self.currentNode.range.location) {
+        HFRange range = self.currentNode.range;
+        range.length = (self.anchor + self.position - range.location);
+        self.currentNode.range = range;
+    }
     self.currentNode = self.currentNode.parent;
 }

which I will gladly submit as a pull request if that is more convenient. The section highlighting makes it clearer to the user what is going on and makes it easier to navigate a binary file in larger steps.
There are other possible improvements that would enhance the usefulness of the binary templates (some are above, some in #146), but I think the current version is already good enough for deployment.
Another matter is the distribution of templates (written by HexFiend authors as well as others). I imagine bundling them with the installer is one option, but the user has more freedom if they can be downloaded at will. Similar modules for the BBEdit programmers' editor are listed on a webpage but hosted by their individual authors. In contrast, the makers of the 010 hex editor host all templates on their site and ask for new templates to be mailed in. What are your thoughts on this?

The iOS changes are/were an experiment. Maybe that'll continue, not sure. My main thoughts were it'd be cool to have Hex Fiend for iPad since it's clear iOS is becoming a more Pro-focused platform for Apple. Not sure if it'll go anywhere (some major drawing issues still exist). Dark mode support is done, minus any bugs that may come in. Lastly, my personal life has had some major changes recently so my free time has diminished and starting January may become almost nil. However, I want to get the 2.9 bugs fixed and released so hopefully can get that done soon.
I think selection enhancements for 2.9 can wait as it's not directly a bug. I had this implemented before but reverted it, so I can look at re-reverting it. You may want to consider starting a new thread for just that since this thread has become quite large and covering multiple issues.
Thanks for the feedback!

Regarding distribution of templates, I think we should wait until the feature is more mature and some of the templates are more fleshed out.
I think the other issues in this thread have been resolved, therefore closing this. Let me know if there's anything missing (I'd prefer opening new threads per subject if possible, it's easier to track).


Error when launching the newly created project from template

.NET SDK Version:

Steps to Reproduce:

install/update the clean-architecture template

PS C:\proj> dotnet new install Ardalis.CleanArchitecture.Template
The following template packages will be installed:
   Ardalis.CleanArchitecture.Template

Ardalis.CleanArchitecture.Template (version 9.1.2) is already installed, it will be replaced with latest version.
Ardalis.CleanArchitecture.Template::9.1.2 was successfully uninstalled.
Success: Ardalis.CleanArchitecture.Template::9.1.2 installed the following templates:
Template Name                        Short Name  Language  Tags
-----------------------------------  ----------  --------  ------------------------------
ASP.NET Clean Architecture Solution  clean-arch  [C#]      Web/ASP.NET/Clean Architecture

PS C:\proj> dotnet new clean-arch -o clean-architecture
The template "ASP.NET Clean Architecture Solution" was created successfully.

C:\Program Files\dotnet\sdk\8.0.202\Microsoft.Common.CurrentVersion.targets(2153,5): warning : The referenced project '..\clean_architecture.Infrastructure\clean_architecture.Infrastructure.csproj' does not ex
ist. [C:\proj\clean-architecture\src\clean-architecture.Web\clean-architecture.Web.csproj]
C:\Program Files\dotnet\sdk\8.0.202\Microsoft.Common.CurrentVersion.targets(2153,5): warning : The referenced project '..\clean_architecture.UseCases\clean_architecture.UseCases.csproj' does not exist. [C:\pro
j\clean-architecture\src\clean-architecture.Web\clean-architecture.Web.csproj]
C:\proj\clean-architecture\src\clean-architecture.Web\Contributors\Create.CreateContributorValidator.cs(1,26): error CS0234: The type or namespace name 'Infrastructure' does not exist in the namespace 'clean_a
rchitecture' (are you missing an assembly reference?) [C:\proj\clean-architecture\src\clean-architecture.Web\clean-architecture.Web.csproj]
C:\proj\clean-architecture\src\clean-architecture.Web\Contributors\Create.cs(1,26): error CS0234: The type or namespace name 'UseCases' does not exist in the namespace 'clean_architecture' (are you missing an
assembly reference?) [C:\proj\clean-architecture\src\clean-architecture.Web\clean-architecture.Web.csproj]
C:\proj\clean-architecture\src\clean-architecture.Web\Contributors\Delete.cs(2,26): error CS0234: The type or namespace name 'UseCases' does not exist in the namespace 'clean_architecture' (are you missing an
assembly reference?) [C:\proj\clean-architecture\src\clean-architecture.Web\clean-architecture.Web.csproj]
C:\proj\clean-architecture\src\clean-architecture.Web\Contributors\GetById.cs(2,26): error CS0234: The type or namespace name 'UseCases' does not exist in the namespace 'clean_architecture' (are you missing an
 assembly reference?) [C:\proj\clean-architecture\src\clean-architecture.Web\clean-architecture.Web.csproj]
C:\proj\clean-architecture\src\clean-architecture.Web\Contributors\List.cs(2,26): error CS0234: The type or namespace name 'UseCases' does not exist in the namespace 'clean_architecture' (are you missing an as
sembly reference?) [C:\proj\clean-architecture\src\clean-architecture.Web\clean-architecture.Web.csproj]
C:\proj\clean-architecture\src\clean-architecture.Web\Contributors\List.cs(3,26): error CS0234: The type or namespace name 'UseCases' does not exist in the namespace 'clean_architecture' (are you missing an as
sembly reference?) [C:\proj\clean-architecture\src\clean-architecture.Web\clean-architecture.Web.csproj]
C:\proj\clean-architecture\src\clean-architecture.Web\Contributors\Update.cs(2,26): error CS0234: The type or namespace name 'UseCases' does not exist in the namespace 'clean_architecture' (are you missing an
assembly reference?) [C:\proj\clean-architecture\src\clean-architecture.Web\clean-architecture.Web.csproj]
C:\proj\clean-architecture\src\clean-architecture.Web\Contributors\Update.cs(3,26): error CS0234: The type or namespace name 'UseCases' does not exist in the namespace 'clean_architecture' (are you missing an
assembly reference?) [C:\proj\clean-architecture\src\clean-architecture.Web\clean-architecture.Web.csproj]
C:\proj\clean-architecture\src\clean-architecture.Web\Contributors\Update.UpdateContributorValidator.cs(1,26): error CS0234: The type or namespace name 'Infrastructure' does not exist in the namespace 'clean_a
rchitecture' (are you missing an assembly reference?) [C:\proj\clean-architecture\src\clean-architecture.Web\clean-architecture.Web.csproj]
C:\proj\clean-architecture\src\clean-architecture.Web\Program.cs(3,15): error CS0234: The type or namespace name 'SharedKernel' does not exist in the namespace 'Ardalis' (are you missing an assembly reference?
) [C:\proj\clean-architecture\src\clean-architecture.Web\clean-architecture.Web.csproj]
C:\proj\clean-architecture\src\clean-architecture.Web\Program.cs(4,26): error CS0234: The type or namespace name 'Core' does not exist in the namespace 'clean_architecture' (are you missing an assembly referen
ce?) [C:\proj\clean-architecture\src\clean-architecture.Web\clean-architecture.Web.csproj]
C:\proj\clean-architecture\src\clean-architecture.Web\Program.cs(5,26): error CS0234: The type or namespace name 'Core' does not exist in the namespace 'clean_architecture' (are you missing an assembly referen
ce?) [C:\proj\clean-architecture\src\clean-architecture.Web\clean-architecture.Web.csproj]
C:\proj\clean-architecture\src\clean-architecture.Web\Program.cs(6,26): error CS0234: The type or namespace name 'Infrastructure' does not exist in the namespace 'clean_architecture' (are you missing an assemb
ly reference?) [C:\proj\clean-architecture\src\clean-architecture.Web\clean-architecture.Web.csproj]
C:\proj\clean-architecture\src\clean-architecture.Web\Program.cs(7,26): error CS0234: The type or namespace name 'Infrastructure' does not exist in the namespace 'clean_architecture' (are you missing an assemb
ly reference?) [C:\proj\clean-architecture\src\clean-architecture.Web\clean-architecture.Web.csproj]
C:\proj\clean-architecture\src\clean-architecture.Web\Program.cs(8,26): error CS0234: The type or namespace name 'Infrastructure' does not exist in the namespace 'clean_architecture' (are you missing an assemb
ly reference?) [C:\proj\clean-architecture\src\clean-architecture.Web\clean-architecture.Web.csproj]
C:\proj\clean-architecture\src\clean-architecture.Web\Program.cs(9,26): error CS0234: The type or namespace name 'UseCases' does not exist in the namespace 'clean_architecture' (are you missing an assembly ref
erence?) [C:\proj\clean-architecture\src\clean-architecture.Web\clean-architecture.Web.csproj]

The build failed. Fix the build errors and run again.
PS C:\proj\clean-architecture>

This is a known issue with hyphens clean-architecture in the name of your projects. I would suggest using Clean.Architecture or CleanArchitecture instead. It is listed in the README https://github.com/ardalis/CleanArchitecture?tab=readme-ov-file#using-the-dotnet-cli-template

Yeah #284 was meant to fix it but never quite got to the finish line


Mutect2: only output calls that start in the current shard

Previously the tool was outputting calls that were completely contained within
the current shard.
Resolves #1081

@davidbenjamin please review


Automatically create indexes when Pymongo 3 is fixed

Bug report https://jira.mongodb.org/browse/PYTHON-961

Seems to be fixed in pymongo now although I can't reproduce the error which is annoying. 40487d24a81fcce79123fa7da8a11ffb41ef9739


Problem with executing command when open file via neo-tree

this is what i get

and this happens everytime when i use command like this

BUT when i open files via telescope for example - all is ok.
NVIM v0.9.0-dev-377+gc9adbcafa

I'm not sure how this relates to Neo-tree. What calls that inputMod function?

which-key plugin

today i tryed do same as yesterday, and all works fine...
i am confusing.
sorry about issue

https://github.com/MunifTanjim/nui.nvim/issues/232


Fix install location

Removed spaces from installation folder

@DMagic1 : This is a new release (after 3.4) that has a new directory scheme?

Yes, it is. :) Merging! :)

Thank you!


feat: custom error message and code for rate-limiting

Adds user-configurable error_code and error_message fields to the rate-limiting plugin for v3.1^.

ref: https://github.com/Kong/kong/pull/8930

LGTM Alex, let's wait for another approval to make sure I am not missing something.


Continuous Integration

Build and test pylsl with every commit.
Deploys to pypi on tagged commits.

Putting some additional details here for posterity.

pypi requires Linux wheels to be manylinux compatible. This requires that the binaries work on CentOS5, which has a much older version of gcc and libstdc++ than is required by liblsl. Our solution is to statically link modern libgcc and libstdc++ (note there is an exception when statically linking these libs so GPL is not required) and copy in a portable libc-musl (MIT). We re-build this special-purpose liblsl with every CI check instead of simply downloading a pre-compiled liblsl found elsewhere.
To be consistent with the above (i.e., so we don't get liblsl-caused bugs in one version of pylsl but not another), we also re-build liblsl on Mac and Windows.
Travis' secure encrypted authentication is buggy/broken. I couldn't get it to work with my encrypted API keys on either pypi or bintray. Luckily cibuildwheel can use environment variables so I have a private environment variable for uploading to pypi using twine.


[Component Request] Material Icon Containers

Description
A container that can hold 'App Icons' similarly to the App Launcher or Applications folder in Android.

Use Case(s)

Suite Web Apps - Landing web app to launch various other web apps.
Dashboards
Single Sign-On Applications
Web Desktops - Like [OS.js] (https://github.com/andersevenrud/OS.js-v2)

Just thought I'd ask. Since from what I have seen there hasn't been a request for this yet.

This type of component has way too niche if a use case. Also as far as I can tell, it is not specified by material design.
Not worth us building and including for everyone given these circumstances.

This type of component has way too niche if a use case. Also as far as I can tell, it is not specified by material design.
Not worth us building and including for everyone given these circumstances.


fix(web-components): use safari fallback display

Summary of the changes
Displays fallback value in safari (webkit)
Related issue
Tell us the issue number. If suggesting an improvement or component, please discuss it with us in an issue first.
Checklist
General

[x] Changes to docs package checked and committed.
[x] All acceptance criteria reviewed and met.

Testing

[x] Relevant unit tests and visual regression tests added.
[x] Visual testing against Figma component specification completed.
[x] Playground stories in React Storybook up to date, with any prop changes and additions addressed.
[x] Compare performance of modified components against develop using Performance addon in React Storybook.

Accessibility

[x] Accessibility Insights FastPass performed.
[x] A11y unit test added and yields no issues.
[x] A11y plug-in on Storybook yields no issues.
[x] Manual screen reader testing performed using NVDA and VoiceOver.
[x] Manual keyboard testing for keyboard controls and logical focus order.
[x] Correct roles used and ARIA attributes used correctly where required.
[x] Logical heading structure is maintained, and the HTML elements used for headings can be changed to fit within the wider page structure.

Resize/zoom behaviour

[x] Page can be zoomed to 400% with no loss of content.
[x] Screen magnifier used with no issues.
[x] Text resized to 200% with no loss of content.
[x] Text spacing increased as per the WCAG 1.4.12 success criterion with no loss of content.

System modes

[x] Browser setting 'prefers reduced motion' tested. No animations or motion visible whilst this setting is on.
[x] Windows High Contrast mode tested with no loss of content.
[x] System light and dark mode tested with no loss of content.
[x] Browser support tested (Chrome, Safari, Firefox and Edge).

Testing content extremes

[x] Min/max content examples tested with no loss of content or overflow.
[x] All prop combinations work without issue.
[x] Tested for FOUC (Flash of Unstyled Content) in both SSR (Server-Side Rendering) and SSG (Static Site Generation) settings.
[x] Controlled and uncontrolled input components tested.

@ad9242 In which selectors do you want the fallback statement?
It seems that you were aware that layouts in webkit needs a fallback value, so that's good.

@ad9242 In which selectors do you want the fallback statement?
It seems that you were aware that layouts in webkit needs a fallback value, so that's good.

display: -webkit-box; should be added for all sizes of icon button. In this PR currently it's only added for large icon buttons.

Please do test this manually in safari locally for ic-design-website. Preferably on different viewports.

Closing this, because the approach is flawed. There's a problem with the parent of a button, which affects the icons.


Text Input and Date Input in form when using class .form-row

There is a little alignment issue when using form->div.form-row When using text input and date input both together the date input height is more than text input as shown in image attatched.

I am attaching the code also in below image for the form shown above

Pull Request created #23731

Adding class :
.form-row input[type=date] {     height: 38px;   }

Duplicate of #18842.


Blazor extension error in VS

When working with the Blazor standalone template I ran into the following error in VS.

ActivityLog.zip
BlazorApp1.zip
Blazor VSIX version: 15.6.610118
@rynowak

/cc @alexgav - can you take a look at this?
System.TimeoutException: The operation has timed out.
   at Microsoft.VisualStudio.Html.Package.ContainedLanguage.Server.ProjectKServerContainedLanguageSupport.OnIdle(Object sender, EventArgs e)
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
This is coming from WTE.
I'm not sure what might be causing your idle support to timeout...

@danroth27 is this on 15.7-preview1?

I believe so. I haven't seen it happen again though.

@alexgav Looks like a VS issue. Can you take a look?

I hit this several times/week with VS Version 15.7.4
VisualStudio.15.Release/15.7.4+27703.2035
VisualStudio
2018/06/25 23:40:21.386
809
ERROR
System.TimeoutException: The operation has timed out. at Microsoft.VisualStudio.Html.Package.ContainedLanguage.Server.ProjectKServerContainedLanguageSupport.OnIdle(Object sender, EventArgs e) --- End of stack trace from previous location where exception was thrown --- at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)

@alexgav  this has nothing to do with Blazer. I get this exception working with Razor Pages and no Blazer. Should we close and move this issue?

OK, will close. Thanks!


Right, configuration by abstraction via pubspec, flutter tools argument or some other flutter side API are likely all subcomponents of option 2. By not letting users touch the platform build system for the module, we translate some for them. Works for 1-2 things but not for 10-20 things. This is also against the backdrop that the user is likely to try to edit everything for an outer project but may not necessarily want to do so for an inner module project.

Right, configuration by abstraction via pubspec, flutter tools argument or some other flutter side API are likely all subcomponents of option 2. By not letting users touch the platform build system for the module, we translate some for them. Works for 1-2 things but not for 10-20 things. This is also against the backdrop that the user is likely to try to edit everything for an outer project but may not necessarily want to do so for an inner module project.
Originally posted by @xster in https://github.com/flutter/flutter/issues/32989#issuecomment-494159359

the title is too long, you should reduce to something readable

@SaavyGirl

Right, configuration by abstraction via pubspec, flutter tools argument or some other flutter side API are likely all subcomponents of option 2. By not letting users touch the platform build system for the module, we translate some for them. Works for 1-2 things but not for 10-20 things. This is also against the backdrop that the user is likely to try to edit everything for an outer project but may not necessarily want to do so for an inner module project.
Originally posted by @xster in #32989 (comment)

I miss the point of copy pasting someone else comment without any explanation or details,
especially considering that  said comment has definitely being taken in account already and the issue being evaluated and closed by the team.
Can you provide more details about the point you are trying to make?

Hi @SaavyGirl
Looks like you created the using this option

This issue doesn't seem to add anything,
Closing, as this isn't an issue with Flutter itself. If you disagree, please write in the comments and I will reopen it.
Thank you"


feat: use endpoint names as container port names if they shorter than 16 characters

What does this PR do?
Reuse endpoint name as container port name if it is short enough (<=15 chars). Otherwise, use current format (<portnum>-<protocol>).
What issues does this PR fix or reference?
Container port names can be confusing
Is it tested? How?
Test cases are added. Functionality should not change as workspace services refer to ports by number and not name.
PR Checklist

[ ] E2E tests pass (when PR is ready, comment /test v8-devworkspace-operator-e2e, v8-che-happy-path to trigger)

[ ] v8-devworkspace-operator-e2e: DevWorkspace e2e test
[ ] v8-che-happy-path: Happy path for verification integration with Che

Additional info

devfile/api discussion: https://github.com/devfile/api/pull/702
odo issue: https://github.com/redhat-developer/odo/issues/4737

test v8-devworkspace-operator-e2e

/test v8-devworkspace-operator-e2e, v8-che-happy-path


Using CRTP instead of standard polymorphism

A Curiously Recurring Template Pattern (CRTP) would probably be a better design choice instead of classic inheritance that makes use of virtual functions.
Advantage in the case of, e.g. LinearSystem and NonlinearSystem (both of which are Systems):

There's need to replace System instances at runtime or to work with heterogeneous collections of Systems.
CRTP would be more flexible
Virtual methods imply vtable lookups at runtime. With CRTP the compiler knows which class gets instantiated, thus guaranteeing better performance.

C++20 concepts would be even better.

Best of both worlds: Better Code: Runtime Polymorphism - Sean Parent

Thank you Tom, I will watch it and elaborate on this.


openssl as default

Packaging efforts are underway and by default they install without go installing cfssl
With this in mind, I have been thinking for a while we should use openssl as the default. If we also consider issue #145 it makes even more sense.
@nabilschear @jetwhiz any concerns about this or views?

openssl doesn't support certificate revocation.  that's the main difference.  there's no interface to creating a CRL in m2crypto (last i checked)

understood @nabilschear , so I am very much up for enabling folk to set up revocation which we could do in docs, but taking the long term view, with most likely to use a package installer (deb / rpm) for keylime, we need something that works out of the box for an initial install. From there they chose a backend as per #145
If we install cfssl as an rpm dependency and go get the project, we are being opinionated on what they should use. I guess the same could be said about openssl, its just that openssl is a bog standard OS package on all systems.

another option is to see if this would work https://github.com/wbond/crlbuilder/blob/master/docs/readme.md


feat: stop and start consumers

Introduction
We may need to turn our consumers on and off while the application is running, depending on our needs. Currently, it is not possible to continue consuming again after consumer is closed.

There is already a feature in kafka clients called pause/resume consumer. it will be good implement this feature in consumer mechanism. there are some good benefits except stopping/start consumer:

if consumer pauses kafka client sends heartbeats in background thread so kafka will not enter the rebalance status so this will help to process long-running kind of messages. if your handling thread is busy more than 1 second we can call consumer.pause to eliminate rebalancing.
another great feature can be "control-flow" or backpressure depending on processing time of buffer limit. for example: if client consume 10K message or processing consumed message time greater than X time you can pause to consumer until all received messages processed.

Currently, you can workaround this such as
func main() {
	consumerCfg := &kafka.ConsumerConfig{
		Concurrency: 1,
		Reader: kafka.ReaderConfig{
			Brokers: []string{"localhost:29092"},
			Topic:   "standart-topic",
			GroupID: "standart-cg",
		},
		RetryEnabled: false,
		ConsumeFn:    consumeFn,
	}

	consumer, _ := kafka.NewConsumer(consumerCfg)
	consumer.Consume()

	go func() {
		fmt.Println("closing consumer")
		consumer.Stop()

		time.Sleep(10 * time.Second)

		newConsumer, _ := kafka.NewConsumer(consumerCfg) // take a fresh instance

		fmt.Println("start new fresh consumer")
		newConsumer.Consume()
	}()

	fmt.Println("Consumer started...!")

	c := make(chan os.Signal, 1)
	signal.Notify(c, os.Interrupt)
	<-c
}

func consumeFn(message *kafka.Message) error {
	fmt.Printf("Message From %s with value %s", message.Topic, string(message.Value))
	return nil
}

cron.AddFunc(config.StartingTime, func() {
		consumer, err := kafka.NewConsumer(config)
		if err != nil {
			panic("error initializing kafka consumer " + err.Error())
		}

		consumer.Consume()

		time.AfterFunc(config.WorkingDuration, func() {
			consumer.Stop()
		})
	})

Implemented in v2.1.9; thank you for all your support <3


Viewing most settings crashes the application

Running version 3.0.0 Pro from Google Play, attempting to adjust nearly any setting causes the app to stop responding.
The previous 2.X version worked just fine for this, so it must be something that has changed from 2.X to 3.0.
The broken screens are:

Bed Time (can't turn it on)
Automation
Default KCAL values
Set on boot
Lock screen
Settings (there is a second menu called "settings" under settings)
KCAL driver

The working screens are:

Master controls
Color controls
KCAL brightness
Profiles

Same with me

Same with me

It looks like obfuscation issue in pro version. I have pushed an update (version 3.0.1, code - 67) to Google Play (which should be live soon) that should fix this issue and all the settings should be accessible. Let me know if it works or not.

It looks like obfuscation issue in pro version. I have pushed an update (version 3.0.1, code - 67) to Google Play (which should be live soon) that should fix this issue and all the settings should be accessible. Let me know if it works or not.

It works, thank you!

It works, thank you!


Ros2 v0.8.0 autoware state monitor

Depends on https://github.com/tier4/AutowareArchitectureProposal.iv/pull/274
TODO

[ ]  check usage of service server

[ ]  Build passed

[ ] ros2 run success
Node:

[x] Test  passed

Build error happened.
It seems like need to port with/after autoware_system_msgs
In file included from /home/kosuke/autoware_0_8/src/autoware/pilot.auto/system/autoware_state_monitor/include/autoware_state_monitor/autoware_state_monitor_node.hpp:18,
                 from /home/kosuke/autoware_0_8/src/autoware/pilot.auto/system/autoware_state_monitor/src/autoware_state_monitor_node/autoware_state_monitor_node.cpp:15:
/home/kosuke/autoware_0_8/src/autoware/pilot.auto/system/autoware_state_monitor/include/autoware_state_monitor/autoware_state.hpp: In function ‘AutowareState fromString(const string&)’:
/home/kosuke/autoware_0_8/src/autoware/pilot.auto/system/autoware_state_monitor/include/autoware_state_monitor/autoware_state.hpp:45:30: error: ‘FINALIZING’ is not a member of ‘StateMessage’ {aka ‘autoware_system_msgs::msg::AutowareState_<std::allocator<void> >’}
   45 |   if (state == StateMessage::FINALIZING) {return AutowareState::Finalizing;}

@k0suke-murakami Yes, as I commented, this pr depends on https://github.com/tier4/AutowareArchitectureProposal.iv/pull/274, so I guess it's better to review and merge https://github.com/tier4/AutowareArchitectureProposal.iv/pull/274 in advance.

https://github.com/tier4/AutowareArchitectureProposal.iv/pull/281#issuecomment-772953988
It seems the same action needs to be taken. Could you work on this? @wep21

[x]  Build passed

[x] ros2 run success
Node: autoware_state_monitor

[x] Test  passed

[x]  Build passed
Package: autoware_state_monitor

[x] ros2 run success
Node: autoware_state_monitor

[x] Test  passed


[Spaceship] Get and set territories

Allow for iOS territory updating with Spaceship [https://github.com/fastlane/fastlane/issues/6592]

Hello! Any thoughts or questions about this request?

Hey @enozero! Apologies for the delay here, would you mind rebasing on master and we can take a closer look at this PR without merge conflicts? Thanks!! 👍 🐙

@ohwutup done

This will be great because it will enable us to programmatically remove apps from sale 👍

@mpirri I have updated the PR with your requested changes. Please let me know if you have any questions about them!

@enozero Are you sure you committed/pushed up changes to application.rb?  It looks to me like it is out of sync with tunes_client.rb - for instance, the number of arguments it is passing to client.update_availability!() is inconsistent - 3 passed in application.rb and 2 accepted in tunes_client.rb.

@mpirri Great catch! I forgot to update the Application class. That has been updated (along with new added tests). The commit has been updated. Sorry about that!

This looks awesome!  Thanks for your work (and patience) on this, @enozero .  🚀

Thanks for the review! Looking forward to contributing more to the project.


Type Error: GetEffectiveTextShape() got an unexpected keyword argument 'aTriangulate'

I got the following Error:

my Kicad Version:
Application: KiCad PCB Editor x64 on x64

Version: 7.0.8-56-g9260f58803, release build

Libraries:
	wxWidgets 3.2.2
	FreeType 2.12.1
	HarfBuzz 6.0.0
	FontConfig 2.14.1
	libcurl/7.88.1-DEV Schannel zlib/1.2.13

Platform: Windows 10 (build 19045), 64-bit edition, 64 bit, Little endian, wxMSW

Build Info:
	Date: Oct  7 2023 05:13:57
	wxWidgets: 3.2.2 (wchar_t,wx containers)
	Boost: 1.81.0
	OCC: 7.7.1
	Curl: 7.88.1-DEV
	ngspice: 41
	Compiler: Visual C++ 1936 without C++ ABI

Build settings:
	KICAD_SPICE=ON

The design I can not share.
I will try to reproduce it with a simple project.

It seems this error only happens with a build never than 7.0.8.
I just retested with 7.0.8 and there it still works without error.
So there might be breaking changes in never versions than 7.0.8..
Application: KiCad PCB Editor x64 on x64

Version: 7.0.8, release build

Libraries:
	wxWidgets 3.2.2
	FreeType 2.12.1
	HarfBuzz 6.0.0
	FontConfig 2.14.1
	libcurl/7.88.1-DEV Schannel zlib/1.2.13

Platform: Windows 10 (build 19045), 64-bit edition, 64 bit, Little endian, wxMSW

Build Info:
	Date: Sep 29 2023 18:44:47
	wxWidgets: 3.2.2 (wchar_t,wx containers)
	Boost: 1.81.0
	OCC: 7.7.1
	Curl: 7.88.1-DEV
	ngspice: 41
	Compiler: Visual C++ 1936 without C++ ABI

Build settings:
	KICAD_SPICE=ON

Thanks for the report. I think I'll have to put out a patch release for this...


[TF] Fix some shape mismatches between TF and Relay

Make ndarray_size output scalar
Make gather_nd output scalar if needed

Thanks @lixiaoquan


CustomerGroup support

Hi,
We are trying to get a customer group by key but we do not find the proper method to do that. Is this included in the SDK?
Thanks!

@sshibani any chance of getting this implemented? Otherwise we can just build this on an implementation of IClient when it's released.

@JoostBollen Yes, please use the IClient and implement the missing method for now.


[Event Change Request] Codeunit 5988 "Serv-Documents Mgt."- OnBeforeServCrMemoLineInsert

Describe the request
We want to copy the value of a blob field from the service line to the cr. memo line. To do this, we request to add the global ServLine variable as a parameter in the OnBeforeServCrMemoLineInsert event:
local procedure PrepareCrMemoLine(var PassedServLine: Record "Service Line")
begin
    // TempSrvLine is initialized (in Sales module) in RoundAmount
    // procedure, and likely does not differ from initial ServLine.
    ServCrMemoLine.Init();
    ServCrMemoLine.TransferFields(PassedServLine);
    ServCrMemoLine."Document No." := ServCrMemoHeader."No.";
    ServCrMemoLine.Quantity := PassedServLine."Qty. to Invoice";
    ServCrMemoLine."Quantity (Base)" := PassedServLine."Qty. to Invoice (Base)";
    PassedServLine.CalcFields(PassedServLine."Service Item Line Description");
    ServCrMemoLine."Service Item Line Description" := PassedServLine."Service Item Line Description";
    //NEW BEGIN
    OnBeforeServCrMemoLineInsert(ServCrMemoLine, PassedServLine, ServLine);
    //NEW END
    ServCrMemoLine.Insert();
    OnAfterServCrMemoLineInsert(ServCrMemoLine, PassedServLine);
end;

[IntegrationEvent(false, false)]
local procedure OnBeforeServCrMemoLineInsert(var ServiceCrMemoLine: Record "Service Cr.Memo Line"; ServiceLine: Record "Service Line"; ServLine: Record "Service Line")
begin
end;

Additional context
The Blob field in the PassedServLine parameter is empty and therefore currently not copied because the TempServiceLine is passed to the procedure.
Internal work item: AB#548958

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.
Build ID: 24747.


Use tax sync subscription webhook for calculating taxes

The https://github.com/saleor/saleor/pull/10433 introduces support for tax subscription webhook. This PR change applies changes to use this flow instead of the old webhook payload.

Also, do not worry about failing vercel. Some types are missing, as the core changes are not merged yet.


Use placeholders instead of default text for comments, fix focusing

After chatting with @carljbowman, we figured the best behavior w/r/t creating and focusing comments is to use the placeholder property for the "say something..." instructions, and to fix block comment focus so they can be focused when created from the contextmenu callback.
Just want to check though, @rachel-fenichel @picklesrus @kchadha was there a reason we went with a default value instead of a placeholder originally?
In addition to fixing the placeholder issue, it also fixes focusing after creation, which does not work on iOS because the element is not attached to the dom during createEditor, so we cannot remove the setTimeout to get focus to work. It needs to be called after createEditor is done, with workspace comments this is done explicitly in the contextmenu code, so i followed that pattern.
If you want these as two separate PRs, i can do that.
By moving focus out of createEditor and explicitly calling it in the context menu code, this also fixes https://github.com/LLK/scratch-blocks/issues/1601

I didn't know about that property!  This looks good to me (and simpler than the previous version).


[bug] volume name should be validated before Create

Ⅰ. Issue Description
As the title desc, volume name should be validated before Create.
Ⅱ. Describe what happened
root@lin-vm1:~# pouch volume create --name "abc def"
Name:         abc def
Scope:
Status:       map[size:]
CreatedAt:    2018-11-2 17:54:38
Driver:       local
Labels:       map[]
Mountpoint:   /var/lib/pouch/volume/abc def

Ⅲ. Describe what you expected to happen
The volume name should be "^[a-zA-Z0-9][a-zA-Z0-9_.-]$".
IⅤ. Anything else we need to know?
None
V. Environment:

pouch version (use pouch version):
OS (e.g. from /etc/os-release):
Kernel (e.g. uname -a):
Install tools:
Others:

If need, i will fix it.

If need, i will fix it.

already fix in #2394

OK, got it.


Added Accordian

Added 2 accordians in accordian.html

@Rajdip019 it look like this:

This is not in the Figma File closing this PR. @mandiraghosh783


MultipleResults is not type safe

When I sync two or more calls, the results are not provided in a type safe manner, and casting is needed:
  .when( () -> callReturnsArrayOfStrings()
       , () -> callReturnsArrayOfProjects() )
  .done( (MultipleResults multipleResults) -> {
    String[] templateNames = (String[])multipleResults.get(0).getResult();
    Project[] projects = (Project[])multipleResults.get(1).getResult();
    ...

Other libraries have elected to use an API that is type safe, like RxJava:
Observable.zip( Observable.fromCallable( () ->callReturnsArrayOfStrings() )
              , Observable.fromCallable( () -> callReturnsArrayOfProjects() )
    , (String[] templateNames, Project[] projects) -> {
    ...

It would be nice if JDeferred also would be type safe, at least for common numbers of calls, like 2, 3, 4 and 5 or so.

Interesting suggestion. This would make the DeferredManager's current API grow by a factory of 4 in order to support  2, 3, 4, 5, and 6+ arguments.
Currently most methods define varargs, this means they can be called with 0 or 1 elements too, must check if constraints (such as least 2 args have been supplied) are in place in the default implementation.
I suppose the 6+ variation will support typed args for 2 up to 5 and untyped for the rest (due to varargs).
What do you think @saturnism?

Makes sense. I wonder if there are easier way to implement it without too
much boilerplate. Would be interesting to explore
On Wed, Jun 7, 2017 at 12:50 PM Andres Almiray<EMAIL_ADDRESS>wrote:

Interesting suggestion. This would make the DeferredManager's current API
grow by a factory of 4 in order to support 2, 3, 4, 5, and 6+ arguments.
Currently most methods define varargs, this means they can be called with
0 or 1 elements too, must check if constraints (such as least 2 args have
been supplied) are in place in the default implementation.
I suppose the 6+ variation will support typed args for 2 up to 5 and
untyped for the rest (due to varargs).
What do you think @saturnism https://github.com/saturnism?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jdeferred/jdeferred/issues/112#issuecomment-306746844,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB6AI_-npW9OWnavGkWla-sT0U5KF71Cks5sBnJLgaJpZM4NydOF
.

This is done in #116, cheers!


I submitted a new symbol, but there is no effect in v1, it is still old

@tstt #4653 I submitted a new symbol, but there is no effect in v1, it is still old. Please check it out.

Thanks for your feedback, we'll solve this issue asap

we've fixed it, please check with it.


Option to pass an array of { x, y } pairs for the control points of the edge similar to placing nodes manually at { x, y }

Options to pass an array of { x, y } pairs for the control points of the edge similar to placing nodes manually at { x,y } to give more flexibility for the edge layout, and shape.
var edges = new vis.DataSet([   { from: 1, to: 3 , points: [{x1,y1}, {x2,y3}, {x3,y3}, {x4,y4}, ]}, ]);

Hi @deepanshu11madan,
could you provide some use cases for this? How exactly should this work? What exactly should this achieve?
Thanks.

Is this supposed to be more user friendly solution for #100?

Hi @Thomaash yes, correct one use case is for #100

For what it's worth, I found some way you might do this,  Rob Spencer describes what I want at http://scaledinnovation.com/analytics/splines/aboutSplines.html.
Here's the code with a demo https://jsbin.com/ApitIxo/2/edit?html,output

Hi @Thomaash do you plan to work on a feature for this? i think it will be a great enhancement providing flexibility to raw edges similar to nodes and would solve a lot of edge  layout/crossing/overlapping issues :)

I would like to implement this eventually but I don't have the time to do it right now. Fixing existing issues has priority over new features and there are quite a few things broken (including at least one that will require complete overhaul of the deeply flawed way we handle options, that will take a lot of time).

I understand, thank you.
I tried to do it myself, i think i have the code working for drawing a line which passes through multiple points, I am just struggling to make it work perfectly with the vis-network library. So I am receivng the points option in StraightEdge class and drawing a line there, the graph looks like this https://jsfiddle.net/jm5fha2r/. The problem is the edge and node do not seem to be connected, i am able to drag the node. Do you know what might be going on?
I am also not able to push my branch to this repository. Here's the line drawing logic I am using, it takes the array of points: https://jsfiddle.net/g4sxq9ta/
there are certain cases maybe I am missing, would you be able to help out, might be faster for you to use the logic?


Investigate http 409 error

Some files moved to a different folder, that's caused the HTTP 409 issue. The checksum was the same, but they're on different routes.


Use project identity for equality check

@bot-gradle test this on linux

I've triggered the following builds for you. Click here to see all build failures.

Pull Request Feedback (Trigger)(Linux) (Check)

I've triggered the following builds with parameters: -DenablePredictiveTestSelection=false for you. Click here to see all build failures.

Pull Request Feedback (Trigger)(Linux) (Check)


buildStart hook is not async in webpack

Environment
unplugin 1.3.1
webpack 5.76.2
Node.js v16.14.2
Reproduction

Have buildStart perform async operation.
Have transform hook rely on ordered completion buildStart and its result.

StackBlitz: https://stackblitz.com/edit/webpack-webpack-js-org-1qvdhq?file=package.json&view=editor (pnpm start to run webpack programmatically, pnpm test to run tests which will also do the build programatically).
Describe the bug
buildStart is not an async hook, and invoking await will immediately continue the build pipeline, which will have unexpected consequences.
Vitest:
-- webpack call
-- webpack end

-- buildStart call         ← buildStart waits 1 second to resolve a promise

-- transform call          ← transform called before buildStart is fulfilled
× transform thrown Error: transform method was called either before buildStart call was completed or after it has thrown an error
-- transform end

√ buildStart return        ← timer fires, buildStart fulfills
-- buildStart end

(Test timeout)

Node.js:
-- webpack call
-- webpack end

-- buildStart call

-- transform call
transform call without without buildStart completion, throwing!
× transform thrown Error: transform method was called either before buildStart call was completed or after it has thrown an error
-- transform end

 UNHANDLED EXPECTION
 Error: transform method was called either before buildStart call was completed or after it has thrown an error

 (Process halted with error code)

Additional context

In Rollup/Vite realm buildStart is async and can be used to perform initial initialisation for transform hook invocations.
transform hook seems to be correctly async, which means you can await for buildStart fulfillment in it, which involves moving async logic of buildStart to a separate function and then also creating another plugin variable in which you will store promise returned by that separate async function call. But it's not obvious and still feels like a mistake/oversight.

Logs
N/A.

The workaround right now is to add webpack specific code to await the promise.
const plugin = createUnplugin(() => {
  return {
      name: "my-plugin",
      webpack(compiler) {
          compiler.hooks.beforeRun.tapPromise("my-plugin", async () => {
              // await Promise in here
          });
      }
}})

The workaround right now is to add webpack specific code to await the promise.
const plugin = createUnplugin(() => {
  return {
      name: "my-plugin",
      webpack(compiler) {
          compiler.hooks.beforeRun.tapPromise("my-plugin", async () => {
              // await Promise in here
          });
      }
}})

yes，At present, this can only be done first.

some investigations
the make hook is a AsyncParallel hook in webpack, so loader transform and buildStart is parallel in make stage
https://github.com/unjs/unplugin/blob/1b697de135c32d0fc60a2612c728d60a15dc1433/src/webpack/index.ts#L183-L203
this issue will not appear in Rspack, because currently Rspack's make hook is AsyncSeriesHook
https://github.com/web-infra-dev/rspack/blob/4bc1d680fa37c5dd7a40c7a60febd832ea3a03f9/crates/rspack_core/src/compiler/mod.rs#L33
Unfortunately, there is no AsyncSeriesHook with compilation before make

thisArg of buildStart is contextOptionsFromCompilation, so there are two ways to solve this issue:
await plugin.buildStart.call(context) // contextOptionsFromCompilation

support context but not support async (now)
support async but not support context: to run buildStart in beforeCompile hook without compilation, so thisArg cannot be passed to buildStart

IMO, to comment that buildStart in webpack only supports sync is a good solution, and let users who wants to use async  use workaround https://github.com/unjs/unplugin/issues/293#issuecomment-1827952501


ICE when formatting trait declaration with non-NFC name

trait Foó: Bar {}

The ó above is two codepoints, ASCII o followed by U+0301 COMBINING ACUTE ACCENT. It NFC-normalizes to ó, U+00F3 LATIN SMALL LETTER O WITH ACUTE.
Trying to format the above results in:
thread 'main' panicked at src/tools/rustfmt/src/source_map.rs:31:13:
bad span: `Foó`: `trait Foó: Bar {}`
stack backtrace:
   0:     0x7f3c6b9a06f6 - std::backtrace_rs::backtrace::libunwind::trace::hbee8a7973eeb6c93
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1:     0x7f3c6b9a06f6 - std::backtrace_rs::backtrace::trace_unsynchronized::hc8ac75eea3aa6899
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f3c6b9a06f6 - std::sys_common::backtrace::_print_fmt::hc7f3e3b5298b1083
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys_common/backtrace.rs:68:5
   3:     0x7f3c6b9a06f6 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hbb235daedd7c6190
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f3c6b9f2f40 - core::fmt::rt::Argument::fmt::h76c38a80d925a410
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/fmt/rt.rs:142:9
   5:     0x7f3c6b9f2f40 - core::fmt::write::h3ed6aeaa977c8e45
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/fmt/mod.rs:1120:17
   6:     0x7f3c6b99453f - std::io::Write::write_fmt::h78b18af5775fedb5
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/io/mod.rs:1810:15
   7:     0x7f3c6b9a04d4 - std::sys_common::backtrace::_print::h5d645a07e0fcfdbb
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7f3c6b9a04d4 - std::sys_common::backtrace::print::h85035a511aafe7a8
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7f3c6b9a3267 - std::panicking::default_hook::{{closure}}::hcce8cea212785a25
  10:     0x7f3c6b9a2fc9 - std::panicking::default_hook::hf5fcb0f213fe709a
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:292:9
  11:     0x7f3c6e62961c - std[79729d9c385e1623]::panicking::update_hook::<alloc[6df67106ebca92c0]::boxed::Box<rustc_driver_impl[66ed8fdbde15dc6c]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0x7f3c6b9a39b6 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::hbc5ccf4eb663e1e5
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/alloc/src/boxed.rs:2029:9
  13:     0x7f3c6b9a39b6 - std::panicking::rust_panic_with_hook::h095fccf1dc9379ee
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:783:13
  14:     0x7f3c6b9a3702 - std::panicking::begin_panic_handler::{{closure}}::h032ba12139b353db
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:657:13
  15:     0x7f3c6b9a0bf6 - std::sys_common::backtrace::__rust_end_short_backtrace::h9259bc2ff8fd0f76
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/sys_common/backtrace.rs:171:18
  16:     0x7f3c6b9a3460 - rust_begin_unwind
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:645:5
  17:     0x7f3c6b9ef645 - core::panicking::panic_fmt::h784f20a50eaab275
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/panicking.rs:72:14
  18:     0x55e4891a72ac - <rustfmt_nightly[9b2d04b1e1d23002]::visitor::SnippetProvider as rustfmt_nightly[9b2d04b1e1d23002]::source_map::SpanUtils>::span_after
  19:     0x55e4891bee27 - <rustfmt_nightly[9b2d04b1e1d23002]::visitor::FmtVisitor>::visit_item
  20:     0x55e48919f146 - <rustfmt_nightly[9b2d04b1e1d23002]::visitor::FmtVisitor>::visit_items_with_reordering
  21:     0x55e4891c6e7b - <rustfmt_nightly[9b2d04b1e1d23002]::visitor::FmtVisitor>::format_separate_mod
  22:     0x55e489038a85 - <rustfmt_nightly[9b2d04b1e1d23002]::Session<std[79729d9c385e1623]::io::stdio::Stdout>>::format_input_inner::{closure#0}
  23:     0x55e48904d3c0 - rustfmt[c449a577f49ce32d]::format_and_emit_report::<std[79729d9c385e1623]::io::stdio::Stdout>
  24:     0x55e48904bc5e - rustfmt[c449a577f49ce32d]::execute
  25:     0x55e4890474c6 - rustfmt[c449a577f49ce32d]::main
  26:     0x55e489032533 - std[79729d9c385e1623]::sys_common::backtrace::__rust_begin_short_backtrace::<fn(), ()>
  27:     0x55e489034749 - std[79729d9c385e1623]::rt::lang_start::<()>::{closure#0}
  28:     0x7f3c6b984cb1 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h37600b1e5eea4ecd
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ops/function.rs:284:13
  29:     0x7f3c6b984cb1 - std::panicking::try::do_call::hb4bda49fa13a0c2b
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:552:40
  30:     0x7f3c6b984cb1 - std::panicking::try::h8bbf75149211aaaa
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:516:19
  31:     0x7f3c6b984cb1 - std::panic::catch_unwind::h8c78ec68ebea34cb
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panic.rs:142:14
  32:     0x7f3c6b984cb1 - std::rt::lang_start_internal::{{closure}}::hffdf44a19fd9e220
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/rt.rs:148:48
  33:     0x7f3c6b984cb1 - std::panicking::try::do_call::hcb3194972c74716d
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:552:40
  34:     0x7f3c6b984cb1 - std::panicking::try::hcdc6892c5f0dba4c
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:516:19
  35:     0x7f3c6b984cb1 - std::panic::catch_unwind::h4910beb4573f4776
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panic.rs:142:14
  36:     0x7f3c6b984cb1 - std::rt::lang_start_internal::h6939038e2873596b
                               at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/rt.rs:148:20
  37:     0x55e48904e5d5 - main
  38:     0x7f3c6b590083 - __libc_start_main
  39:     0x55e4890212c9 - <unknown>
  40:                0x0 - <unknown>

error: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rustfmt/issues/new?labels=bug

note: rustc 1.76.0 (07dca489a 2024-02-04) running on x86_64-unknown-linux-gnu

query stack during panic:
end of query stack

@Jules-Bertholet you mentioned back in https://github.com/rust-lang/rustfmt/issues/6058 that the compiler is now normalizing idents? Has that been a thing for a while now? Is there a way to get the unnormalized ident? The only way I can think to do so is to use the ident's span.
Let me know if I'm understanding this one correctly. I believe what you mentioned above is that Foó above is actually Foo\u{301}, which is getting interpreted as Foó. At least from looking into this it seems that calling item.ident.as_str() returns Foó. From what I can tell this is causing issues because rustfmt is now trying to find Foó in trait Foo\u{301}: Bar {}, and panics! when it can't do so.
This is where were the panic happens: https://github.com/rust-lang/rustfmt/blob/8486837d557c152fee52383852835d4941602423/src/items.rs#L1169-L1171

@ytmimi That's correct.

Has that been a thing for a while now?

Identifier normalization has been a thing since Rust started supporting non-ASCII idents, changing normalization behavior would have been a breaking change (it would change whether two identifiers are considered to refer to the same thing). I can't speak to the history of rustc's exact implementation though

Cool! This should be a straightforward fix. As mentioned, this is where the panic originates: https://github.com/rust-lang/rustfmt/blob/8486837d557c152fee52383852835d4941602423/src/items.rs#L1169-L1171
And I think the fix here is to ensure we're using the right needle when searching for the end of the ident:
+        // Idents are NFC normalized by the compiler. To make sure we provide the right needle to
+        // `span_after` we grab the ident from the source file. See #6069
+        let source_ident = context.snippet(item.ident.span);
         let ident_hi = context
             .snippet_provider
-            .span_after(item.span, item.ident.as_str());
+            .span_after(item.span, source_ident);

Then we should add a test case with the snippet posted above to a file like tests/target/issue_6069.rs, and to further test that the panic is resolved we can add tests/target/issue_6069.rs to this list:
https://github.com/rust-lang/rustfmt/blob/8486837d557c152fee52383852835d4941602423/tests/rustfmt/main.rs#L176-L186


STORM-2869 1.x

https://github.com/apache/storm/pull/2481 for 1.x

+1
@srdo Please squash commits into one. We could merge it without 24hrs for backport case.


[Feature Request] Parse as an XML fragment, or document "deconstruction"

Xot::parse() creates a new document for the string input, so it looks like impossible to transplant the parsed tree into another document.
use xot::{xmlname::CreateName, Xot};

fn main() {
    let mut xot = Xot::new();

    let name_toplevel = CreateName::name(&mut xot, "toplevel");
    let toplevel = xot.new_element(name_toplevel);

    let parsed_doc = xot.parse("<external-input/>").unwrap();
    let parsed_elem = xot.document_element(parsed_doc).unwrap();
    assert_eq!(xot.value_type(parsed_elem), xot::ValueType::Element);

    // This panics. How to move `<external-input/>` to `<toplevel>`?
    xot.detach(parsed_elem).expect("wanna do this but fails");
    xot.append(toplevel, parsed_elem).expect("unreachable here");
}

My use case is conversion from markdown to XML.
Markdown document may contain (possibly incomplete) XML fragement, so I'd like to pre-process the fragment string, create a subtree by Xot::parse, and then add the parsed tree to the tree for whole markdown document.
However, <external-input/> is the root node of a newly created document (by Xot::parse()), detach or append results in InvalidOperation("Cannot remove document element") error and I don't have any efficient way to move take this node out.
Possible workaround is cloning the tree as a new XML fragment, but it requires extra copy and makes the arena grow unnecessarily.
use xot::{xmlname::CreateName, Xot};

fn main() {
    let mut xot = Xot::new();

    let name_toplevel = CreateName::name(&mut xot, "toplevel");
    let toplevel = xot.new_element(name_toplevel);

    let parsed_doc = xot.parse("<external-input/>").unwrap();
    let parsed_elem = xot.document_element(parsed_doc).unwrap();
    assert_eq!(xot.value_type(parsed_elem), xot::ValueType::Element);

    let cloned_parsed = xot.clone(parsed_elem);
    // Now entire `<external-input/>` tree is duplicated while one of them will
    // no longer be used after being `.append()`-ed.
    xot.append(toplevel, cloned_parsed).unwrap();
    println!("{}", xot.to_string(toplevel).unwrap());
    // `<toplevel><external-input/></toplevel>` will be printed!
}

So my request is the feature:

to parse a string (or bytes) as an XML fragment (i.e. a tree that does not belong to any document), or
to "deconstruct" a document to take toplevel nodes (including the root element) out of it, e.g. Xot::deconstruct_document(&mut self, doc: Node) -> Vec<Node /* detached */> or such.

My personal preference is the former because it does not create useless documents even when many parsing are done, but the latter will also be useful enough.

Could you do it by wrapping everything with an throwaway element?
If you have
<throwaway><some>xml</some></throwaway>

then you're free to treat the content of throwaway however you like, including moving it.
We could consider a parse_fragment API, but I'll have to think about that a bit more.

Thank you.
Yes it seems to be more efficent than cloning a tree. I'll use it.
(I have to add a handling for empty string input, but it's acceptable.)

I've solved it like that in my own code before.
Concerning a parse_fragment API, it's interesting to consider what it should return. A fragment may contain multiple nodes, after all:
<throwaway><a/><b/></throwaway>

So what should it return? I think the throwaway node would be the most convenient, but then we basically end up with the parse API again.

I just ran into this surprising behaviour as well. I can confirm that wrapping the source text in a throwaway node lets me move it out and into another document tree as expected. For my use case, a parse_fragment API which may return multiple nodes makes sense, FWIW.
For context, I'm using xot to implement a static HTML site generator doing basic string pattern substitution. It's about the fourth library I've tried for this project and so far I'm loving it, thanks a lot! Far easier to use for DOM manipulation than kuchiki/kuchikiki (which, by way of html5ever, don't support xhtml)

Glad to hear that, @timstr !
I am happy to work out api design or look at a PR for the parse fragment story. It definitely  needs a clear story as multiple people are looking for it already.

[rewritten comment, the lady one got deleted by accident]
Thanks, @timstr, that's great to hear! I hadn't seen kuchiki, I should look into its api to see what I can learn.
I am happy to work with people on a parse_fragment API that returns multiple nodes, the need is clear. We can simply implement it with the trick, and clean up the trick root element after we detach its content.


Update to new standards?

In Firefox JavaScript Console there are messages like:

RTCIceServer.url is deprecated! Use urls instead.

And

Mandatory/optional in createOffer options is deprecated! Use {"offerToReceiveAudio":true,"offerToReceiveVideo":true} instead (note the case difference)!

The messages don't really bother me, but I suppose they might be dropped at some point. So should these be updated?

Now this dont works in FF 43:
console error:
Mandatory/optional in createOffer options no longer works! Use {"offerToReceiveAudio":true,"offerToReceiveVideo":true} instead (note the case difference)!
ICE failed, see about:webrtc for more details

Hi @albertosouza - I take it you are using the build at //cdn.jsdelivr.net/rtc/latest/rtc.min.js? If so, unfortunately that build hasn't been rebuilt in a while to take advantage of the updates to some of the other rtc.io packages, which include the correct use of FF offer constraints (although it still needs to use RTCIceServer.urls).
I've deployed a build a new 3.4.0 release now, but we're just waiting on the jsdelvr CDN to pick it up.
Additionally, as a note, I'll push out a 4.0.0 series release in a couple of days - rtc is still using the ^4.5 releases of rtc-quickconnect (the main underlying package), while this has moved onto a ^5 version.

ok @nathanoehlman i think i tested a old version.
You need help with something in this project?


Internationalization of Js pages

I referred to sentry's JS translation and made a JSX internationalization on the superset page. You can see it. I can help you to make the internationalization of the JS page.I hope you can use my code!

@krishnap @

Coverage increased (+0.004%) to 69.274% when pulling 0cd0139b9242b89bca75f4666e47f0a11298ec0f on lxzhangchao:mu_js_page into c34df3eea40eacc59097fba14fab395bb0cd5989 on apache:master.

Coverage increased (+0.004%) to 69.274% when pulling 0cd0139b9242b89bca75f4666e47f0a11298ec0f on lxzhangchao:mu_js_page into c34df3eea40eacc59097fba14fab395bb0cd5989 on apache:master.

Coverage increased (+0.004%) to 69.274% when pulling 0cd0139b9242b89bca75f4666e47f0a11298ec0f on lxzhangchao:mu_js_page into c34df3eea40eacc59097fba14fab395bb0cd5989 on apache:master.

Coverage increased (+0.004%) to 69.274% when pulling 2133140ffd284b57036d641f9767400a5236018c on lxzhangchao:mu_js_page into c34df3eea40eacc59097fba14fab395bb0cd5989 on apache:master.

Coverage increased (+0.004%) to 69.274% when pulling 2133140ffd284b57036d641f9767400a5236018c on lxzhangchao:mu_js_page into c34df3eea40eacc59097fba14fab395bb0cd5989 on apache:master.

Coverage increased (+0.004%) to 69.274% when pulling 33a1d54b048f235d934be1bc76fc4652d165d1cf on lxzhangchao:mu_js_page into c34df3eea40eacc59097fba14fab395bb0cd5989 on apache:master.

Coverage increased (+0.004%) to 69.274% when pulling 33a1d54b048f235d934be1bc76fc4652d165d1cf on lxzhangchao:mu_js_page into c34df3eea40eacc59097fba14fab395bb0cd5989 on apache:master.

Could you please close this and reopen once you are finished? You are flooding us of coveralls notifications :)

Also squash please.

Coverage increased (+0.004%) to 69.274% when pulling 33a1d54b048f235d934be1bc76fc4652d165d1cf on lxzhangchao:mu_js_page into c34df3eea40eacc59097fba14fab395bb0cd5989 on apache:master.

Coverage increased (+0.004%) to 69.274% when pulling 33a1d54b048f235d934be1bc76fc4652d165d1cf on lxzhangchao:mu_js_page into c34df3eea40eacc59097fba14fab395bb0cd5989 on apache:master.

Coverage increased (+0.004%) to 69.274% when pulling 33a1d54b048f235d934be1bc76fc4652d165d1cf on lxzhangchao:mu_js_page into c34df3eea40eacc59097fba14fab395bb0cd5989 on apache:master.


[ Timeout ] Why max timeout is 180 sec?

First of all, I really love your work. Thank you so much for that !
When I start an armv7 emulator with a 600 sec timeout (yes those emulators are incredibly slow) a 180 sec timeout stop it. So why is there a 180 sec limitation to this option?

I use the wrong option...


Last update gives database linking issues

Org-roam seems to have upgraded the database, and since then I cannot get the interface to load.
On running developer tools on http://localhost:8080/roam-data?force=1&token=null I get:
"500 Internal Error
Internal error when handling this request.
error: (emacsql-error near line 45: no such column: links.to)"
Is there something I can run, update to fix this?

You should update your org-roam-server

Thanks, what the standard mechanism for doing this?
Typically with doom one would doom sync and upgrade, and the necessary new packages would be pulled.  I could package delete, and package install this, but would prefer to embed this to automatically get updated to the latest version.
Currently I just have
#+BEGIN_SRC emacs-lisp (use-package org-roam-server   :config   (setq org-roam-server-host "<IP_ADDRESS>"         org-roam-server-port 8080         org-roam-server-authenticate nil         org-roam-server-export-inline-images t         org-roam-server-serve-files t         org-roam-server-served-file-extensions '("pdf" "mp4" "ogv")         org-roam-server-network-poll nil         org-roam-server-network-arrows nil         org-roam-server-network-label-truncate t         org-roam-server-network-label-truncate-length 60         org-roam-server-auto-update nil         org-roam-server-network-label-wrap-length 20)) #+END_SRC
in my literate conf /.doom.d/config.org - is there something else I should be doing instead?

Unfortunately I don't know how doom emacs packaging system works but people do unpin to update their packages sometimes

Thanks, will see if I find more information.


Minimal viable merge command

Bug/issue #, if applicable: rdar://114730477
Summary
This adds a first version of a docc merge command that combines documentation archives for different modules into a "combined" documentation archive.
Two notable features that are missing in this initial version are:

Merging the LMDB navigator index
Landing pages (either authored or synthesized) for the combined archive.

However, those can be added incrementally. The merge command in its current form is enough to already be usable and bring value. For example, it allows us to host our documentation for SwiftDocC and for SwiftDocCUtilities from the same repository without breaking their navigator sidebar.
Dependencies
None
Testing

Build documentation for two or more different targets.

Run docc merge /path/to/First.doccarchive /path/to/Second.doccarchive --output-path /path/to/Something.doccarchive

Use a local web server to host "Something.doccarchive".

It should be possible to browse both localhost:PORT/documentation/first and localhost:PORT/documentation/second

Each target displays its own assets (if assets had the same name in both)
Each target displays a navigator sidebar

Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.

[x] Added tests
[x] Ran the ./bin/test script and it succeeded
[ ] Updated documentation if necessary

@swift-ci please test

@swift-ci please test

Finally. Good work


The available resources on a swarm node is not exposed to clients

Description
When creating services you can specify an amount of memory to reserve, to prevent, for example, large containers all being scheduled to the same node. When services are created which exceed the capacity of the swarm, the are not scheduled.
This process however is opaque, mainly because the available resources on a node is not exposed. Internally, the scheduler has a field per node called AvailableResources which is kept up to date.
As a side-note, the constraint enforcer counts any tasks between state Assigned and Running and so excluded failed tasks. But it seems sometimes failed tasks are included in the resource calculation, though I can't seem to reproduce it on demand. Exposing AvailableResources would help immensely here.

Looks like only the total resources known for a node is exposed, and not the amount of resources reserved (--reserve-cpu, --reserve-memory)
ID:			btc6isqzpiuvu7wmg8fhabt1t
Labels:
 - server.type = front
Hostname:		swarm-test-04
Joined at:		2016-08-18 10:44:45.249897988 +0000 utc
Status:
 State:			Ready
 Availability:		Active
 Address:		x.x.x.169
Platform:
 Operating System:	linux
 Architecture:		x86_64
Resources:
 CPUs:			2
 Memory:		1.953 GiB
Plugins:
  Network:		bridge, host, ipvlan, macvlan, null, overlay
  Volume:		local
Engine Version:		17.03.0-ce

ping @aaronlehmann @aluzzardi @dperny wdyt?

To show reserved resources for a node, the client could list the tasks assigned to this node and tally the reservations.

It's true that you could list the tasks, but I'm currently tracking down an issue where the reservations are not being tracked properly (see https://github.com/docker/docker/issues/31694). So it helps to be able to see what the swarm thinks.
I actually thought this would be a trivial enhancement to add the output to "node inspect", but it seems to not be straightforward to get from the Node in swarmkit to the NodeInfo where the task information is.


Feature request: index images' text

Similar to rewind.ai, extract text from images and index it.

How many images a vault contains on average (in percentage of notes)? How many of these images contains text (in percentage)?

20% of my notes are images and mostly stable diffusion / lexica art / excallidraw embeds


Have the arrow display right next to the text

Hello, the arrow seems to always display at the right most of the spinner. I want it display right next to the text. Does nice-spinner support this? How can I achieve this? Thank you.

I don't fully get the issue. Can't you just set wrap_content to NiceSpinner's layout_width?


Remove package localization

The standalone packages have temporary $tr placeholders that don't currently handle translation objects or placeholders. For stable, revert the recent translation changes to essentially go back to the hardcoded English strings. The proper i18n fixes will land on master and full localization can be enabled for the the next major version.
See #797 for an example of current broken translations.

I tested this locally and it seems to get all the expected English strings back.

All reverts look good. Waiting for the CI build to finish.

CI passed. Merging.


[BugFix]: Limit torch version installed by ultralytics

Currently there's a bug in our pip install sparseml[ultralytics] pathway such that it installs torch 2.0 which we do not support, when sparseml.ultralytics.train --help is invoked it leads to the following error (also noticed by @dhuangnm):
$ sparseml.ultralytics.train --help
Status code 429 from http://ipinfo.io/<IP_ADDRESS>/json: ERROR - 429 Client Error: Too Many Requests for url: http://ipinfo.io/<IP_ADDRESS>/json
Status code 429 from http://ipinfo.io/<IP_ADDRESS>/json: ERROR - 429 Client Error: Too Many Requests for url: http://ipinfo.io/<IP_ADDRESS>/json
Traceback (most recent call last):
  File "/home/dhuang/venv/bin/sparseml.ultralytics.train", line 5, in <module>
    from sparseml.yolov8.train import main
  File "/home/dhuang/venv/lib/python3.8/site-packages/sparseml/yolov8/train.py", line 18, in <module>
    from sparseml.yolov8.trainers import SparseYOLO
  File "/home/dhuang/venv/lib/python3.8/site-packages/sparseml/yolov8/trainers.py", line 30, in <module>
    from sparseml.pytorch.optim.manager import ScheduledModifierManager
  File "/home/dhuang/venv/lib/python3.8/site-packages/sparseml/pytorch/__init__.py", line 51, in <module>
    from .framework import detect_framework, framework_info, is_supported
  File "/home/dhuang/venv/lib/python3.8/site-packages/sparseml/pytorch/framework/__init__.py", line 24, in <module>
    from .info import *
  File "/home/dhuang/venv/lib/python3.8/site-packages/sparseml/pytorch/framework/info.py", line 26, in <module>
    from sparseml.pytorch.sparsification import sparsification_info
  File "/home/dhuang/venv/lib/python3.8/site-packages/sparseml/pytorch/sparsification/__init__.py", line 24, in <module>
    from .distillation import *
  File "/home/dhuang/venv/lib/python3.8/site-packages/sparseml/pytorch/sparsification/distillation/__init__.py", line 17, in <module>
    from .modifier_distillation import *
  File "/home/dhuang/venv/lib/python3.8/site-packages/sparseml/pytorch/sparsification/distillation/modifier_distillation.py", line 24, in <module>
    from sparseml.pytorch.sparsification.distillation.modifier_distillation_base import (
  File "/home/dhuang/venv/lib/python3.8/site-packages/sparseml/pytorch/sparsification/distillation/modifier_distillation_base.py", line 30, in <module>
    from sparseml.pytorch.sparsification.modifier import (
  File "/home/dhuang/venv/lib/python3.8/site-packages/sparseml/pytorch/sparsification/modifier.py", line 36, in <module>
    from sparseml.pytorch.utils import LOGGING_LEVELS, BaseLogger, LoggerManager
  File "/home/dhuang/venv/lib/python3.8/site-packages/sparseml/pytorch/utils/__init__.py", line 36, in <module>
    _check_torch_install()  # TODO: remove once files within package load without installs
  File "/home/dhuang/venv/lib/python3.8/site-packages/sparseml/pytorch/base.py", line 85, in check_torch_install
    return check_version("torch", min_version, max_version, raise_on_error)
  File "/home/dhuang/venv/lib/python3.8/site-packages/sparseml/base.py", line 286, in check_version
    raise ImportError(
ImportError: required max torch version 1.13.100, found 2.0.1

This happens due to the following line in ultralytics requirements: https://github.com/ultralytics/ultralytics/blob/441e67d3303ef6a9b0fac34fa018d20641285a33/requirements.txt#LL11C1-L11C13
The current PR overcomes this issue by limiting the torch version installed to our max supported version which is 1.13.1
After this PR the above command runs successfully. Only caveat is that may lead to another installation of torch if versions don't match up:
sparseml.ultralytics.train --help
Status code 429 from http://ipinfo.io/<IP_ADDRESS>/json: ERROR - 429 Client Error: Too Many Requests for url: http://ipinfo.io/<IP_ADDRESS>/json
Usage: sparseml.ultralytics.train [OPTIONS]

Options:
  --recipe TEXT                   Path to recipe
  --recipe-args TEXT              json parsable dict of recipe variable names
                                  to values to overwrite with
  --resume                        resume training from last checkpoint
  --task [detect|segment|classify]
                                  Specify task to run.  [default: detect]
  --model TEXT                    i.e. yolov8n.pt, yolov8n.yaml. Path to model
                                  file  [default: yolov8n.yaml]
  --data TEXT                     i.e. coco128.yaml. Path to data file
                                  [default: coco128.yaml]
  --epochs INTEGER                number of epochs to train for  [default:
                                  100]
  --patience INTEGER              epochs to wait for no observable improvement
                                  for early stopping of training  [default:
                                  50]
  --batch INTEGER                 number of images per batch  [default: 16]
  --imgsz INTEGER                 size of input images  [default: 640]
  --save                          save checkpoints  [default: True]
  --cache                         Use cache for data loading
  --device TEXT                   cuda device, i.e. 0 or 0,1,2,3 or cpu.
                                  Device to run on
  --workers INTEGER               number of worker threads for data loading
                                  [default: 8]
  --project TEXT                  project name
  --name TEXT                     experiment name
  --exist-ok                      whether to overwrite existing experiment
  --pretrained                    whether to use a pretrained model
  --optimizer [SGD|Adam|AdamW|RMSProp]
                                  optimizer to use  [default: SGD]
  --verbose                       whether to print verbose output
  --seed INTEGER                  random seed for reproducibility  [default:
                                  0]
  --deterministic                 whether to enable deterministic mode
                                  [default: True]
  --single-cls                    train multi-class data as single-class
  --image-weights                 use weighted image selection for training
  --rect                          support rectangular training
  --cos-lr                        use cosine learning rate scheduler
  --close-mosaic INTEGER          disable mosaic augmentation for final 10
                                  epochs  [default: 10]
  --overlap-mask                  masks should overlap during training
                                  [default: True]
  --mask-ratio INTEGER            mask downsample ratio  [default: 4]
  --dropout FLOAT                 use dropout regularization  [default: 0.0]
  --lr0 FLOAT                     initial learning rate (SGD=1E-2, Adam=1E-3)
                                  [default: 0.01]
  --lrf FLOAT                     final OneCycleLR learning rate (lr0 * lrf)
                                  [default: 0.01]
  --momentum FLOAT                SGD momentum/Adam beta1  [default: 0.937]
  --weight-decay FLOAT            optimizer weight decay 5e-4  [default:
                                  0.0005]
  --warmup-epochs FLOAT           warmup epochs (fractions ok)  [default: 3.0]
  --warmup-momentum FLOAT         warmup initial momentum  [default: 0.8]
  --warmup-bias-lr FLOAT          warmup initial bias lr  [default: 0.1]
  --box FLOAT                     box loss gain  [default: 7.5]
  --cls FLOAT                     cls loss gain (scale with pixels)  [default:
                                  0.5]
  --dfl FLOAT                     dfl loss gain  [default: 1.5]
  --fl-gamma FLOAT                focal loss gamma (efficientDet default
                                  gamma=1.5)  [default: 0.0]
  --label-smoothing FLOAT         [default: 0.0]
  --nbs FLOAT                     nominal batch size  [default: 64]
  --hsv-h FLOAT                   image HSV-Hue augmentation (fraction)
                                  [default: 0.015]
  --hsv-s FLOAT                   image HSV-Saturation augmentation (fraction)
                                  [default: 0.7]
  --hsv-v FLOAT                   image HSV-Value augmentation (fraction)
                                  [default: 0.4]
  --degrees FLOAT                 image rotation (+/- deg)  [default: 0.0]
  --translate FLOAT               image translation (+/- fraction)  [default:
                                  0.1]
  --scale FLOAT                   image scale (+/- gain)  [default: 0.5]
  --shear FLOAT                   image shear (+/- deg)  [default: 0.0]
  --perspective FLOAT             image perspective (+/- fraction), range
                                  0-0.001  [default: 0.0]
  --flipud FLOAT                  image flip up-down (probability)  [default:
                                  0.0]
  --fliplr FLOAT                  image flip left-right (probability)
                                  [default: 0.5]
  --mosaic FLOAT                  image mosaic (probability)  [default: 1.0]
  --mixup FLOAT                   image mixup (probability)  [default: 0.0]
  --copy-paste FLOAT              segment copy-paste (probability)  [default:
                                  0.0]
  --dataset-path TEXT             Path to override default dataset path.
  --help                          Show this message and exit.

Note: This change must also be cherry-picked over to release/1.5 branch
Note: the max torch version was updated to <1.14  as the after 1.13.1 next torch version on pypi is 2.0.0 https://pypi.org/project/torch/#history

Thanks Rahul. Can we also fix the other error in the command output?
ERROR - 429 Client Error: Too Many Requests for url: http://ipinfo.io/<IP_ADDRESS>/json

Thanks Rahul. Can we also fix the other error in the command output?
ERROR - 429 Client Error: Too Many Requests for url: http://ipinfo.io/<IP_ADDRESS>/json

@dhuangnm could you create a ticket for that error, will fix it in a separate PR as it's unrelated to this Bug, that error is from sparsezoo.analytics

Thanks Rahul. Can we also fix the other error in the command output?
ERROR - 429 Client Error: Too Many Requests for url: http://ipinfo.io/<IP_ADDRESS>/json

@dhuangnm could you create a ticket for that error, will fix it in a separate PR as it's unrelated to this Bug, that error is from sparsezoo.analytics

Sure Rahul, filed this ticket to track the other error: https://app.asana.com/0/1203146234476221/1204662525860093/f

Can we land this since it's already cherry-picked to 1.5?

The failing integration tests are green on my local system after https://github.com/neuralmagic/sparseml/pull/1592


Error on loginComponent

We're able to register, and confirm. When we attempt login however, we're getting the following:
EXCEPTION: Error in ./LoginComponent class LoginComponent - inline template:18:12 caused by: Cannot read property 'hex' of undefined
Issue seems to hit at this line:
cognitoUser.authenticateUser(authenticationDetails, {

Have you included all of the required libraries per this following instructions?
https://github.com/aws/amazon-cognito-identity-js

I posted this issue with
https://github.com/aws/amazon-cognito-identity-js/issues/160#issuecomment-249733150
and replied back on https://github.com/bitwiseshiftleft/sjcl/issues/316 that there was still an issue.
I have been unable to make headway on this and zone.js makes it impossible to find where it coming from. I have configured everything as requested for amazon-cognito-identity-js and ensured that codecBytes was included in the SJCL build. So any help would be appreciated.

The only time I saw this was when I updated my libraries to the latest versions. What I had to do is update ALL of the cognito-related libraries to the latest version. So try going to the link above and update all of the libraries:

I took it a step further and updated to aws-sdk-2.6.* and it worked.
Please report back whether that worked (it did for me).

This is an issue with angular-cli and how it is loading scripts for webpack in the angular-cl.json file. SJCL is null in the amazon-cognito-identity.min.js file.
I pulled down the amazon-cognito-identity-js project. Rebuilding amazon-cognito-identity.min.js so that SJCL is set to false for excluding 3rd party in the webpack.config.js file fixes this. Obviously forcing a 3rd party to included in the build is less than desirable but it does fix it for now.

Updated to angular 2.1.1

@vbudilov I have the same issue, how did you fix it? thx

@mixxr ,
Try getting the latest version of this code. I've made many upgrades, including the aws sdk js version.

I you include these file via angular-cli.json scripts array, you continue to get this error. A workaround is to list them separately in the root index.html file (as shown in this quick start).


In-app helpers

Implement in-app, in-situ helps as we establish user base and user feedback.
e.g. "Select a container to open and view contents"

Suggestion: follow similar layout to toasts, but distinct enough to know they are something else.
Suggestion: grey palette


chore: use repository url provided as input for finding a commit

For cases where the user has provided a PURL with a version but no repository can be found, this PR allows the analysis to succeed as long as the user provides a repository path as well. This differs from the current functionality where if both a PURL and repo are provided, a commit must be too.
An example of this new use case is added in the integration tests:
macaron analyze -purl<EMAIL_ADDRESS>-rp https://gitlab.com/tinyMediaManager/tinyMediaManager
Without this new functionality, the above test would fail as the provided version cannot be found by the Repo Finder.
Closes #621

This note in the documentation needs to be updated. Also, please add an example in the documentation to show how both a repo path and a PURL containing a version can be used at the same time.
This PR could also be considered as a feature I think.


Information

https://stackoverflow.com/questions/5576402/how-to-cause-a-tlb-thrashing-with-a-user-process
https://www.scs.stanford.edu/05au-cs240c/lab/i386/s10_06.htm
https://student.cs.uwaterloo.ca/~cs350/S09/a3-hints.html

mmap: https://www.man7.org/linux/man-pages/man2/mmap.2.html

https://github.com/torvalds/test-tlb

Mostly for measuring memory access latency

the hugetlb case helps avoid TLB misses, but it has another less
obvious secondary effect: it makes the memory area be contiguous in
physical RAM in much bigger chunks.  That in turn affects the caching
in the normal data caches on a very fundamental level, since you will
not see cacheline associativity conflicts within such a contiguous
physical mapping.
In particular, the hugepage case will sometimes look much better than
the normal page size case when you start to get closer to the cache
size.  This is particularly noticeable in lower-associativity caches.

#define HUGEPAGE (2*1024*1024) => 2MiB
int a = size + HUGEPAGE-1; a &= ~(HUGEPAGE-1); => add the mask & make overflow & wipe out the last 20 bits => make a >=  size and is least common multiple of HUGEPAGE
A good example to write command line tools.

A new paper: https://github.com/andresr23/tlb-thrashing

pagetable

https://www.kernel.org/doc/Documentation/vm/pagemap.txt
https://github.com/dwks/pagemap
https://unix.stackexchange.com/questions/369185/viewing-pagetable-for-a-process

Papi
papi_mem_info


[Feature] Adding Interactive Squares Background

Description
I want to add a new Interactive squares background in background components.
Screenshots
https://github.com/Rakesh9100/Beautiify/assets/116893970/2f1ae16c-d1ac-4663-9cb6-a066a07f1cab
Checklist

[X] I have checked the existing issues.
[X] I follow Contributing Guidelines of this project.
[ ] I am a IWOC'24 contributor.
[X] I am a JWOC'24 contributor.
[ ] I am a SWOC'24 contributor.

Code of Conduct

[X] I agree to follow this project's "Code of Conduct".

Proceed @Abidsyed25


Gitea SAAS

Feature Description
Hi,
SAAS Feature For Gitea,
Examples:
https://www.google.com/search?q=gitlab+saas
https://docs.gitlab.com/ee/subscriptions/gitlab_com/
Screenshots
No response

There are many providers who can provide gitea hosting for you, one of our sponsors https://hostea.org, https://docs.gitea.io/en-us/install-on-cloud-provider/, and https://www.google.com/search?q=gitea+hosting


Elm installation instructions should note libgmp-dev dependency

This page should mention the libgmp-dev https://guide.elm-lang.org/install.html dependency. Are there other implicit binary dependencies that should also be noted?

I've just been bitten by this trying to install Elm on Centos 6.9.

@JoshTGreenwood How did you eventually end up installing Elm and satisfying the libgmp-dev dependency?

I wish I could remember. I assumed I just used apt-get or equivalent

Ran into this issue too. Using alpine.

Using https://github.com/elm/compiler/issues/1949 as the canonical location for this general request.


Hacktoberfest 2022

Preamble

The code is an example of Steganography using images.
It is a python program that hides information in 'png' pictures.
Allows for hiding and retrieving text inside a .PNG picture.

Working

It opens the image and analyzes the pixel in hexadecimal.
If the pixel value blue channel falls in the 0-5 range then 1 bit of info is stored.
When it is time to retrieve the text it pulls all the blue bits of 1's & 0's.

Program

Our main objective is to handle the arguments and whether to store them or retrieve them.
Four operation functions:
Encode
Decode
Hide
Retr

You will need the Pillow module for this code:

Pillow is built on top of the well-known PIL ( Python Image Library) module.
It is one of the most critical modules for image processing.

pip install pillow

Steganography

Argument Options: -e Hide a string in an image -d Retrieve a string from an image

Hide an image in another image -u Retrieve an image from another image.

All argument options must be followed by an image Filename or Path

Download the file and navigate to the respective folder.
Run the command "Python Hide.py" followed by the respective commands found above.
You will be prompted to enter a message or another image filename (for the image include its extension and its file path if needed).
You will have your hidden message!

@Swap-Nova  Please Use Modules instead of coding everything!

In the code, I have already used many modules for reducing the NLOC like PIL for imagining the library, Binascii for converting between binary and various ASCII-encoded binary representations, optparse, for parsing cmd line, codecs for base classes, Numpy & BitArray.
The rest of the code is all about adding utility functions, encoding/decoding functions & main functions.