[$1000] IOS - Icon is not set when https://new.expensify.com is added to home screen on iOS devices

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Navigate to https://new.expensify.com/ in iOS Safari
Tap on share icon from toolbar
Select Add to Home Screen option
Tap Add on the following screen
Observe the icon that gets added to Home Screen

Expected Result:
Home screen should show New Expensify icon
Actual Result:
A generic icon with letter 'N' is shown
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android / native
[ ] Android / Chrome
[x] iOS / native
[ ] iOS / Safari
[ ] MacOS / Chrome / Safari
[ ] MacOS / Desktop

Version Number: <IP_ADDRESS>
Reproducible in staging?: yes
Reproducible in production?: yes
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
https://github.com/Expensify/App/assets/93399543/3aa1f7be-5938-4a9d-9197-e52657ce6295
https://github.com/Expensify/App/assets/93399543/c4d86d2d-6e85-4262-9e5e-dcf8fe5a9edd
Expensify/Expensify Issue URL:
Issue reported by: @aswin-s
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1686538637077189
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~01221dcc554041530c
Upwork Job ID:<PHONE_NUMBER>813540352
Last Price Increase: 2023-06-26

Proposal
Please re-state the problem that we are trying to solve in this issue.
Icon is not set when https://new.expensify.com is added to home screen on iOS devices.
What is the root cause of that problem?
The root cause of this issue is that in file index.html, we didn't set apple-touch-icon meta tag there.
What changes do you think we should make in order to solve the problem?
To fix this issue, we add following line before this line of web/index.html
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">

We'll also need to ask the design team to design an icon for it.
What alternative solutions did you explore? (Optional)
N/A

ugh - this got assigned when I was already ooo, reassigning

Seems like an easy thing to address. Adding the external label.

The proposal from @eh2077 looks good to me, and yes we do need the icon.
🎀 👀 🎀 C+ reviewed!

@marcochavezf what do you think about the proposal?
Also, adding the design label for help with the icon.

Yup, happy to help here. I think this asset should work:

apple-touch-icon.png.zip

@shawnborton Thanks for providing the icon asset. Yes, it looks perfect, see below demo video
https://github.com/Expensify/App/assets/117511920/c1bf81f5-c6f5-49cb-a2a4-46df616dc059

Great!
Then, curious where the icon here is coming from?

Great!
Then, curious where the icon here is coming from?

It looks like the favicon.png we're using in Browser tab.

@mollfpr We also need to include the icon in webpack file you're going to double check it.

The proposal LGTM, assigning @eh2077 🚀

@marcochavezf We're blocked on testing the PR on Android mobile Chrome. My emulator env can't duplicate what @mollfpr encountered in their env. It's weird that adding the meta tag for iOS impacts the behaviour on Android mobile Chrome. Can you help us move it forward?
I investigated the issue and found https://github.com/Expensify/App/pull/21856#issuecomment-1615516319 and https://github.com/Expensify/App/pull/21856#issuecomment-1617228769

I guess it's related to the legacy usage of rel="shortcut icon".
It looks like rel="shortcut icon" is not recommended for modern browsers and it's recommended to use rel="icon", see rel="shortcut icon" considered harmful and How to Favicon in 2023: Six files that fit most needs FYI.

@eh2077 are you looking for specific feedback from Marco? What exactly do you need him to do?

@puneetlath Yes, we got some trouble in testing the PR but it's solved later. Now the PR has been merged into main and we just need to wait for the automation.

Ah, great!

Sent everyone Upwork offers.

[@mollfpr] The PR that introduced the bug has been identified. Link to the PR:
[@mollfpr] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:

No offending PR.

[@mollfpr] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:

This is going to be one-time bug, so the regression step should be enough.

[@mollfpr] Determine if we should create a regression test for this bug.
[@mollfpr] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

Mobile Web Safari

Navigate to https://staging.new.expensify.com/ in iOS Safari
Tap on the share icon from the toolbar
Select Add to Home Screen option
Tap Add on the following screen
Verify the Expensify icon that gets added to Home Screen
Click the icon bookmark just added from Home Screen
Verify that it opens https://new.expensify.com/

Mobile Web Chrome

Navigate to https://staging.new.expensify.com/ in Android Chrome
Tap on three dot icon in the top right corner
Select Add to Home Screen option
Tap Add on the following screen
Verify the Expensify icon that gets added to Home Screen
Click the icon bookmark just added from Home Screen
Verify that it opens https://new.expensify.com/

Sorry for the delay here. All paid!


File Sizes

In order to actually install RF2NA how much storage needs to be allocated to the system?  The compressed file sizes are listed, but not how much storage the databases they're extracted to require.

RF2NA will need about 2.7TB. Most of this is from the BFD database, which takes up 1.9TB after extraction.


Parquet file paths are no longer hashed unlike other static site assets breaking common caching pattern

Describe the bug
Path to parquet files not being hashed breaks caching model on hosted sites if we were to follow the same default pattern for a typical vite static sites.
Parquet files do not have a hash in the path anymore (@csjh mentioned this PR), this causes issues with cloud/hosting caching
Vite auto-hashes .css and .js files which varies between builds.  This allows us to set a long cache expiry time on these files.  As long as the index.html files are not cached and everything else is, the user should see the latest when browsing.
However, if parquet file name/paths are no longer hashed then we can't apply the same pattern - which is consequential given how large parquet files can be.
Notes from discussion.
Problem
Parquet files do not have a hash in the path anymore, this causes issues with cloud caching
Vite auto-hashes .css and .js files
.parquet files are large enough that caching them is important

Caching them makes looking at sources more difficult locally

Removal of outdated source files becomes more complex

Solution
As part of the build process, when we copy sources over to build, we should hash the content and update the manifest.json
Should include tests to ensure that built output has hashing for parquet paths

Checks both the manifest.json and the parquet filepaths

Steps to Reproduce

Deploy a site with cache expiry set to 1 hour
Rebuild the evidence project
The parquet files could be outdated after the rebuild

Logs
No response
System Info
https://github.com/evidence-dev/evidence/pull/2065

Severity
serious, but I can work around it
Additional Information, or Workarounds
No response

Note, this pattern may restrict any "remote parquet" solutions in the future, whereby users bring their own or point to parquet files which are not built by Evidence.
This would be a common pattern for e.g. Iceberg tables

Fixed by #2860


Getting java.net.MalformedURLException: in runMethod()

Getting MalformedURLException while executing ta.depth.runMethod();
Error Log:
java.net.MalformedURLException: no protocol: null/api/3/depth/bch_usd-?limit=100&ignore_invalid=1
at java.net.URL.(Unknown Source)
at java.net.URL.(Unknown Source)
at java.net.URL.(Unknown Source)
at com.assist.PublicBaseClass.sendRequest(PublicBaseClass.java:114)
at com.assist.Depth.runMethod(Depth.java:14)
at com.info.Information.getOrderBook(Information.java:23)
at com.info.Information.main(Information.java:10)

Hi!
Address is wrong: null/api/3/depth, it should be like http://wex.nz/api/3/depth. May be you can't connect to the wex.nz ?

yeah, maybe that is an issue.
closing now.


Improve doc for UnusedPrivateMember

Codecov Report

Merging #2236 into master will increase coverage by 0.02%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #2236      +/-   ##
============================================
+ Coverage     81.35%   81.37%   +0.02%
- Complexity     2067     2073       +6
============================================
  Files           341      343       +2
  Lines          5968     5981      +13
  Branches       1086     1086
============================================
+ Hits           4855     4867      +12
  Misses          532      532
- Partials        581      582       +1

Impacted Files
Coverage Δ
Complexity Δ

...turbosch/detekt/rules/style/UnusedPrivateMember.kt
93.47% <ø> (ø)
5 <0> (ø)
:arrow_down:

...bosch/detekt/rules/providers/CoroutinesProvider.kt
100% <0%> (ø)
3% <0%> (?)

...ch/detekt/rules/coroutines/GlobalCoroutineUsage.kt
88.88% <0%> (ø)
3% <0%> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 43a0982...4bbc484. Read the comment docs.


user_data needs to be base64 encoded in SDK V2, fixes #325

fixes #325
\cc @jkeiser @randomcamel @hh

works for me! Thanks!! :+1:


[firebase_ml_vision] Fix calculation of center of validRect on Android (Example)

Description
The sample of firebase_ml_vision does not work correctly on Android. The rectangle that validates if the barcode is inside the on-screen rectangle is calculated wrongly. If a barcode is inside the on-screen rectangle, it is discarded. If you place the barcode on the right side above the rectangle, it is approved.
Related Issues
No related issues
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

[X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
[X] If the pull request affects only one plugin, the PR title starts with the name of the plugin in brackets (e.g. [cloud_firestore])
[ ] My PR includes unit or integration tests for all changed/updated/fixed behaviors (See [Contributor Guide]).
[ ] All existing and new tests are passing.
[ ] I updated/added relevant documentation (doc comments with ///).
[X] The analyzer (flutter analyze) does not report any problems on my PR.
[ ] I read and followed the [Flutter Style Guide].
[ ] I updated pubspec.yaml with an appropriate new version according to the [pub versioning philosophy].
[ ] I updated CHANGELOG.md to add a description of the change.
[X] I signed the [CLA].
[X] I am willing to follow-up on review comments in a timely manner.

Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?

[ ] Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
[X] No, this is not a breaking change.

@googlebot I fixed it.

@googlebot I fixed it.

is there somthing blocking this fix? the sample of firebase_ml_vision is still broken on Android, this would fix it.


Update finalize API

Found while reviewing https://github.com/rust-bitcoin/rust-miniscript/pull/450/ . There is also a BUG fix in the second commit that would have let users spendinfo from incomplete trees.
The bug was introduced in #936 which I am responsible for ACKing

I'm happy to merge this but will give @sanket1729 a moment to look at the nits.

@apoelstra @tcharding @Kixunil force pushed. I changed the Err(self) to unreachable!. I really think that adding more code for a nice display message is not worth it.
I would ACK this if someone later added a wrapper error type around this. But right now, I don't want to do this in this PR.


When I try the demo it says user forms does not exist

I tried your demo,
it is not working

Sorry, I removed the app from my AWS account because I had so many users signing up and didn't want to risk racking up a bill.
Set up an AWS free tier account and try it out. Let me know if you have any other issues.
I'll leave this open temporarily.


ADNI data processing

Hi,
Thanks so much for having your code and data processing code on github!
I am trying to process the ADNI dataset and follow your processing scheme. I noticed that on page 6 of your work here, you mention SUVR being no smaller than 1.08 is used to label a data point as positive (beside it being clinically positive). But below I see you also incorporate SUVR==1.18, and I am not sure where this value comes from, and why T (which I am assuming is the true label of the data) is set to 1 when SUVR>=1.18 but not when SUVR>=1.08?
https://github.com/VITA-Group/Self-PU/blob/a0e332ae4f8110e2490d597876e36bf837e1060f/adni_dataset.py#L189-L194
Thank you!

Hello,
Thank you for your interest in our project! I must admit it has been quite a while since we worked on this project, and some details escape me at the moment. I'll try to consult with my collaborators and follow up with you promptly.
Best regards,

Thank you! Looking forward to hearing back from you on this!


enable multiple categories

We need to support multiple categories (assets) where each set of lines get a different color based on category.

This needs to be further defined. Let's put this on hold until we can talk with Rob

Support added; still need to consult Design regarding how it appears on register since spec doesnt work

one category = one asset. We only need to provide ability for people to pass in a category with each asset

That was my understanding as well and that is what I implemented. Still need to speak with Rob about how this integrates with register as his specs do not demonstrate that.


issue with data-disable on form button

Hello, i can't seem to find a way for this function to work, i don't know why, i've already added the required property to every single input in the form, and tried also by adding the data-disable="true" on the form tag. Here's my code in this zip:
comprar.php.zip
Any suggestions??

I added the class "disabled" to the button, and on page load the class is still present, but after about a second, the "disabled" class is removed, --at the same moment that novalidate="true" is added to the form.

Okay...here's my workaround. On the button you need to disable, add disabled="disabled"  and then you can use this to deal with the form validation:
$( "form" ).on( "valid.bs.validator", function() {
  $( "#subscribe_submit " ).prop("disabled", false);
});

I couldn't make it work with the 'disabled' class, because it kept removing it, even when I removed the lines in the validator.js that seemed to be responsible for it! Good luck--

@robgaleano: My guess is that the validator was ignoring your input fields because they weren't visible on the page when the plugin was initialized. This behavior has changed in v0.11.x of the plugin.
@stephendidit: novalidate is added to prevent the browser's default constraint validation dialogs from appearing. The disabled property is intentionally not used (the validator sets .disabled as a class) and shouldn't be added manually. The reason a class is used instead of the property is to allow the user to attempt to submit (via hitting enter or clicking the button) which reveals the invalid fields and error messages.


support BOM head on win , linux

support BOM head on win , linux
Because both 'vi' and 'vim' under Linux supports bom headers.
Specifications

Detect the three bytes in the file header.
According to the encoding meaning of bytes, parse and open the text file.
Save the text file according to the original encoding of the file and the BOM header.

Golang should have such a library.

Commit hash:
OS:
Terminal:

The encoding can be set when doing something like running micro -encoding utf-16 file.txt or entering setlocal encoding utf-16 and reopen in micro, but BOM is read as a character that can be edited so I think it has to be detected.
I have not used Go much before and I do not know if there are other encodings with BOM that are used a lot, but I was only able to find 1 package where BOM and encoding can be detected:
https://pkg.go.dev/github.com/dimchansky/utfbom
I think I can try adding support with detecting BOM using the package and making a pull request if detecting encodings in the list of Encoding values in the page only would be fine.


Update role constants

Relevant Issues
N/A; this is a refined version of #896
Description

Renamed some role constants to reflect their in-server name
Added some safeguarding for .roles attribute
Corrected some typehints from Member to Union[User, Member]
Made some AOC commands guild-only since they require Member attributes (e.g. .aoc subscribe which updates the invoker's roles)

Did you:

[x] Join the Python Discord Community?
[x] Read all the comments in this template?
[x] Ensure there is an issue open, or link relevant discord discussions?
[x] Read and agree to the contributing guidelines?

@TizzySaurus Please fix the file conflicts here and appease the review of blue.
Thanks!

Other than this small regression, the rest works. I am ready to approve when that has been fixed.

After the channels were changed to a set I am getting this crash loop:
sir-lancebot    | Traceback (most recent call last):
sir-lancebot    |   File "/usr/local/lib/python3.9/site-packages/discord/ext/commands/bot.py", line 672, in _load_from_module_spec
sir-lancebot    |     setup(self)
sir-lancebot    |   File "/bot/bot/exts/events/advent_of_code/__init__.py", line 8, in setup
sir-lancebot    |     from ._cog import AdventOfCode
sir-lancebot    |   File "/bot/bot/exts/events/advent_of_code/_cog.py", line 24, in <module>
sir-lancebot    |     AOC_WHITELIST_RESTRICTED = WHITELISTED_CHANNELS + (Channels.advent_of_code_commands,)
sir-lancebot    | TypeError: unsupported operand type(s) for +: 'set' and 'tuple'
sir-lancebot    |
sir-lancebot    | The above exception was the direct cause of the following exception:
sir-lancebot    |
sir-lancebot    | Traceback (most recent call last):
sir-lancebot    |   File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
sir-lancebot    |     return _run_code(code, main_globals, None,
sir-lancebot    |   File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
sir-lancebot    |     exec(code, run_globals)
sir-lancebot    |   File "/bot/bot/__main__.py", line 13, in <module>
sir-lancebot    |     bot.load_extension(ext)
sir-lancebot    |   File "/usr/local/lib/python3.9/site-packages/discord/ext/commands/bot.py", line 732, in load_extension
sir-lancebot    |     self._load_from_module_spec(spec, name)
sir-lancebot    |   File "/usr/local/lib/python3.9/site-packages/discord/ext/commands/bot.py", line 677, in _load_from_module_spec
sir-lancebot    |     raise errors.ExtensionFailed(key, e) from e
sir-lancebot    | discord.ext.commands.errors.ExtensionFailed: Extension 'bot.exts.events.advent_of_code' raised an error: TypeError: unsupported operand type(s) for +: 'set' and 'tuple'

We're probably better off just reverting this specific change. The biggest benefit was from the roles.

Thanks for the review! This has been addressed :+1:


new URL(url, import.meta.url) is not supported in SSR

Describe the bug
Similar issue as https://github.com/sveltejs/kit/issues/1896, but it also fails in when running in dev mode.
Reproduction
https://github.com/MathiasWP/import-meta-url-ssr-bug
Logs
No response
System Info
System:
    OS: macOS 11.4
    CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
    Memory: 38.02 MB / 8.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.15.1 - /usr/local/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 8.13.1 - /usr/local/bin/npm
  Browsers:
    Brave Browser: <IP_ADDRESS>
    Chrome: 103.0.5060.53
    Firefox: 100.0
    Safari: 14.1.1
  npmPackages:
    @sveltejs/adapter-auto: next => 1.0.0-next.52
    @sveltejs/kit: next => 1.0.0-next.355
    svelte: ^3.44.0 => 3.48.0

Severity
serious, but I can work around it
Additional Information
No response

Thanks for the report. However, I don't think there's anything we can do about this in SvelteKit. Please file an issue in Vite as described here: https://github.com/sveltejs/kit#bug-reporting


Add title and description in schemas.json

Implementation of #34

@AntoineAugusti can't see any description here 🤔 https://deploy-preview-35--schema-datagouv.netlify.com/schemas/schemas.json

It doesn't deploy new data content on a branch.

Let’s merge then ;-)


BUG: cannot login if localstorage / sessionstorage (privacy) was disabled on Chrome

identified from https://js-code.herokuapp.com (js qcm 5) by alexandre blanc.
cause:
when localstorage was disabled by the user on Chrome, the google-signin element fails to load:
644096210-idpiframe.js:12 Uncaught DOMException: Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document.(…)

same problem cited there:

Google Sign-in doesn't do anything when I block 3rd party cookies => "gapi.auth2 requires third-party cookies to be allowed" (source, nov 2016)
Add Google Sign-in without using iframe, no solution given
Google Sign-in does nothing when 3rd party cookies are disabled => solution: detect if third party cookies are enabled
Client doesn't work if third-party session storage is disabled
similar: Google signin not working in safari private mode => solution: detect storage capability and warn user

solutions:

re-enable  localstorage on Chrome: http://stackoverflow.com/questions/24456891/iframe-in-chrome-error-uncaught-securityerror-failed-to-read-the-sessionstora

add accounts.google.com to exception list: https://github.com/GoogleWebComponents/google-signin/issues/99 (instructions en français)

Closing in favor of #58.


Add role-based-access-control-resource-provider-operations.md

Added role-based-access-control-resource-provider-operations.md to provide some documentation on the various operations available for the ARM resource providers.
Tagging @kgremban as we've had a lengthy thread on this for a while.
All feedback is welcome! Thanks!

@jboeshart,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

@jboeshart : Thanks for your contribution to the Azure documentation! The author, @jboeshart, has been notified to review your proposed change.

Microsoft authors of articles need to make updates through the private repository so the updates can be staged and validated by the current validation rules. After you review staging and fix all validation issues, you can add the sign-off comment to let the PR reviewers know the updates are ready to be merged.
It�s easy to access the private repo version of your articles in GitHub. Just add �pr to the URL, as follows:
Public repo URL: https://github.com/Azure/azure-content/blob/master/articles/azure-portal-overview.md
Private repo URL: https://github.com/Azure/azure-content-pr/blob/master/articles/azure-portal-overview.md
We've closed this pull request. Please resubmit the updates through the private repo. If you need perms to the private repo, see the contributor guide instructions.


[Select][Mobile] Select became opened while scrolling page

Bug report
Current Behavior
When a mobile user scroll the page touching Select, Select became opened. But the user just want to scroll page down. Not open Select.
Expected behavior
Select should not  be opened when user scroll the page event if touch was started on Select.
Reproducible example
CodeSandbox Template
Suggested solution
As mentioned in https://github.com/radix-ui/primitives/pull/1082#issuecomment-1230197898 we may use onPointerUp/onClick instead of onPointerDown in https://github.com/radix-ui/primitives/blob/main/packages/react/select/src/Select.tsx#L244
Additional context
Sorry for scaling...
https://user-images.githubusercontent.com/3282725/187749713-210f089f-e238-4773-a28e-8561ff20474b.mp4
Your environment

Software
Name(s)
Version

Radix Package(s)
@radix-ui/react-select
1.0.0

Browser
Chrome 105, Safari 15.6
Chrome was emulated via Devices, Safari was checked on iPhone

We stumbled upon this too in our current project. Why is it marked as an enhancement? It feels more like a bug. It goes against the philosophy of doing it like in macOS and makes it very easy to accidentally trigger. The example page (https://www.radix-ui.com/docs/primitives/components/select) exhibits the same behaviour.

I have a workaround/fix of this issue, which I will make into a PR soon if possibile.
The idea here is to make it so that you can use onClick on the trigger instead of the onPointerDown event it uses by default. To do this you will have to navigate to the node-modules/@radix-ui/react-slider/dist folder and open the index.modules.js file. In that file you want to add this to the SelectTrigger portion of the code:
`/* -------------------------------------------------------------------------------------------------

SelectTrigger

-----------------------------------------------------------------------------------------------/ const $cc7e05a45900e73f$var$TRIGGER_NAME = 'SelectTrigger';
const $cc7e05a45900e73f$export$3ac1e88a1c0b9f1 = /#PURE*/ $01b9c$forwardRef((props, forwardedRef)=>{
const { __scopeSelect: __scopeSelect , disabled: disabled = false , 'aria-labelledby': ariaLabelledby , ...triggerProps } = props;
const context = $cc7e05a45900e73f$var$useSelectContext($cc7e05a45900e73f$var$TRIGGER_NAME, __scopeSelect);
const composedRefs = $01b9c$useComposedRefs(forwardedRef, context.onTriggerChange);
const getItems = $cc7e05a45900e73f$var$useCollection(__scopeSelect);
const labelId = $01b9c$useLabelContext(context.trigger);
const labelledBy = ariaLabelledby || labelId;
const [searchRef, handleTypeaheadSearch, resetTypeahead] = $cc7e05a45900e73f$var$useTypeaheadSearch((search)=>{
const enabledItems = getItems().filter((item)=>!item.disabled
);
const currentItem = enabledItems.find((item)=>item.value === context.value
);
const nextItem = $cc7e05a45900e73f$var$findNextItem(enabledItems, search, currentItem);
if (nextItem !== undefined) context.onValueChange(nextItem.value);
});
const handleOpen = ()=>{
if (!disabled) {
context.onOpenChange(true); // reset typeahead when we open
resetTypeahead();
}
};
return /#PURE/ $01b9c$createElement($01b9c$Primitive.button, $01b9c$babelruntimehelpersesmextends({
type: "button",
role: "combobox",
"aria-controls": context.contentId,
"aria-expanded": context.open,
"aria-autocomplete": "none",
"aria-labelledby": labelledBy,
dir: context.dir,
"data-state": context.open ? 'open' : 'closed',
disabled: disabled,
"data-disabled": disabled ? '' : undefined,
"data-placeholder": context.value === undefined ? '' : undefined
}, triggerProps, {
ref: composedRefs,
onPointerDown: $01b9c$composeEventHandlers(triggerProps.onPointerDown, (event)=>{
// prevent implicit pointer capture
// https://www.w3.org/TR/pointerevents3/#implicit-pointer-capture
event.target.releasePointerCapture(event.pointerId); // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)
// but not when the control key is pressed (avoiding MacOS right click)
if (event.button === 0 && event.ctrlKey === false) {
handleOpen();
context.triggerPointerDownPosRef.current = {
x: Math.round(event.pageX),
y: Math.round(event.pageY)
}; // prevent trigger from stealing focus from the active item after opening.
event.preventDefault();
}
}),
onKeyDown: $01b9c$composeEventHandlers(triggerProps.onKeyDown, (event)=>{
const isTypingAhead = searchRef.current !== '';
const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;
if (!isModifierKey && event.key.length === 1) handleTypeaheadSearch(event.key);
if (isTypingAhead && event.key === ' ') return;
if ($cc7e05a45900e73f$var$OPEN_KEYS.includes(event.key)) {
handleOpen();
event.preventDefault();
}
}),
onClick: $01b9c$composeEventHandlers(triggerProps.onClick, (event)=>{
handleOpen();
})
}));
});`

Once you have added this to your code, you want to tell the trigger to preventDefault onPointerDown if you are on mobile, which will then allow for onClick to work (onClick will trigger the select unless explicitly tapped).
Using patch-package you are able to use this fix in your own project.

@jlputter, whilst this might resolve the issue on the surface, it will break other behaviours (like the ability to select a value in one click lifecycle (down, move, up).

…which I will make into a PR soon if possibile.

I am mostly letting you know as I don't want you to waste some of your personal time working on a PR for a fix I know we would reject.
Hope that makes sense!
✌

@benoitgrelard  absolutely. If I were to make a PR it would be a fix to the onPointerDown, not by just adding an OnClick. I do think, however, that having the possibility for a simple onClick would not be bad either.

@benoitgrelard

it will break other behaviours (like the ability to select a value in one click lifecycle (down, move, up).

I understand but I do think that it's way better to force the user to click two times in order to select a value than having this blocking scroll issue on mobile.

Yes the issue needs to be fixed for sure. In the meantime you are welcome to modify the component to your needs.

Any updates for this issue, guys?

I did some digging on how react-aria does it. They have an event abstraction
https://github.com/adobe/react-spectrum/blob/b35d5c02fe900badccd0cf1a8f23bb593419f238/packages/%40react-aria/menu/src/useMenuTrigger.ts#L106-L118
  let pressProps =  {
    onPressStart(e) {
      // For consistency with native, open the menu on mouse/key down, but touch up.
      if (e.pointerType !== 'touch' && e.pointerType !== 'keyboard' && !isDisabled) {
        // If opened with a screen reader, auto focus the first item.
        // Otherwise, the menu itself will be focused.
        state.toggle(e.pointerType === 'virtual' ? 'first' : null);
      }
    },
    onPress(e) {
      if (e.pointerType === 'touch' && !isDisabled) {
        state.toggle();
      }
    }
  };

These non-native events are plumbed through useButton https://react-spectrum.adobe.com/react-aria/useButton.html
It was not trivial to implement this to Radix UI Select. I was able to prevent opening the select when touch scrolling in https://github.com/radix-ui/primitives/commit/552650931a57b3316dd488bbe1543da80d9ba6d6
However, trying to open the select on touch devices was something I couldn't get to work reliably. I don't know when I would have the time to take a stab at this the next time, but hopefully someone else wants to pick this up in the meanwhile.

Bump..
This issue still exists..

Any update on this issue? Does it have an easy fix?

I used patch package to trigger on onClick and comment out onPointerDown:
diff --git<EMAIL_ADDRESS><EMAIL_ADDRESS>index 53fb4de..aaa1d08 100644
---<EMAIL_ADDRESS>+++<EMAIL_ADDRESS>@@ -194,23 +194,24 @@ const $cc7e05a45900e73f$export$3ac1e88a1c0b9f1 = /*#__PURE__*/ $01b9c$forwardRef
             // because we are preventing default in `onPointerDown` so effectively
             // this only runs for a label "click"
             event.currentTarget.focus();
+            handleOpen()
         }),
-        onPointerDown: $01b9c$composeEventHandlers(triggerProps.onPointerDown, (event)=>{
-            // prevent implicit pointer capture
-            // https://www.w3.org/TR/pointerevents3/#implicit-pointer-capture
-            const target = event.target;
-            if (target.hasPointerCapture(event.pointerId)) target.releasePointerCapture(event.pointerId);
-             // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)
-            // but not when the control key is pressed (avoiding MacOS right click)
-            if (event.button === 0 && event.ctrlKey === false) {
-                handleOpen();
-                context.triggerPointerDownPosRef.current = {
-                    x: Math.round(event.pageX),
-                    y: Math.round(event.pageY)
-                }; // prevent trigger from stealing focus from the active item after opening.
-                event.preventDefault();
-            }
-        }),
+        // onPointerDown: $01b9c$composeEventHandlers(triggerProps.onPointerDown, (event)=>{
+        //     // prevent implicit pointer capture
+        //     // https://www.w3.org/TR/pointerevents3/#implicit-pointer-capture
+        //     const target = event.target;
+        //     if (target.hasPointerCapture(event.pointerId)) target.releasePointerCapture(event.pointerId);
+        //      // only call handler if it's the left button (mousedown gets triggered by all mouse buttons)
+        //     // but not when the control key is pressed (avoiding MacOS right click)
+        //     if (event.button === 0 && event.ctrlKey === false) {
+        //         handleOpen();
+        //         context.triggerPointerDownPosRef.current = {
+        //             x: Math.round(event.pageX),
+        //             y: Math.round(event.pageY)
+        //         }; // prevent trigger from stealing focus from the active item after opening.
+        //         event.preventDefault();
+        //     }
+        // }),
         onKeyDown: $01b9c$composeEventHandlers(triggerProps.onKeyDown, (event)=>{
             const isTypingAhead = searchRef.current !== '';
             const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;

Not sure about the downsides, but seems to be good

@itsramiel I tried your fix but doesn't work 😔

Any updates on this? Or any workarounds? The issue is still there

Hi. Is there any plan on fixing this? We would really like to have some solutions on preventing drop down opening during the scroll/touch
Thanks!

In case you're coming from shadcn/ui, here is my workaround

Wrap the <Select /> component by a context provider

const SelectContext = React.createContext<
  React.Dispatch<React.SetStateAction<boolean>>
>(() => {});

const Select: React.FC<SelectPrimitive.SelectProps> = (props) => {
  const [isOpen, setIsOpen] = React.useState(false);
  return (
    <SelectContext.Provider value={setIsOpen}>
      <SelectPrimitive.Root open={isOpen} onOpenChange={setIsOpen} {...props} />
    </SelectContext.Provider>
  );
};

Override the default behavior of <SelectTrigger />

const SelectTrigger = ... => {
  const setIsOpen = React.useContext(SelectContext);
  return (
    <SelectPrimitive.Trigger
      onPointerDown={(e) => {
        if (e.pointerType === "touch") e.preventDefault(); // disable the default behavior in mobile
      }}
      onPointerUp={(e) => {
        if (e.pointerType === "touch") {
          setIsOpen((prevState) => !prevState); // use onPointerUp to simulate onClick in mobile
        }
      }}
      ...
    >
      ...
    </SelectPrimitive.Trigger>
  );
});

Difference between Aug 31, 2022 and May 25, 2024:
1 years 8 months 25 days
or 20 months 25 days
or 90 weeks 3 days
or 633 calendar days

In case you're coming from shadcn/ui, here is my workaround

Wrap the <Select /> component by a context provider

const SelectContext = React.createContext<
  React.Dispatch<React.SetStateAction<boolean>>
>(() => {});

const Select: React.FC<SelectPrimitive.SelectProps> = (props) => {
  const [isOpen, setIsOpen] = React.useState(false);
  return (
    <SelectContext.Provider value={setIsOpen}>
      <SelectPrimitive.Root open={isOpen} onOpenChange={setIsOpen} {...props} />
    </SelectContext.Provider>
  );
};

Override the default behavior of <SelectTrigger />

const SelectTrigger = ... => {
  const setIsOpen = React.useContext(SelectContext);
  return (
    <SelectPrimitive.Trigger
      onPointerDown={(e) => {
        if (e.pointerType === "touch") e.preventDefault(); // disable the default behavior in mobile
      }}
      onPointerUp={(e) => {
        if (e.pointerType === "touch") {
          setIsOpen((prevState) => !prevState); // use onPointerUp to simulate onClick in mobile
        }
      }}
      ...
    >
      ...
    </SelectPrimitive.Trigger>
  );
});

nailed it


Welcome screen - Update title text

Title should be: "Welcome to GoodDollar Wallet"
see:
https://xd.adobe.com/spec/8f259bcd-550e-4f0c-40bb-bdce2ed36fe5-f914/screen/5ff7485f-7e4c-4b1a-a20b-c30918d45c99/Sign-Up-2

The Link to GoodDapp PR - https://github.com/GoodDollar/GoodDAPP/pull/844

Checked on eWallet environments
Work as per requirements / Look as per requirements


No display effect

Hello. Watson does not draw objects
I checked all the settings, mod and graphics settings, everything is in order, but there are still no objects.

Coreprotect v21.x breaks watson support at this moment, im working on making coreprotect fully compatible and future proof

Thanks!

Hello. When will the update be possible?

This depends when Coreprotect releases their next version @prestig9110 . I'm also working further extending support that might be also in that release or the one after that one.

Thank you.

CoreProtect.. :sob: :sob: :sob: :sob:

Closing as it is fixed in the 1.19 version


Fix Whatsapp API latitude and longitude field names

According to the API https://developer.vonage.com/en/messages/code-snippets/whatsapp/send-location for sending location the field names should be "latitude" and "longitude". Currently "lat" and "long" is causing the message to not deliver properly

Thank you for reporting this and an attempt to fix. I can't merge this as-is since the tests need updating, and lat / long is used for deserialisation of inbound messages (as per the spec), so will need to use @JsonAlias instead.

Fixed in 2bf35e0f8c9435488a4fa50b384a882bf6ae721e.

thank you


Crashing on Android <= 6.0 with java.lang.UnsatisfiedLinkError

We've gotten alot of the following errors on different Android devices with 6.0 and below:
dlopen failed: could not load library "libarcore_sdk.so" needed by "libviro_react.so"; caused by could not load library "libcamera2ndk.so" needed by "libarcore_sdk.so"; caused by library "libcamera2ndk.so" not found
Any idea on how we can solve this?

Hi @KimAM, this shouldn't happen, you should be seeing an UnavailableDeviceNotSupportedException instead. Just to verify, are you using the latest version of ViroReact?
The root cause of the issue is ARCore requires Android 7.0 (API 24) and above, in part because it uses the NDK camera (libcamera2ndk.so).
If you run the isARSupportedOnDevice function as shown in the link, do you still get the error?

Thanks for the reply, we are using isARSupportedOnDevice, but it's too late to do it in Javascript as the app crashes on launch. To fix this we removed
new ReactViroPackage(ReactViroPackage.ViroPlatform.GVR) as a package in MainApplication's protected List<ReactPackage> getPackages() { } for all devices below API 24. That fixed our problem. I'll just close this one.


The admin is not able to edit the customer details

Bagisto Version: Master
Steps To reproduce--
1. Login as an admin.
2. Click on the customer.
3. Try to edit any customer.
4. Change the Date of Birth of the customer.
 Please find the screen recording Here.

@jitendra-webkul
This is working fine after taking a pull from the master. Please find the screenshot Here.
So I am closing this issue.


How to save and restore button position RecyclerView

Hi,
How can I add items to an Array to a specific index which is saved into SharedPreferences? So I can restore the buttons order when the App is launched. Thanks!

Hi. It seems that this question is not related to Advanced RecyclerView :confused: Just save the position where you want to insert items, then read it from SharedPreferences and reconstruct the Array contents before initializing a RecyclerView.


onDragStart triggered on item click but onDragEnd Doesn't

When implementing the onDragStart and onDragEnd. A click on an item (not an actual drag) would trigger onDragStart but doesn't trigger onDragEnd.
Please check this gif

I am not sure if the fix here would require not triggering onDragStart on click or triggering onDragEnd after the click is done.
reproduce steps
1- https://codesandbox.io/s/zealous-drake-q3ube?file=/src/ShowcaseLayout.js:1923-1932
2- click on an item and check the logs

I'm also running into this.

Weird, I am not getting this behaviour

Same here. My workaround is to set another event handler on handle's onClick, in which I set isDragging = false.

Same here. My workaround is to set another event handler on handle's onClick, in which I set isDragging = false.
I think the issue is not directly related to react-grid-layout lib, but rather react-draggable

Nice. I came to a similar workaround, just using onDrag and onDragStop. In my case, I'm using it to prevent clicks on links when dragging so a user doesn't accidentally open a link when they are trying to rearrange the grid.

Declare isDragging state
const [isDragging, setIsDragging] = useState(false);

Create handlers for onDrag and onDragStop. Conditional in handleDrag is to ensure it is not called continually

const handleDrag = () => {
    if (!isDragging) {
        setIsDragging(true);
    }
}

const handleDragStop =() => {
    setIsDragging(false);
}

Use useEffect to do the work

useEffect(() => {
    if (isDragging) {
        // Do one thing
    }
    else {
        // Do a different thing
    }
}, [isDragging]);

Same here. My workaround is to set another event handler on handle's onClick, in which I set isDragging = false.
I think the issue is not directly related to react-grid-layout lib, but rather react-draggable

Nice. I came to a similar workaround, just using onDrag and onDragStop. In my case, I'm using it to prevent clicks on links when dragging so a user doesn't accidentally open a link when they are trying to rearrange the grid.

Declare isDragging state
const [isDragging, setIsDragging] = useState(false);
Create handlers for onDrag and onDragStop. Conditional in handleDrag is to ensure it is not called continually

const handleDrag = () => {
    if (!isDragging) {
        setIsDragging(true);
    }
}

const handleDragStop = () => {
    setIsDragging(false);
}

Use useEffect to do the work

useEffect(() => {
    if (isDragging) {
        // Do one thing
    }
    else {
        // Do a different thing
    }
}, [isDragging]);

This is way clearer than what I was doing, thanks!

I found this due to the same problem, however I think the solution is a lot easier than above.
   const handleDragStart = useCallback((layout, oldItem, newItem, placeholder, e) => {
        window.addEventListener('mouseup', handleDragEnd);
        // rest of the code
    }, []);

    const handleDragEnd = useCallback(() => {
        window.removeEventListener('mouseup', handleDragEnd);
    }, []);

Whether or not onDragEnd should fire, the GridItem definitely needs to reset the draggable state.
GridItem.jsx#L414:
    this.setState({ dragging: newPosition });

    // Call callback with this data
    const { x, y } = calcXY(
      this.getPositionParams(),
      newPosition.top,
      newPosition.left,
      this.props.w,
      this.props.h
    );

    return onDragStart.call(this, this.props.i, x, y, {
      e,
      node,
      newPosition
    });
  };

However, if onDragStart.call returns false, denoting a cancellation of the drag event, the dragging state is not reset. This has the side effect of breaking grid resizing (as the tile is being "dragged" during the resize events).

As stated in my previous comment, there is an actual bug here, regardless of the decision behind the callback issue in the title.

Can we reopen, I am also seeing this bug.

Bump - I am also stuck on this bug.

I found a workaround for this by using a custom component and separating out the dragging to a drag handle, such that clicking on the rest of the grid item will not cause dragging. Although clicking on the drag handle without dragging will still cause a onDragStart event
Image of grid items with the drag handle

Parent component
import React, { useState } from "react";
import ReactGridLayout from "react-grid-layout";
import AppInput from "./AppInput";

const COLS = 10;
export default function InputsSection() {
  const [isDragging, setIsDragging] = useState(false);
  console.log("isDragging", isDragging);

  return (
    <ReactGridLayout
      className="layout"
      cols={COLS}
      rowHeight={70}
      width={1000}
      onDragStart={() => setIsDragging(true)}
      onDragStop={() => setIsDragging(false)}
    >
      {["one", "two", "three"].map((key) => (
        <AppInput key={key} />
      ))}
    </ReactGridLayout>
  );
}

Child Component
import { DragIndicator } from "@mui/icons-material";
import { IconButton } from "@mui/material";
import React, { forwardRef, ReactChild } from "react";
interface Props {
  children?: ReactChild | ReactChild[];
  onMouseDown?: (e: any) => void;
}

const AppInput = forwardRef(({ children, onMouseDown, ...rest }: Props, ref) => {
  return (
    <div {...rest}>
      <IconButton onMouseDown={onMouseDown} sx={{ cursor: "move !important" }}>
        <DragIndicator />
      </IconButton>
      HELLO
      {children}
    </div>
  );
});
export default AppInput;

In the child component, react-grid-layout passes a number of props into rest, all of those props are passed to div except for onMouseDown, which is passed to the drag handle (IconButton)

I'm also running into this.

Looks like this issue is caused as a result of this fix https://github.com/react-grid-layout/react-grid-layout/pull/1023

I have the same error
react-grid-layout   "version": "1.5.0",


[BUG] database is locked - when writing to external storage

Hey! Thanks for the previous fix! Sorry to bother again ...
The previous fix works when files are written to local storage.
I just wanted to start a larger download and save it to an external storage via the -o operator. It worked with previous versions, however now, it reads:

!-- Exception: UNCAUGHT EXCEPTION
!-- File: waybackdownloaderEnvironment/lib/python3.10/site-packages/pywaybackup/db.py
!-- Function: init
!-- Line: 39
!-- Segment: db.cursor.execute(cls.waybackup_table)
!-- Description: database is locked
I'm on waybackup 2.0.3 running Ubuntu 22.04 and Python 3.10.12
Any idea what's causing this?
Many thanks!

Some more info from the error log

Version: 2.0.3
Command: -u example.com -f --start 20130101 --end 20181231 -o /home/xyz/Documents/data/wayback-site/ --retry 1 --workers 6 --keep --progress
2024-11-12 14:01:44
!-- Exception: UNCAUGHT EXCEPTION
!-- File: waybackdownloaderEnvironment/lib/python3.10/site-packages/pywaybackup/db.py
!-- Function: init
!-- Line: 39
!-- Segment: db.cursor.execute(cls.waybackup_table)
!-- Description: database is locked
!-- Local Variables:
-- cls = <class 'pywaybackup.db.Database'>
-- dbfile = ../../Documents/data/wayback-uefa/uefa-2013-2018/waybackup_uefa.com.db
-- query_identifier = uefa.com{'current': False, 'full': True, 'save': False}{'explicit': False, 'range': None, 'start': 20130101, 'end': 20181231, 'filetype': None, 'limit': None}
-- db = <pywaybackup.db.Database object at 0x79f6da163520>
Traceback (most recent call last):
File "waybackdownloaderEnvironment/bin/waybackup", line 8, in
sys.exit(main())
File "waybackdownloaderEnvironment/lib/python3.10/site-packages/pywaybackup/main.py", line 19, in main
db.init(config.dbfile, config.query_identifier)
File "waybackdownloaderEnvironment/lib/python3.10/site-packages/pywaybackup/db.py", line 39, in init
db.cursor.execute(cls.waybackup_table)
sqlite3.OperationalError: database is locked

your external storage is a hdd / pendrive ? with a regular mountpoint for example like mount /dev/sda /mnt/storage ? just asking so i can reproduce :)

did some tests now. do you install the tool via virtual-env or --break-system-packages? tried it with a mounted usb-storage and was not able to set up the database as standard user. but sudo did it.
if you want to use the tool via sudo you have to source into your virtual-env with sudo or otherwise do a pip install as root.
did the database exist before you started the tool (again)? if so, maybe there is a problem with remaining LOCKS after keyboard-interrupt or something similar...

in addition please briefly describe your connected cloud storage. what kind? mountpoint? permissions? (ls -la) was it a new run without an already existing db?

I also encountered into same issue in pure ubuntu docker container, which mount to local file system.

thank you for refering that issue again. please give me some time because i'm currently covered with another project for the next 2 month :)


Enable GemVersionPromoter for all cases

These lines show that the GemVersionPromoter is completely skipped in the default --major case to not risk screwing with stuff in 1.x.
https://github.com/bundler/bundler/blob/master/lib/bundler/resolver.rb#L124-L130
Not a big deal, but better to do for 2.x earlier rather than later.

I wonder what the performance implications of this are?


Raising MemcacheIllegalInputError when key contains null byte, newline, or carriage return

Memcache does not support setting keys with null byte, newline, carriage return. This adds support for checking the key to ensure the key is valid.
Setting keys with these returns the following exception:
>>> client.set('\r\ntest', 'foo')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "lib/memcache.py", line 139, in set
    return super(Client, self).set(key, value, expire=expire, noreply=noreply)
  File .../env/lib/python2.7/site-packages/pymemcache/client/base.py", line 256, in set
    return self._store_cmd(b'set', key, expire, noreply, value)
  File .../env/lib/python2.7/site-packages/pymemcache/client/base.py", line 747, in _store_cmd
    self._raise_errors(line, name)
  File ".../env/lib/python2.7/site-packages/pymemcache/client/base.py", line 654, in _raise_errors
    raise MemcacheUnknownCommandError(name)
pymemcache.exceptions.MemcacheUnknownCommandError: set

This has been tested using version 1.3.5 on python 2.7.10

With this change, we are walking the entire key string three times to do validation. It's probably worth doing one walk, and checking each character along the way, rather than using "in" to do the work.

@cgordon I agree. I updated the commit to iterate over the characters once. I also split out the check for newline to enable a more specific error message.

The tests were failing because the character checks differ between python 2 and 3. Iterating over the binary string in python 2 returns characters, while python 3 returns the ordinal value.

This looks good to me, thanks for the catch, and the improved optimized traversing. The build is failing for an unrelated issue, which will be fixed in https://github.com/pinterest/pymemcache/pull/140
Once that's merged, please rebase and push, and we can go ahead and merge this.

@nichochar thanks for the update! Pulled in the latest changes.


Fronting an application using HOST network mode with Marathon-LB does not work

Hi,
I have a application [1], which is using HOST network. I would like to expose some of the port via the marathon load balancer. Added the HAPROXY_GROUP, but seems the haproxy is not picking up the application. Any idea on what is happening here?
[1].
{
"id": "xxxx",
"cpus": 0.5,
"mem": 1024.0,
"instances": 1,
"executor": "",
"container": {
"type": "DOCKER",
"docker": {
"image": "xxxx:1.0.0",
"network": "HOST",
"portMappings": [
{
"protocol": "tcp",
"containerPort": 4000,
"servicePort": 10060,
"hostPort": 4000
},
{
"protocol": "tcp",
"containerPort": 11224,
"servicePort": 10176,
"hostPort": 11224
}
]
}
},
"portDefinitions": [
{
"port": 4000,
"protocol": "tcp"
},
{
"port": 11224,
"protocol": "tcp"
}
],
"requirePorts": true,
"healthChecks": [
{
"portIndex": 1
}
],
"labels": {
"HAPROXY_GROUP": "marathon-lb"
}
}

It works just fine.
Please read through the guides which cover this:
https://mesosphere.com/blog/2015/12/04/dcos-marathon-lb/
https://mesosphere.com/blog/2015/12/13/service-discovery-and-load-balancing-with-dcos-and-marathon-lb-part-2/

By the way, I'd remove those portmappings, as they mean nothing in host networking mode. Your app should be listening on ports 4000 and 11224, as per your app definition.

Also check that your HAPROXY_GROUP actually matches what you have set on MLB. The default on DC/OS is external.


Any way to listen/subscribe to Solution events? Similar to ITextViewOpenClosedListener would there be a ISolutionOpenClosedListener

Hello, is there any way to listen and react when a solution or project is opened?
I only found ITextViewOpenClosedListener, but I'd really need to listen for whenever a solution or project has been opened/loaded in Visual Studio.

@luislhg - apologies on the delay. What you're seeking is possible, but we don't yet have the documentation or samples to highlight it yet. We're working on adding the gaps in documentation with respect to project/solution APIs, and will have that available in the coming weeks. Stay tuned!

Hi @luislhg, you could consider using Project Query APIs that cover certain solution/project level events. Here is the documentation to help get acquainted - Project query conceptual overview - Visual Studio (Windows) | Microsoft Learn
We have a couple of APIs that can be used, please find examples below:
1. Using SubscribeAsync
var solutions = await querySpace
     .Solutions
     .ExecuteQueryAsync();

 var singleSolution = solutions.FirstOrDefault();
 var observer = new SubscriptionObserver();
 var subscribe = singleSolution
     .Projects
     .With(p => p.Name)
     .SubscribeAsync(observer, cancellationToken);

class SubscriptionObserver: IObserver<IQueryResults<IProjectSnapshot>>
{
    public void OnCompleted()
    {}

    public void OnError(Exception error)
    {}

    public void OnNext(IQueryResults<IProjectSnapshot> value)
    {}
}

2. Using TrackAsync
var observer = new TrackerObserver();
var track= singleSolution
.Projects
.With(p => p.Name)
.TrackUpdatesAsync(observer, cancellationToken);

private class TrackerObserver : IObserver<IQueryTrackUpdates<IProjectSnapshot>>
{
    public void OnCompleted()
    {}

    public void OnError(Exception error)
    {}

    public void OnNext(IQueryTrackUpdates<IProjectSnapshot> value)
    {}
}

The 'observer' implements IObserver and receives notifications of the updates. The main difference between the 2 APIs is that SubscribeAsync provides the complete result set each time and it is up to the client to compute the diff if needed. The TrackUpdatesAsync API would return the results as "added" the first time but for the subsequent times, it would give you a diff from the previous results.

Humm right...
But if I understood it correctly, then I need the user to first run a command from my extension that would set this up and start tracking/observing the project?
What I really needed is something more similar to a Listener, in a way that even if my extension has never been interacted with yet, when a solution is loaded/opened something should trigger my extension code so it can work right away - without requiring a manual command/input from the user first.

@harleend When the user opens Visual Studio, opens a solution, my extension doesn't get notified about that with neither of the options above.
Am I missing something here?

From what I gather, you'd like your extension to automatically load with the solution. Could you share more details about your scenario? Typically, we don't encourage extensions to load automatically as it can slow down the solution and affect performance. If you could describe your use case, we might be able to suggest some alternative approaches.

@harleend thanks for the response.
If the API is out-of-proc (new API only), would it still affect the VS performance?
My use case is:

User opens VS
User opens a solution/project
My extension would need to be started/notified - so it can start to monitor the current branch of the solution/repo the user opened
User changes the branch he is currently using under that solution/repo
If some day in the future the API starts to notify me about git branch changes events it would be even better

At step 3, I have two extensions/use cases already working once it can be started properly (https://github.com/luislhg/brightextensions?tab=readme-ov-file#beta-bright-git), which would then:
A) Auto saves and restores all open tabs when switching branches, preserving the context of each branch/issue
This has been requested for VS to do natively for quite some time with a lot of votes, so I've been trying to address this pain myself via an extension.
https://developercommunity.visualstudio.com/t/when-switching-branch-in-git-visual-studio-should/856415
B) Check for EF Core DB Migrations that might exist in one branch and not in the other, so it can warn the user or even apply the migrations automatically on branch switch.

@luislhg - thank you for providing the information regarding your scenarios.
LoadedWhen property can be used to have your extension loaded - ExtensionConfiguration.LoadedWhen
For reference, here is some additional documentation - Rule-based activation constraints
cc: @BertanAygun @tinaschrepfer

Thanks for the tip about the LoadedWhen property!
I have a follow up question, When loaded how/where do I initialize my extension? I would like to run some code, have access to DI and the queryspace to set up the TrackerObserver...

Closing this issue as it appears there are no outstanding questions.  Please free to reach out in case there are further questions.


Improve sidebar performance

Discussed in https://github.com/imfing/hextra/discussions/116

Originally posted by thangisme October  2, 2023
With around 4K page, it takes a while to build the site. Which is not the case with other themes.
Template Metrics:

     cumulative       average       maximum      cache  percent  cached  total
       duration      duration      duration  potential   cached   count  count  template
     ----------      --------      --------  ---------  -------  ------  -----  --------
  1h11m15.223847094s  1.700566367s  3.723108386s          0        0       0   2514  docs/single.html
  29m25.170236303s  566.304214ms  2.228949419s         29        0       0   3117  partials/sidebar.html
  17m4.13874766s  1.712606601s   3.15029002s          0        0       0    598  docs/list.html
  9m44.776173335s  187.488353ms  1.667255081s        100        0       0   3119  partials/theme-toggle.html
  8m26.370114506s  162.715332ms   2.49520532s         52        0       0   3112  partials/breadcrumb.html
  29.106906383s    9.338115ms  2.961663767s         84        0       0   3117  partials/scripts.html
  18.830250172s    6.050851ms   1.24994449s         12        0       0   3112  partials/components/pager.html
  17.525731147s    5.622627ms  1.394370744s         16        0       0   3117  partials/head.html
   8.323090391s    2.670224ms  935.323309ms          3        0       0   3117  partials/footer.html
   4.253779071s  1.417926357s  1.718321097s          0        0       0      3  _default/list.html
   3.254211742s  3.254211742s  3.254211742s          0        0       0      1  _default/single.html
   3.125610084s    1.002762ms  302.079788ms         94        0       0   3117  partials/navbar.html
   2.958057535s  2.958057535s  2.958057535s          0        0       0      1  js/flexsearch.js
   2.772303655s  2.772303655s  2.772303655s          0        0       0      1  json/search-data.json
   2.324423135s      84.138µs   10.123734ms         32        0       0  27626  partials/utils/icon.html
   1.646970444s  1.646970444s  1.646970444s          0        0       0      1  hextra-home.html
   1.108133334s   16.539303ms  743.714675ms          0        0       0     67  shortcodes/card.html
   473.390865ms     188.002µs    1.148266ms          0        0       0   2518  partials/utils/fragments.html
   408.630441ms     679.917µs   12.980529ms          0        0       0    601  _default/list.rss.xml
   328.305514ms     105.361µs      829.74µs        100        0       0   3116  partials/toc.html
   325.333061ms   40.666632ms  325.054054ms          0        0       0      8  shortcodes/hextra/feature-card.html
   173.680592ms      55.756µs    1.771161ms        100        0       0   3115  partials/components/last-updated.html
   171.013371ms      54.864µs    2.740091ms          7        0       0   3117  partials/opengraph.html
   140.474137ms      22.533µs    1.019029ms        100        0       0   6234  partials/search.html
   140.084677ms      44.942µs    1.298499ms         19        0       0   3117  partials/utils/page-description.html
   129.101685ms      41.431µs    3.434975ms        100        0       0   3116  partials/components/comments.html
     83.38736ms      26.752µs    1.462905ms        100        0       0   3117  partials/utils/page-width.html
    74.589641ms      23.929µs   10.828863ms        100      100    3116   3117  partials/head-css.html
    25.315915ms       8.121µs    9.142074ms        100      100    3116   3117  partials/favicons.html
    24.946966ms   24.946966ms   24.946966ms          0        0       0      1  _internal/_default/sitemap.xml
    21.683486ms       8.625µs      56.337µs          0        0       0   2514  shortcodes/rawhtml.html
     4.409197ms     881.839µs    1.228166ms          0        0       0      5  shortcodes/tab.html
     1.837825ms         589ns      46.988µs        100        0       0   3117  partials/custom/head-end.html
      624.158µs     104.026µs     586.997µs          0        0       0      6  shortcodes/cards.html
      385.126µs     192.563µs     364.407µs        100        0       0      2  partials/language-switch.html
      251.657µs     251.657µs     251.657µs          0        0       0      1  shortcodes/hextra/feature-grid.html
      220.678µs     220.678µs     220.678µs          0        0       0      1  shortcodes/icon.html
      162.938µs      81.469µs      143.15µs          0        0       0      2  shortcodes/tabs.html
      160.524µs     160.524µs     160.524µs          0        0       0      1  shortcodes/hextra/hero-badge.html
      118.484µs     118.484µs     118.484µs          0        0       0      1  shortcodes/hextra/hero-headline.html
      113.495µs     113.495µs     113.495µs          0        0       0      1  404.html

                   |  EN
-------------------+-------
  Pages            | 3719
  Paginator pages  |    0
  Non-page files   |    0
  Static files     | 6726
  Processed images |    0
  Aliases          |    0
  Sitemaps         |    1
  Cleaned          |    0

Total in 348461 ms

Someone at Hugo forum pointed out :

https://github.com/imfing/hextra/blob/main/layouts/partials/sidebar.html#L66-L95 4

The number of iterations increases quadratically in relation to the number of content pages (i.e., 3000 pages = 90,000,000 iterations).

Could you take a look?

For site with under 1000 pages, the build speed is tolerable. With ~1000 pages, the nested sidebar traversal and mobile navigation bar would consume tremendous time during build process.
Here's the overview of the plan:

Cache the entire sidebar and navigation when site is large, and dynamically expand the sidebar for the active page from client side
Set a configurable limit (e.g. 1000 pages)

when # of pages is smaller than it, dynamically build the page sidebars
when # of pages is larger than it, cache the sidebar, and add the client side script

bump. same issue.
also affects SEO with a lot of internal links spamming each page.  i did notice the sidebar-data-source and #376  any chance it will be merged soon ?
loving the theme so far.


Error: /usr/bin/xcodebuild failed with return code: 65

Describe the solution you'd like
I use swift language to code, and when I build with appcenter, there is an error code like this, deployment info is ios 14, after getting error code: 65,  i fixed ios 13, because according to log i read virtual running mac 10.15.3 so i think Xcode can't run ios 14. i fixed ios 13 but still error.
Describe alternatives you've considered
Additional context

Hi @mvn-trungle-dn! Thanks for submitting the issue! It looks like you have some problems building your app - please open a ticket through the App Center portal so that support engineers can help you with this issue. Here is the link that describes how to do it.

Hello,
I was fixed it. Thanks very much
Vào 20:07, Th 5, 17 thg 6, 2021 Andrei Kamenev @.***>
đã viết:

Hi @mvn-trungle-dn https://github.com/mvn-trungle-dn! Thanks for
submitting the issue! It looks like you have some problems building your
app - please open a ticket through the App Center portal so that support
engineers can help you with this issue. Here is the link
https://docs.microsoft.com/en-us/appcenter/help that describes how to
do it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/appcenter/issues/2209#issuecomment-863223385,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AQBEXINIYFG7U2UCLENHSO3TTHXQXANCNFSM46PBCW7Q
.

Same issue, @mvn-trungle-dn how did you fix this?

I fixed it. You update avatar for app, will fix it.
Vào 0:21, Th 6, 2 thg 7, 2021 Kostiantyn Solianyk @.***>
đã viết:

Same issue, @mvn-trungle-dn https://github.com/mvn-trungle-dn how did
you fix this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/appcenter/issues/2209#issuecomment-872420832,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AQBEXILVLFOW4VLQBHK3CR3TVSPYVANCNFSM46PBCW7Q
.


How to set setting clock skew ?

How to set clock skew ? Is there a way. Currently jwt is failing due to clock skews

Sorry, but I don't understand your problem. Can you provide more information?

Closed, because I published a complete new version.


reusing prepared statement PDSQLSRV510

PHP version  8.1.6
PHP SQLSRV or PDO_SQLSRV version  5.10
Microsoft ODBC Driver version  17
SQL Server version  14
Client operating system  windows 11
Table schema  CREATE TABLE [dbo].[cache](
[cac_id] [int] IDENTITY(1,1) NOT NULL,
[cac_key] [nvarchar 255] NULL,
[cac_is_object] [smallint] NULL,
[cac_end_time] [datetime] NULL,
[cac_value] [nvarchar max] NULL,
CONSTRAINT [PK_cache] PRIMARY KEY CLUSTERED
(
[cac_id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
Problem description  when reusing prepared statement updating nvarchar(max) field i sometimes get this error :
[Microsoft][ODBC Driver 17 for SQL Server]Troncation à droite de la chaîne de données
It works fine with php8.0 bugs with php 8.1
Repro code or steps to reproduce
connection string :
$dbh= new PDO('sqlsrv:Server='.MPI_HOST.";Database=".MPI_NAME.";MultipleActiveResultSets=true;", MPI_USER, MPI_PASSWORD,
array(PDO::ATTR_EMULATE_PREPARES => false,
PDO::ATTR_ERRMODE => PDO::ERRMODE_SILENT,
PDO::SQLSRV_ATTR_FORMAT_DECIMALS => true));
$sql="update cache set cac_value=? where cac_key='test'";
$stmt=$dbh->prepare($sql);
$stmt->execute(array($stringOfDataLengthLowerThan1000));
ok
$stmt->execute(array($stringOfDataLengthGreaterThan10000));
error with truncation message
If i do the first execute with the bigger string parameter it works fine.
If the first parameter is greater than  a limit (let's say datalength>5000) then the second will execute ok even if it's much bigger.

I think this is related to #1391, it's under investigation. Thanks for providing the details.

The fix has been merged, so close this now.


Infinite progress bar

Hi,
I have a scenario where I'm iterating through a cursor but while I'm iterating I'm already processing the results.
So, there is a considerable delay between the scanning and the final, here's a pseudo-example:
x = Queue.new
bar = ProgressBar.new(Float::INFINITY)

Thread.new do
  i = 0

  cursor.each do |foo|
    x << foo
  end

  bar.total = i
  x.close
end

Thread.new do
  while (item = x.pop)
    process(item)
    bar.increment!
  end
end

Would be nice to have the progress bar in a state that says how many were processed but not the total/ETA yet while that.
Otherwise, I have to implement some dark magic to wait until the scan is done:
x = Queue.new
mutex = Mutex.new
processed = 0
total = 0
bar = nil

Thread.new do
  cursor.each do |foo|
    x << foo
    total += 1
  end

  mutex.synchronize do
    bar = ProgressBar.new(total)
    bar.increment!(processed)
  end
end

10.times do
  Thread.new do
     while (item = x.pop)
      process(item)
      mutex.synchronize do
        processed += 1
        bar&.increment!
      end
    end
  end

I'd be willing to take a look at a PR that treated a max of nil as special, and not do the percent or ETA calculations that depend on knowing the max...


Commit history could be great proof of concept

Current history of this repository looks like this:
241636c0ac691b7e7eb63604354623ec7d5622f4
93fffe4756192c250a7234c7c5fd81752c747091
6ff152f29ea562c3ada62b173374ccc2f2c899f7
9e0ab1f3cfcf1d059d61b79ceb1dac2307cecaa5

I propose updating history so that commits are numbered in commit* order with pattern <commit-number>aa<rest-of-commit-hash>. Example:
1aa636c0ac691b7e7eb63604354623ec7d5622f4
2aaffe4756192c250a7234c7c5fd81752c747091
3aa152f29ea562c3ada62b173374ccc2f2c899f7
4aaab1f3cfcf1d059d61b79ceb1dac2307cecaa5
... in some far future ...
2137aaf3cfcf1d059d61b79ceb1dac2307cecaa5
2138aaf3cfcf1d059d61b79ceb1dac2307cecaa5

You might need #1 to achieve that.
* - I'd have called it "chronological" but git doesn't require that commits have in fact chronological timestamps.

Great idea! It really motivated me to keep pushing forward to see the commits in descending order 😄
https://github.com/wozniakpl/hashcommit/commits/main/
For now, I'm using 2-digit hashes. Once I can speed things up with parallel processing, I'll aim for 3 digits.


Feature/yousong guest ipmac

这个 PR 实现什么功能/修复什么问题:
guests: add modify-src-check support
climc: add server-modify-src-check

是否需要 backport 到之前的 release 分支:

release/2.13

/area region
/area climc
/cc @ioito  @swordqiu

Codecov Report

Merging #4291 into master will decrease coverage by <.01%.
The diff coverage is 0%.

@@            Coverage Diff            @@
##           master   #4291      +/-   ##
=========================================
- Coverage    6.86%   6.85%   -0.01%
=========================================
  Files         520     520
  Lines       88008   88044      +36
=========================================
  Hits         6039    6039
- Misses      81468   81504      +36
  Partials      501     501

Flag
Coverage Δ

#aFlag
6.85% <0%> (-0.01%)
:arrow_down:

Impacted Files
Coverage Δ

pkg/mcclient/options/servers.go
0% <ø> (ø)
:arrow_up:

pkg/cloudcommon/db/opslog.go
1.94% <ø> (ø)
:arrow_up:

pkg/compute/models/guests.go
0.56% <ø> (ø)
:arrow_up:

pkg/compute/models/guest_actions.go
0% <0%> (ø)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f36f006...e65081c. Read the comment docs.

/lgtm

/lgtm

/lgtm

/lgtm

/approve


When I do ask a specific question in IE Edge - it crashed

GitHub issues should be used for bugs and feature requests. See the Support section to get support related to Bot Framework and Web Chat.
Screenshots

Version
frame-markup:
<script>
                window.WebChat.renderWebChat(
                    {
                        directLine: window.WebChat.createDirectLine({
                            token: "secret"
                        }),
                        userID: "You",
                        username: "Web Chat User",
                        locale: "en-US",
                        styleOptions: {
                            rootHeight: "100%",
                            rootWidth: "100%",
                            backgroundColor: "rgb(245, 245, 245)",
                            bubbleBorderRadius: 8,
                            bubbleImageHeight: 240,
                            bubbleMaxWidth: 480,
                            bubbleMinHeight: 40,
                            bubbleMinWidth: 250,
                            messageActivityWordBreak: "break-word",
                            botAvatarInitials: " ",
                            avatarSize: 30,
                            fontSizeSmall: "80%",
                            bubbleBackground: "#0093D5",
                            bubbleTextColor: "#FFFFFF",
                            bubbleFromUserBackground: "#FFFFFF",
                            bubbleFromUserTextColor: "#000000",
                            bubbleFromUserBorderRadius: 8,
                            // Send box
                            hideSendBox: false,
                            hideUploadButton: true,
                            microphoneButtonColorOnDictate: "#F33",
                            sendBoxBackground: "White",
                            sendBoxButtonColor: "#767676",
                            sendBoxButtonColorOnDisabled: "#CCC",
                            sendBoxButtonColorOnFocus: "#333",
                            sendBoxButtonColorOnHover: "#333",
                            sendBoxHeight: 40,
                            sendBoxMaxHeight: 200,
                            sendBoxTextColor: "Black",
                            sendBoxBorderBottom: "",
                            sendBoxBorderLeft: "",
                            sendBoxBorderRight: "",
                            sendBoxBorderTop: "solid 1px #E6E6E6",
                            sendBoxPlaceholderColor: "#767676",
                            sendBoxTextWrap: false,
                            // Connectivity UI
                            connectivityIconPadding: 10 * 1.2,
                            connectivityMarginLeftRight: 10 * 1.4,
                            connectivityMarginTopBottom: 10 * 0.8,
                            connectivityTextSize: 12,
                            failedConnectivity: "#C50F1F",
                            slowConnectivity: "#EAA300",
                            notificationText: "#5E5E5E",

                            typingAnimationBackgroundImage: null,
                            typingAnimationHeight: 20,
                            typingAnimationWidth: 64,
                            // Suggested actions
                            suggestedActionBackground: "#FFFFFF",
                            suggestedActionBorder: "solid 2px #0063B1",
                            suggestedActionBorderRadius: 0,
                            suggestedActionImageHeight: 20,
                            suggestedActionTextColor: "#0093D5",
                            suggestedActionDisabledBackground: "#FFFFFF",
                            suggestedActionDisabledBorder: "solid 2px #E6E6E6",
                            suggestedActionDisabledTextColor: "#767676",
                            suggestedActionHeight: 40
                        }
                    },
                    document.getElementById("webchat")
                );
            </script>

I use this / Version:
https://cdn.botframework.com/botframework-webchat/latest/webchat-es5.js
Describe the bug
The webchat crashed after inserting this text "How are zou_" or "how are zou".
To Reproduce
Steps to reproduce the behavior:

Open Chat with IE Edge
Insert a question like "How are zou_" or "how are zou"
The webchat crashes
See error in the console (screenshot attached)

Expected behavior
It should not be crashed then with IE Edge and IE11.
Additional context
Is there a special setting in the backend of BotFramework needed?
[Bug]

Duplicate of #2187
The fix has been merged on https://github.com/microsoft/BotFramework-WebChat/pull/2195 We are optimistic that we will release a patch today. :)


Moved ServiceEndPoint from Connectivity module to Tapi (common) Module

Need to generate the Yang/Swagger files using the generator tool


Discussion: using package.el and straight.el together

straight.el looks like a real awesome package manager and I'd like to start using it right away. But I already have a massive spacemacs based config, so I'm wondering if I can make a gradual change towards straight somehow. For example, only using it to manage a few packages to start. Wondering if this  is a good idea and is possible at all.

Well, I would say that straight.el is much better than package.el in this respect, since straight.el will do only what you explicitly tell it to do in your init-file, and nothing more. As opposed to package.el which insists on activating all the packages you ever installed with it.
There should be no trouble at all with using both straight.el and other package managers, at least from the straight.el side. If you are going to be using straight.el together with package.el, you may want to set straight-enable-package-integration to nil, since otherwise straight.el will automatically disable some "features" (i.e. bugs which are defended vehemently on the mailing list) of package.el that cause package.el to modify the init-file.
The thing you have to be concerned about is duplicate packages. There is no inherent harm in loading a package twice, other than that your init may be slower and you might get some weird side effects if the two versions being loaded are not the same.
Another consideration is that use-package does not have support for using different package managers for the :ensure clauses in different use-package forms. This is not a problem straight.el can fix, although you may want to keep an eye on my new with-feature package, which will solve this problem among others. As a workaround, I would recommend disabling :ensure for the use-package forms that you wish to use straight.el, and then just putting a manual (straight-use-package 'whatever) above those use-package forms. I.e.
(straight-use-package 'el-patch)
(use-package el-patch
  :ensure nil
  <whatever>)

instead of
(use-package el-patch
  :ensure t
  <whatever>

In order for the use-package forms that do specify :ensure to keep using package.el rather than straight.el, you should set straight-enable-use-package-integration to nil.
Does this answer your question? Let me know if any other information would be helpful.

Also, for the question of "is it safe to use" in general, see the new known issue FAQ section.

Hi, what is "different use-package forms" you mentioned?
Are you recommend to use such style

(straight-use-package 'el-patch)
(use-package el-patch
:ensure nil
<whatever>)

for every package installed?
Currently I set config with

(use-package el-patch
:ensure t
<whatever>)

only. It seems works.

@caadar No, that's just for @rgrinberg's particular use case. What you're doing is already recommended. 😀

that's just for @rgrinberg's particular use case

Correct, the problem only arises when you want to use straight.el for packages and another package manager for others.

@raxod502 thanks for the reassuring response. I'm trying out straight.el and things are going great except for one situation. There are some packages where I'd like straight to simply install them from an existing local repositories instead of trying to clone them. Those are usually packages that aren't just emacs packages and hence need to be located where they are in other (non emacs) contexts. For example, the utop package that I'm trying to get working:
(straight-use-package
 '(utop
   :type git :repo "rgrinberg/utop"
   :local-repo "/home/rgrinberg/reps/ml/utop"
   :files "src/top/utop.el"
   :upstream (:host github :repo "diml/utop")))

Ideally, straight-el should simply assume that this package is cloned and just build it. But I can't figure out how to do that.

Currently straight.el only supports local repositories that are inside ~/.emacs.d/straight/repos. That is, :local-repo isn't resolved as a real path, it's just concatenated to the prefix I mentioned. So that's your problem.
The quick fix is to symlink the repository into ~/.emacs.d/straight/repos. In general, I would consider allowing a :local-repo that is outside of your ~/.emacs.d directory, if that would be a useful feature.

Thanks, this workaround is adequate. I think straight supporting local repos anywhere on the filesystem would be a useful feature.

I've created https://github.com/raxod502/straight.el/issues/133 to track this feature separately. Feel free to either close this issue or follow up with other questions.

Thanks again :) I will create new issues/questions as necessary

Actually, I have another question that probably doesn't deserve its own issue:
Is there a way to prevent straight from hacking use-package? The reason for that is that I already have use-package calls done by my spacemacs config and those packages are already being installed by the traditional package management system. It would be preferable would only install packages that are used through straight-use-package only.

(setq straight-enable-use-package-integration nil)

for more info, Integration with use-package. That's what I advise in https://github.com/raxod502/straight.el/issues/128#issuecomment-321956872, to allow for the default to remain package.el but for some packages to be installed via straight.el.

OK, thanks.

… except for the part where straight-enable-use-package-integration doesn't actually do anything(?!!?!), not sure how I screwed that up.

Fixed on develop.

@raxod502 said "package.el which insists on activating all the packages you ever installed with it."
I would like to point out that this is not necessarily the case if you call package-initialize with non-nil optional argument, e.g.,
(package-initialize 'no-activate)

This is how I have always use package.el so that I can have many installed packages, but activate only some of them by using a different init file when emacs starts.

@emacs18 You're right. It's only the default behavior which is flawed, at least in this case.
If you have a suggestion for a corresponding update to the comparisons section in the README, I'd be glad to consider it.

@raxod502 I'll look into providing a patch later.
In the mean time, I would like to ask you if the following could allow me to use straight.el along with spacemacs without duplicating packages:
(defun my--advice-package-installed-p (original-function &rest args)
  "Return t if package is installed via `straight' package manager."
  (or (and (fboundp 'straight--dir)
           (straight--dir "build" (symbol-name (car args))))
      (apply original-function args)))

(advice-add 'package-installed-p :around 'my--advice-package-installed-p)

I'm in the process of testing this idea.  I also considered writing use-package-ensure-straight similar to use-package-ensure-elpa to be set as the value of use-package-ensure-function variable.  However just advising package-installed-p seemed like a simpler idea.

@emacs18 Your advice doesn't take into account the case where a package was previously loaded using straight.el, but is not currently. Use this instead:
(defun my--advice-package-installed-p (original-function &rest args)
  "Return t if package is installed via `straight' package manager."
  (or (gethash straight--recipe-cache (car args))
      (apply original-function args)))

(advice-add 'package-installed-p :around 'my--advice-package-installed-p)

At some point it may be a good idea to expose some user-facing functions for getting information from the caches.
That said I can't guarantee that advising package-installed-p will actually stop package.el from loading duplicate packages. In fact, if I had to guess, I would say that duplicate loading will still take place.
By the way, straight.el already provides straight-use-package-ensure-function which it sets as the value of use-package-ensure-function. You would of course have to override this with your own version that delegates to both straight.el and package.el conditionally.

Actually, your original advice doesn't work at all. It always returns t.

Yes I forgot to add (file-directory-p) call.
Thanks for your advice.  I'll poke around some more.

The way :upstream works doesn't seem to work for a use case that I have. My standard practice for naming remotes is as follows:

origin - upstream, main repository
rgrinberg - my own fork

Where I only pull from origin and only push to rgrinberg. Is there a way to make straight respect this convention? Since I do have some emacs package repositories that live outside of straights control.

@rgrinberg Currently, there is no way to specify different remote names on a per-repository basis. However, you can change them globally by configuring straight-vc-git-primary-remote and straight-vc-git-upstream-remote. That probably doesn't really work for your use case, since you sometimes want origin to be the primary remote, and sometimes the :upstream (in the case that you have a fork). This specific problem will be alleviated by #114, but more generally it would be nice to allow customizing remote names directly in the recipe. I suggest you open a new issue to track it.

The code shown below allowed me to use straight.el and packge.el to install any
number of packages using straight.el, but let package.el (via use-package)
install the rest. My method of verifying that there were no duplications was to
make sure that load-path did not have path added by both straight.el and
package.el.
(defun my-straight-installed-p (package)
  "Return non-nil if PACKAGE is installed by `straight'."
  (and (fboundp 'straight--dir)
       ;; FIXME: Radon said to use this gethash call rather than straight--dir.
       ;; However this fails with "Wrong type argument: hash-table-p,
       ;; org-plus-contrib". So use straight--dir for now.
       '(gethash straight--recipe-cache package)
       ;; 'dash' package is cloned under 'dash.el' directory. That is why we
       ;; check for raw name as well as with ".el" appended.
       (or (file-directory-p (straight--dir "build" (symbol-name (car args))))
           (file-directory-p (concat (straight--dir "build" (symbol-name (car args))) ".el")))
       ))

(defun my--advice-package-installed-p (original-function &rest args)
  "Return t if package is installed via `straight' package manager. Otherwise
call the original function `package-installed-p'."
  (or (my-straight-installed-p (car args))
      (apply original-function args)))
(advice-add 'package-installed-p :around 'my--advice-package-installed-p)

(defun my--advice-package-activate (original-function &rest args)
  "Return t if package is installed via `straight' package manager. Otherwise
call the original function `package-activate'."
  (if (my-straight-installed-p (car args))
      (progn
        (unless (memq (car args) package-activated-list)
          ;; Not sure if package-activated-list needs to be updated here ...
          (push (car args) package-activated-list))
        t)
    (apply original-function args)))
(advice-add 'package-activate :around 'my--advice-package-activate)

With this method I was able to install any number packages by straight.el, and
the rest by package.el. At first I started with less than 10 packages installed
by straight.el, and 310+ installed by package.el.  I then gradually added more
packages to be installed by straight.el.  Now I have pretty much all 320+ pacakges
installed via straight.el and only a handful via package.el.
Spacemacs came up fine as well.
However calling straight-use-package on about 320 packages took more than 14
minutes. This is on a virtual ubuntu running via virtualbox with win10 as host
OS. Spacemacs on this same setup comes up in about 6 seconds if all 320+
packages are setup via package.el without using straight.el.
If the startup time can be reduced from about 15 minutes to less than a minute,
then I might be motivated to switch over to using straight.el exclusively and
not use package.el at all. I'm hoping that the slow startup is due to my mistake
which can easil be fixed.
Following is my init file to test straight.el. Code to setup spacemacs and my
other customization (includeing the code shown above) followed the code below.
This is not shown since it is not relevant.
;; (package-initialize)

(setq my-start-time (current-time))

(defun my-print-time (msg)
  (let ((elapsed (float-time (time-subtract (current-time) my-start-time))))
    (message "%s (%.3fs)" msg elapsed)))

(setq user-emacs-directory "/u/me/elisp/")

(custom-set-variables '(straight-enable-package-integration nil))

(load "/u/me/Public/straight.el/straight")

(straight--reset-caches)

(unless (and after-init-time (not (bound-and-true-p straight-treat-as-init)))
  (add-hook 'after-init-hook #'straight-finalize-transaction)
  (straight-begin-transaction)
  (straight-mark-transaction-as-init))

;; So meta.
Not sure if this is helpful.
Please let me know if there is anything else I can do to help
understand what is taking so long.
straight--transaction-exec                     2253<PHONE_NUMBER>8  0.3110135314
straight-use-package                           1634<PHONE_NUMBER>3  0.2177776934
straight--package-might-be-modified-p<PHONE_NUMBER>4488  0.7435701175
straight--cache-package-modifications<PHONE_NUMBER>5301  2.0305663919
straight--convert-recipe                       2440        1.8821768900  0.0007713839
straight-recipes-retrieve                      485         1.8590368450  0.0038330656
straight-recipes                               806         1.8564849809  0.0023033312
straight-recipes-emacsmirror-retrieve          321         1.7303635509  0.0053905406
straight-finalize-transaction                  1634        1.2360444370  0.0007564531
straight--save-build-cache                     171         1.2247415299  0.0071622311
straight--load-build-cache                     171         0.7969233699  0.0046603705
straight--activate-package-autoloads           467         0.5217148469  0.0011171624
straight-recipes-melpa-retrieve                485         0.0454132690  9.363...e-05
straight--get-call                             321         0.032518909   0.0001013050
straight--get-call-raw                         321         0.032428036   0.0001010219
straight-vc                                    830         0.0314635299  3.790...e-05
straight--register-recipe                      748         0.0314228160  4.200...e-05
straight-vc-keywords                           660         0.0275945299  4.180...e-05
straight--dir                                  3004        0.0262487459  8.737...e-06
straight--file                                 809         0.0212868049  2.631...e-05
straight--repository-is-available-p            748         0.018435396   2.464...e-05
straight--uncache-package-modifications        171         0.0093695809  5.479...e-05
straight-begin-transaction                     1634        0.0090953039  5.566...e-06
straight--add-package-to-load-path             467         0.0071420979  1.529...e-05
straight-vc-local-repo-name                    170         0.0050447479  2.967...e-05
straight-vc-git-local-repo-name                170         0.0027370300  1.610...e-05
straight--get-overridden-recipe                1634        0.0018399910  1.126...e-06
straight--transaction-p                        2253        0.0009042939  4.013...e-07
straight--autoload-file-name                   467         0.0006129540  1.312...e-06
straight--checkhash                            467         0.0005662019  1.212...e-06
straight--get-dependencies                     467         0.0005402970  1.156...e-06
straight-vc-git-keywords                       660         0.0002679830  4.060...e-07
straight-vc-git--decode-url                    6           3.3597e-05    5.599...e-06

OK.  Can you test with this version @emacs18?

Note, by the way: you will observe very very poor performance of straight.el in the case that you evaluate a lot of straight-use-package calls without wrapping said evaluation in a transaction. By default, init is considered a transaction. You are encouraged to also insert straight-transaction blocks into any of your interactive commands that evaluate Elisp code interactively.
In particular, your profiling

(elp-instrument-package "straight")
(elp-reset-all)
(mapcar #'straight-use-package '( ... )) ;; about 170 pacakges
(elp-results)

will have terrible performance compared to if you wrap the mapcar in a straight-transaction. This is due to several reasons, but the biggest is that straight.el checks all packages for modifications at the beginning of a transaction, because this is faster than checking each package individually. So if you don't wrap in a transaction, then you're checking all 320 packages for modifications 320 times. O(n²) makes everybody cry.

Also, food for thought. Would anybody be interested in me making a pull request to Spacemacs to add an option for using straight.el instead of package.el (much like there is an option to use helm vs. ivy or evil vs. the One True Keybindings)?

@raxod502 This thread may interest you in that case (or maybe not :woman_shrugging:): https://github.com/quelpa/quelpa/issues/93#issuecomment-143230503

Created https://github.com/syl20bnr/spacemacs/issues/9505.

Thanks for all the feedback.  I found out why things were taking so long.
It was because I launched emacs via
emacs -Q -l .../init-file-for-straight.el

If I do not use -Q and setup my ~/.emacs to do the equivalent thing, then the startup
time goes from 15 minutes down to 4 seconds.  Now that I know this, I'll just avoid using -Q, and instead mess with my ~/.emacs to setup straight.

See also this snippet from the user manual, which explains the proper way to load straight.el using emacs -Q -l .../init-file-for-straight.el.

There is one final user-facing note about the transaction system, which is important when you want to load your init-file after Emacs init has already completed, but before straight.el has been loaded (so you cannot just wrap the call in straight-transaction). To cover this edge case (which arises, for example, when you wish to profile your init-file using something like esup), you should use the following pattern:
(unwind-protect
    (let ((straight-treat-as-init t))
      "load your init-file here")
  (straight-finalize-transaction))

@emacs18 any chance you want to share your most recent versions of my-straight-installed-p etc., and perhaps indicate where within your user-init-file / dotspacemacs-filepath you've put it all?

Closing this issue since we have a Gitter for general discussion now. For requesting a better-supported way to use straight.el and package.el together with use-package, open a new issue.

Does that mean straight-enable-use-package-integration should be deprecated?

I don't see why; can you explain?

I thought most of the idea with straight-enable-use-package-integration, was to override the use of :ensure to use straight.el, instead of package.el. And later, I thought a separate keyword was added to use-package so that :ensure can now always correspond with package.el. Sorry if I misunderstand.

Everything you said is correct, except that you are omitting the part where in the default (i.e. non-deprecated) configuration, straight-enable-use-package-integration defines the :straight keyword that allows you to use straight.el with use-package. That part is definitely not deprecated as without it there is no way to use the packages together. You can read more in the docstrings of the relevant variables.


for loop for azimuthal averaging in isotropic functions

I inserted a for loop for the isotropic functions so that it can take arrays up to 4 dimensions.

I think we may be able to improve this in the future using my new xhistogram package.
For now it's fine as is.

Codecov Report

Merging #70 into master will decrease coverage by 0.72%.
The diff coverage is 77.27%.

@@            Coverage Diff             @@
##           master      #70      +/-   ##
==========================================
- Coverage   95.66%   94.93%   -0.73%
==========================================
  Files           2        2
  Lines         692      711      +19
  Branches      119      129      +10
==========================================
+ Hits          662      675      +13
- Misses         16       22       +6
  Partials       14       14

Impacted Files
Coverage Δ

xrft/tests/test_xrft.py
98.64% <100%> (-0.05%)
:arrow_down:

xrft/xrft.py
90.96% <75%> (-1.03%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8af5fc4...ec6f742. Read the comment docs.


Section seems to conflict with taxonomy when they share the same name

When a section name has the same value as a taxonomy's term, builded pages seems to conflict.
Issue detected when using nested sections with Hugo v24.1
see https://github.com/vjeantet/hugo-theme-docdock/issues/32 for a full explaination.
Not sure if it's a bug or a know and accepted limitation.

Not sure if it's a bug or a know and accepted limitation.

That it is. There are several similar potential naming conflicts. There is an open issue about tracking this and log some kind of warning.

thanks

@bep do you have a pointer of that open issue? I would like to subscribe to notifications for it.


add -preview=dip1021 to Phobos makefile

time to integrate dip1021
https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1021.md

Since -preview=dip1021 is a breaking change, shouldn't it be ineligible for the base language edition?

I guess the goal is to test it more in the wild, and adding the flag here just adds restrictions to Phobos' code without affecting any user code.

Everyone agrees that this is rejected.


feat: remove lambda module

We are migrating to ECS Scheduled Tasks and so no longer need the ETL Lambda's module so it can be removed.

Are you going to do the Terraform state cleanup locally?