feat: add readonly flag for filesystem cache

This PR introducing cache.readonly flag, which will disable modifying stored caches files and allow to work with them in parallel compilations.
https://github.com/webpack/webpack/issues/13581
What kind of change does this PR introduce?
feature
Did you add tests for your changes?
No. I will add if you think they are required here.
Does this PR introduce a breaking change?
No
What needs to be documented once your changes are merged?
cache.readonly flag should be documented in https://webpack.js.org/configuration/other-options/#cache section

Please add test

added test for that cache is not overwritten when readonly = true. Probably check for that old cache is reused while in readonly is needed too, but i dont find the way to figure this out from _modulesCache instance or any other. Maybe check by compilation time but it feels as fragile condition.

Not sure that this is the best solution. Maybe better prevent "storing" https://github.com/webpack/webpack/blob/master/lib/cache/PackFileCacheStrategy.js#L1068
https://github.com/webpack/webpack/blob/master/lib/cache/PackFileCacheStrategy.js#L1094

Yeah, i think you right. Will update pr as soon as get some free time

moved to https://github.com/webpack/webpack/pull/15470


Use actual gRPC library

Hi,
today was released v1.13.0 of gRPC Core library. But this crate currently uses v1.6.1 from 15. September 2017. There was tries to update library to version 1.8 (#139) or 1.10.0 (#171), but to today are not merged.
Is there any plan to update the underlining library? Do you need help with something?

Hi @JakubOnderka
We are going to upgrade gRPC Core in early July, probably still 1.10.x(#171).
The main blocker for #171 is 1.10.0 removes struct grpc_alarm in
grpc/proposal#53 and grpc/grpc#14015. grpc-rs needs alarm to notify
gRPC's CompletionQueue that there is a Future is Ready to poll.
I add it back in pingcap/grpc#11, 6471103, but that makes grpc-rs incompatible
with the official gRPC Core library. Users have to build grpc-rs staticlly
or install pingcap/gRPC. ☹

I understand that maintain fork is very hard. But according to https://github.com/grpc/grpc/pull/14015, they implemented that functionality in C++ layer, so it is not possible to reimplement it in Rust or use C++ implementation next to original C gRPC lib?

FYI, grpc++ alarm wrapper is working in progress, I am not familiar with c++, so it may take me few days.
If grpc++ alarm works well, we can still have the nice link feature, GRPCIO_SYS_USE_PKG_CONFIG.
https://github.com/pingcap/grpc-rs/blob/ae0130db0e3fe430e7526be37dc67358a22b2f65/grpc-sys/build.rs#L154

Is #203 closing this issue?

@overvenus PTAL

Closing


Fix for WFCORE-1784. Attachment to use the right target directory in …

…all cases.
Fixed the case and added unit test.

This is good to merge, thanks!


Last 4 credit card digits as a string

Summary
Represent last four digits of credit card as a string. The private code backing this has similar changes. It will make credit card numbers with leading digits of 0 in the last 4 digits show properly in the System Console, including invoices downloaded from the console.
Supporting PRs:
https://github.com/mattermost/customer-web-server/pull/529
https://github.com/mattermost/mattermost-server/pull/17996
Ticket Link
https://mattermost.atlassian.net/browse/MM-31950
UI Changes

Related Pull Requests

There is also an accompanying server change: https://github.com/mattermost/mattermost-server/pull/17996

Fixed display of last 4 credit card digits

Hello @neallred,
Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.

Oops! I forgot to clarify that this PR won't be testable until we can merge the related CWS PR: https://github.com/mattermost/customer-web-server/pull/529 . The CWS PR should be testable, though.

@neallred let's merge this change and related server PR so it can make the next cloud release (FF monday). I will coordinate to do a release of the portal in parallel as well.

/cherry-pick cloud

Cherry pick is scheduled.

Error trying doing the automated Cherry picking. Please do this manually
+++ Updating remotes...
Fetching upstream
Failed to add the RSA host key for IP address '<IP_ADDRESS>' to the list of known hosts (/app/.ssh/known_hosts).
From github.com:mattermost/mattermost-webapp
   158bf2193..3c3fbad61  MM-22800_Keyboard-shortcuts-on-tooltip -> upstream/MM-22800_Keyboard-shortcuts-on-tooltip
 * [new branch]          MM-28338_combined-system-message-changes -> upstream/MM-28338_combined-system-message-changes
 * [new branch]          MM-28338_memoization-improvement -> upstream/MM-28338_memoization-improvement
   efaa6504a..ba90d2a5f  MM-36442-more-actions-restructure -> upstream/MM-36442-more-actions-restructure
   4cc8ece69..27afa1780  MM-37187_2-pluggable-to-ts -> upstream/MM-37187_2-pluggable-to-ts
 * [new branch]          MM-38326-getting-started-position -> upstream/MM-38326-getting-started-position
   103730c6c..99e39d15c  cloud                  -> upstream/cloud
   8cbbdd00e..884cc013c  hh_more-direct-channels -> upstream/hh_more-direct-channels
   571322b7f..eeb471bec  master                 -> upstream/master
   86373f3a7..f5e7fe49b  refactor-is-mobile-alt -> upstream/refactor-is-mobile-alt
   2543dab46..7e02b72f5  release-6.0            -> upstream/release-6.0
Fetching origin
Failed to add the RSA host key for IP address '<IP_ADDRESS>' to the list of known hosts (/app/.ssh/known_hosts).
+++ Updating remotes done...
+++ Creating local branch automated-cherry-pick-of-mattermost-webapp-#8463-upstream-cloud-1632177225
Switched to a new branch 'automated-cherry-pick-of-mattermost-webapp-#8463-upstream-cloud-1632177225'
Branch 'automated-cherry-pick-of-mattermost-webapp-#8463-upstream-cloud-1632177225' set up to track remote branch 'cloud' from 'upstream'.

+++ About to attempt cherry pick of PR #8463 with merge commit 1849601f1c09e13353696a7b4132bebe0aab3355.

The previous cherry-pick is now empty, possibly due to conflict resolution.

You are currently cherry-picking commit 1849601f1.

nothing to commit, working tree clean
!!! git cherry-pick failed

+++ Aborting in-progress git cherry-pick.

+++ Returning you to the master branch and cleaning up.

@amyblais This PR did make it to the Fast-Foward today so it doesn't need to be cherrypicked


Flatten hyper tree package

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@9b16e9e). Click here to learn what that means.
The diff coverage is 94.18%.

@@            Coverage Diff            @@
##             master      #72   +/-   ##
=========================================
  Coverage          ?   70.12%
=========================================
  Files             ?       57
  Lines             ?     2892
  Branches          ?        0
=========================================
  Hits              ?     2028
  Misses            ?      749
  Partials          ?      115


TypeError: Can't mix strings and bytes in path components

I am trying to do inference on one of the default dataset images suggested in the Readme.md

`user#:/home/ubuntu/SRGAN-PyTorch# python test_image.py --arch srgan --lr /home/ubuntu/SRGAN-PyTorch/data/train/0001.png --hr /home/ubuntu/SRGAN-PyTorch/data/0001_HR.png --model-path /home/ubuntu/SRGAN-PyTorch/weights/lpips_vgg.pth --pretrained --gpu 0
[ WARNING ] Directory `/home/ubuntu/SRGAN-PyTorch/tests` already exists!
[ INFO ] TestEngine:
[ INFO ] 	API version .......... 0.3.0
[ INFO ] 	Build ................ 2021.06.13
[ INFO ] Using pre-trained model `srgan`.
Traceback (most recent call last):
  File "test_image.py", line 150, in <module>
    main(args)
  File "test_image.py", line 59, in main
    model = configure(args)
  File "/home/ubuntu/SRGAN-PyTorch/srgan_pytorch/utils/common.py", line 46, in configure
    model = models.__dict__[args.arch](pretrained=True)
  File "/home/ubuntu/SRGAN-PyTorch/srgan_pytorch/models/generator.py", line 104, in srgan
    return _gan("srgan", pretrained, progress)
  File "/home/ubuntu/SRGAN-PyTorch/srgan_pytorch/models/generator.py", line 92, in _gan
    state_dict = load_state_dict_from_url(model_urls[arch], progress=progress, map_location=torch.device("cpu"))
  File "/opt/conda/lib/python3.8/site-packages/torch/hub.py", line 517, in load_state_dict_from_url
    cached_file = os.path.join(model_dir, filename)
  File "/opt/conda/lib/python3.8/posixpath.py", line 90, in join
    genericpath._check_arg_types('join', a, *p)
  File "/opt/conda/lib/python3.8/genericpath.py", line 155, in _check_arg_types
    raise TypeError("Can't mix strings and bytes in path components") from None
TypeError: Can't mix strings and bytes in path components

`
facing similar problem while test_benchmark as well.

Sorry, I haven't uploaded the new weight yet.

okay, let me know when you make them available.
appreciate the quick reply.

Sorry, I haven't uploaded the new weight yet.

I trained my own model and I attempted to benchmark as well, but I have the same problem.
Will different weights fix this issue? As the problem looks to be the way some path is encoded somewhere.

Sorry, I haven't uploaded the new weight yet.

hello,I also meet this problem,do you know how to fix it ？

7.5 soon

Hello! I am also facing the same problem and looking forward to new weights.

Same error for video:
Traceback (most recent call last):
File "test_video.py", line 170, in
main(args)
File "test_video.py", line 59, in main
model = configure(args)
File "/content/SRGAN-PyTorch/srgan_pytorch/utils/common.py", line 46, in configure
model = models.dictargs.arch
File "/content/SRGAN-PyTorch/srgan_pytorch/models/generator.py", line 104, in srgan
return _gan("srgan", pretrained, progress)
File "/content/SRGAN-PyTorch/srgan_pytorch/models/generator.py", line 92, in _gan
state_dict = load_state_dict_from_url(model_urls[arch], progress=progress, map_location=torch.device("cpu"))
File "/usr/local/lib/python3.7/dist-packages/torch/hub.py", line 546, in load_state_dict_from_url
cached_file = os.path.join(model_dir, filename)
File "/usr/lib/python3.7/posixpath.py", line 94, in join
genericpath._check_arg_types('join', a, *p)
File "/usr/lib/python3.7/genericpath.py", line 155, in _check_arg_types
raise TypeError("Can't mix strings and bytes in path components") from None
TypeError: Can't mix strings and bytes in path components

New weights upload


[MINOR][DOCS] Add lost  tag for configuration.md

What changes were proposed in this pull request?
Add lost  tag for configuration.md.
How was this patch tested?
N/A

Test build #78335 has started for PR 18372 at commit e4350bb.

Test build #78335 has finished for PR 18372 at commit e4350bb.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/78335/
Test PASSed.

Now it's like this:

Merged to master/2.2


BT

Hello,  @cuihairu
I have the same motherboard as you, but I wanted to ask you something. Are you able to listen to music or watch videos smoothly with Bluetooth headphones? Mine works, but the audio keeps "stuttering" or "cutting out." I've tried other Bluetooth headphones, even AirPods, but the same problem happens.

I tested my setup with a JBL 104-BT Bluetooth speaker, and I noticed a similar issue where the audio stutters or cuts out. I usually use a wired connection, which works perfectly fine. It seems there may be an underlying issue with Bluetooth performance on this motherboard, as the problem persists even when using different Bluetooth headphones, including AirPods.
If anyone else is experiencing this or has found a solution, I’d appreciate any insights!

I've been looking for a solution for a few days now but still haven't found one... However, I made a change to the EFI, and it improved things by about 80%. Now I can listen to a whole song without as much stuttering as before; it only "glitches" a bit occasionally.
What I did was disable the processor topology, which apparently is only for processors with e-cores, which isn't my case.
Want to give it a try and see if you can find something?
I5-12400F


Read settings from configuration file

JSON, YAML? Comments?
/etc/piriscope.conf
Update init.d script: piriscope -c /etc/piriscope.conf
Still also support command-line configuration (e.g. piriscope -k xxxxxxxx)

Implemented.


Add link back to home page to SeeChange logo

I'm submitting a feature request.
What feature do you recommend to add?
SeeChange logo on top of the page should lead back to the home page for a smooth User experience:

What is the value of this feature?
Users can come back to the main page at any moment. There is a perception that clicking on the logo returns the user to the home page.
Solution

[ ] Logo is a link that returns the user to the Home page: / locally or https://council-emissions-calculator-spike-flax.vercel.app/ for staging and http://seechange.codeforaustralia.org/ for production.

Link to Trello card

 [DEV]: Add link back to home page to SeeChange logo

This is great . Well done Lester.

This is great . Well done Lester.

Thank you :)


Improvement? Difference between background and foreground

Hi,
I wonder why the distinction was made between receiving values in the background and foreground.
Now you have to check if the initial deeplink was not null.
final initialLink = await getInitialLink();
if (initialLink != null) {
  ...
}

As well as also listen on the stream when a deeplink was received in the foreground.
getLinksStream().listen(...)

We implemented a simple wrapper inside our app which deals with this.
Only exposes 1 stream where all events are posted including the initial one.
I wondered if it was something you'd be interested in to include in the lib already?
The helper class itself.
import 'dart:async';

import 'package:rxdart/rxdart.dart';
import 'package:uni_links/uni_links.dart';

/// Adds a wrapper around the uni_links library.
class DeepLinkHelper {
  StreamSubscription<String> _deepLinkStreamSubscription;
  final BehaviorSubject<String> _deepLinkSink = BehaviorSubject();
  Stream<String> get deepLinkStream => _deepLinkSink.stream;

  DeepLinkHelper() {
    _postInitialLink();
    _deepLinkStreamSubscription = getLinksStream().listen(_deepLinkSink.add);
  }

  void _postInitialLink() async {
    try {
      final initialLink = await getInitialLink();
      if (initialLink != null) {
        _deepLinkSink.add(initialLink);
      }
    } finally {}
  }

  void dispose() {
    _deepLinkStreamSubscription.cancel();
  }
}

@timrijckaert You have a example of use for this class? Thanks

Like I said, we use it as one gateway of all things deeplink and it has been working perfectly so far.

Please provide an example.


Trying to scrape DTU course description

I'm trying to scrape https://kurser.dtu.dk/course/2022-2023/01001 and all the other courses for DTU.
However, I'm stuck at getting the info from the page, I want to loop through all the courses and return the following:

Course name
Language
Course type (MSc or BSc)
Professor name
Institue

So if anyone have done something similar or just know a way around then I would love to hear it.
PS: It's a dynamic web page so it isn't possible to use BeautifulSoup so I'm using Selenium for it

Dear Oliver. Hope you found an answer to this. Otherwise try to bring it up in your supervision today.
Cheers
Andreas


hot-swapping loosing signals

Hey,
I tried to use this example https://github.com/evancz/elm-architecture-tutorial/blob/master/examples/1/Counter.elm running elm-reactor  then editing some action like Increment or Decrement, code changes seem to be swapped but application itself seems to loose ability to receive any signals and looses onClick events.

This is a known issue already reported.

Seems to be a duplicate of #127


Media is not visible on Oculus 2/3

I followed exactly those steps:

Clone this project.
Open the project with Unity 2022.3.9f1 (Android Build).
From the Hierarchy tab, find Canvas > Gallery. and in the Inspector tab, find ImageLoader script, Check the box of ”ReadyToBuild”.
Navigate to File > Build Settings..., select the Android platform, then select your Meta Quest Pro as the Run device (if it's plugged in) and then click on Build and Run.

The result:
In the Unity3D editor, everything works fine. I can see the thumbnails and start the 3D view
In the Oculus 2/3, I can see only the gray plane and there is no media visible.

No media？Please check media folder. Put your 3D media files into the "sdcard/Pictures/3dMedia" folder.(If you can’t see this folder, please open the app once, then close it and try again)

I checked the internal storage of my Oculus 3 and I discovered a folder /Pictures/3dMedia (no /sdcard/Pictures/3dMedia) with two files. I am sure that this folder was created by the XR.Stereoscopic.Viewer.0.2.2.apk which I tried before I downloaded the source files for Unity.
Also, if you read the code in ImageLoader script then the files in internal storage in the /sdcard/Pictures/3dMedia are not supposed to be used if the boolean value of ”ReadyToBuild” is false (unchecked in the inspector).
However, I tried also the boolean value of ”ReadyToBuild” with true flag and even though that I put some stereoscopic files into the /Pictures/3dMedia folder, the media did not appear.
After this test, I set the value of ”ReadyToBuild” againt to false. I created a new folder in Unity and named it "StreamingAssets". I put several stereoscopic images in to this folder and changed the code in the ImageLoader script from the folder "Media" to "StreamingAssets".
In the Editor, everything worked fine. In the Oculus 3, no media at all.

I’m sorry for the mistake. You should select “ReadyToBuild” with the true flag for sure. Maybe the app hasn’t been granted permission to access local files?

First of all, many thanks for your support!
Each time, when I install the app, I always uninstall the old app. This is also the reason that the system asks me on every start to grant the permission to access the local storage and I alway allow this step. However, the desired folder " /sdcard/Pictures/3dMedia" does not appear on my Oculus.
You are right, this folder should be created after the first start of the app in the Oculu headset.

Did you tried the release version: https://github.com/Eis4TY/XR-Stereoscopic-Viewer/releases
has same problem?

I found the issue. I did not activated the experimental features on my Oculus headset. However, the Unity project seems to use some experimental features since I get following question (see screenshot)

If I confirm that I would to use the experimental features in Unity in my Oculus headset wich is not enebled for the experiments, the app does get the permissions to access the internal storage. This cause the issue with the invisible media.
THE SOLUTION:
If you get similar question in Unity and your device is not enebled for experimental use, DO NOT confirm that you are going to use the experimental features.


windows10 error

I set the environment variable. but when i use
go install   show the error:

How to solve???

the environment variable is the openssl lib and include

@sayyoume  plz take a look at this page https://github.com/xeodou/go-sqlcipher/wiki/Building#issues , it's because of the OpenSSL installed in MingW with different lib name.

Followed the actions in the issue and still got the same error.

Followed the actions in the issue and still got the same error.

What error do you get? Did you follow the instruction here https://github.com/xeodou/go-sqlcipher/wiki/Building#issues

Env:
$ gcc --version
gcc.exe (MinGW-W64 x86_64-posix-seh, built by Brecht Sanders) 10.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Here is the errors:
$ go get github.com/xeodou/go-sqlcipher
# github.com/xeodou/go-sqlcipher
d:/devenv/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible d:/devenv/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../
../../../x86_64-w64-mingw32/lib/../lib/libcrypto.a when searching for -lcrypto
d:/devenv/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible d:/devenv/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../
../../../x86_64-w64-mingw32/lib/../lib\libcrypto.a when searching for -lcrypto
d:/devenv/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible d:/devenv/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../
../../../lib/libcrypto.dll.a when searching for -lcrypto
d:/devenv/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible d:/devenv/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../
../../../x86_64-w64-mingw32/lib/libcrypto.a when searching for -lcrypto
d:/devenv/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible d:/devenv/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../
../../../x86_64-w64-mingw32/lib\libcrypto.a when searching for -lcrypto
d:/devenv/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible d:/devenv/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../
../../libcrypto.dll.a when searching for -lcrypto
d:/devenv/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible d:/devenv/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../
../../../x86_64-w64-mingw32/lib/../lib/libcrypto.a when searching for -lcrypto
d:/devenv/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible d:/devenv/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../
../../../lib/libcrypto.dll.a when searching for -lcrypto
d:/devenv/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible d:/devenv/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../
../../../x86_64-w64-mingw32/lib/libcrypto.a when searching for -lcrypto
d:/devenv/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible d:/devenv/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../
../../libcrypto.dll.a when searching for -lcrypto
d:/devenv/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lcrypto
d:/devenv/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible d:/devenv/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../
../../../x86_64-w64-mingw32/lib/../lib/libcrypto.a when searching for -lcrypto
d:/devenv/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible d:/devenv/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../
../../../lib/libcrypto.dll.a when searching for -lcrypto
d:/devenv/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible d:/devenv/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../
../../../x86_64-w64-mingw32/lib/libcrypto.a when searching for -lcrypto
d:/devenv/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible d:/devenv/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../
../../libcrypto.dll.a when searching for -lcrypto
collect2.exe: error: ld returned 1 exit status
# github.com/xeodou/go-sqlcipher
sqlite3-binding.c: In function 'sqlite3SelectNew':
sqlite3-binding.c:130284:10: warning: function may return address of local variable [-Wreturn-local-addr]
130284 |   return pNew;
       |          ^~~~
sqlite3-binding.c:130244:10: note: declared here
130244 |   Select standin;
       |          ^~~~~~~

It basically follows that steps, but is slightly different because of the OpenSSL version change. I installed the 1.1.1h version. And I copied lib\MinGW\libcrypto.def and lib\MinGW\libcrypto.dll.a from the OpenSSL installation directory to the mingw64\x86_64-w64-mingw32\lib directory, and renamed libcrypto.dll.a to to libcrypto.a; copied the include under OpenSSL to mingw64\x86_64-w64-mingw32\include.

Did any of the steps go wrong?

The reason for using OpenSSL 32-bit is that there is no lib file for MingW under OpenSSL 64-bit.

After put OpenSSL(64 bit)\lib\libcrypto.def and OpenSSL(64 bit)\lib\libcrypto.lib(rename to libcrypto.a) and include\openssl to mingw64 directory, everything works fine.

I create a demo like this:
package sqlite3_demo

import (
	"database/sql"
	"fmt"
	"log"
	"os"

	"github.com/jinzhu/gorm"
	_ "github.com/xeodou/go-sqlcipher"
)

type Product struct {
	gorm.Model
	Code  string
	Price uint
}

func RunDemo() {
	run()
}

func openDB(dbPath, key string) (*gorm.DB, error) {
	db, err := gorm.Open("sqlite3", dbPath)
	if err != nil {
		log.Fatal(err)
		return nil, err
	}

	p := fmt.Sprintf("PRAGMA key = '%s';", key)
	db = db.Exec(p)
	return db, nil
}

func run() {
	dbPath := "./xeodou.db"
	key := "123456"

	db, err := openDB(dbPath, key)
	if err != nil {
		log.Fatal(err)
	}
	defer db.Close()

	db.AutoMigrate(&stock{})

	var existS stock
	if db.Model(&stock{}).Where(&stock{
		Symbol: "a",
	}).Find(&existS).RecordNotFound() {
		s := stock{
			Date:   "1",
			Trans:  "b",
			Symbol: "a",
			Qty:    10,
			Price:  0,
		}
		db.Save(&s)
		return
	}

	fmt.Println(existS)
}

Generates a db file after the first normal run, opens the db file on the second run with an error:

file is not a database

I'm having a strange problem. I was able to get it installed and running on one PC, but on another PC I was experiencing the following error:
# github.com/xeodou/go-sqlcipher
C:\Users\PINGQI~1\AppData\Local\Temp\go-build372864814\b056\_x012.o: In function `sqlcipher_openssl_deactivate':
E:\data\Go\pkg\mod\github.com\xeodou\go-sqlcipher@v0.0.0-20200727080346-d681773ef093/sqlite3-binding.c:24452: undefined reference to `EVP_cleanup'
C:\Users\PINGQI~1\AppData\Local\Temp\go-build372864814\b056\_x012.o: In function `sqlcipher_openssl_activate':
E:\data\Go\pkg\mod\github.com\xeodou\go-sqlcipher@v0.0.0-20200727080346-d681773ef093/sqlite3-binding.c:24423: undefined reference to `OPENSSL_add_all_algorithms_noconf'
C:\Users\PINGQI~1\AppData\Local\Temp\go-build372864814\b056\_x012.o: In function `HMAC_CTX_new':
E:\data\Go\pkg\mod\github.com\xeodou\go-sqlcipher@v0.0.0-20200727080346-d681773ef093/sqlite3-binding.c:24346: undefined reference to `HMAC_CTX_init'
C:\Users\PINGQI~1\AppData\Local\Temp\go-build372864814\b056\_x012.o: In function `HMAC_CTX_free':
E:\data\Go\pkg\mod\github.com\xeodou\go-sqlcipher@v0.0.0-20200727080346-d681773ef093/sqlite3-binding.c:24358: undefined reference to `HMAC_CTX_cleanup'
E:\data\Go\pkg\mod\github.com\xeodou\go-sqlcipher@v0.0.0-20200727080346-d681773ef093/sqlite3-binding.c:24358: undefined reference to `HMAC_CTX_cleanup'
E:\data\Go\pkg\mod\github.com\xeodou\go-sqlcipher@v0.0.0-20200727080346-d681773ef093/sqlite3-binding.c:24358: undefined reference to `HMAC_CTX_cleanup'
collect2.exe: error: ld returned 1 exit status

The installation of OpenSSL and the system environment variables have been checked on both machines and they are consistent.

I'm having a strange problem. I was able to get it installed and running on one PC, but on another PC I was experiencing the following error:
# github.com/xeodou/go-sqlcipher
C:\Users\PINGQI~1\AppData\Local\Temp\go-build372864814\b056\_x012.o: In function `sqlcipher_openssl_deactivate':
E:\data\Go\pkg\mod\github.com\xeodou\go-sqlcipher@v0.0.0-20200727080346-d681773ef093/sqlite3-binding.c:24452: undefined reference to `EVP_cleanup'
C:\Users\PINGQI~1\AppData\Local\Temp\go-build372864814\b056\_x012.o: In function `sqlcipher_openssl_activate':
E:\data\Go\pkg\mod\github.com\xeodou\go-sqlcipher@v0.0.0-20200727080346-d681773ef093/sqlite3-binding.c:24423: undefined reference to `OPENSSL_add_all_algorithms_noconf'
C:\Users\PINGQI~1\AppData\Local\Temp\go-build372864814\b056\_x012.o: In function `HMAC_CTX_new':
E:\data\Go\pkg\mod\github.com\xeodou\go-sqlcipher@v0.0.0-20200727080346-d681773ef093/sqlite3-binding.c:24346: undefined reference to `HMAC_CTX_init'
C:\Users\PINGQI~1\AppData\Local\Temp\go-build372864814\b056\_x012.o: In function `HMAC_CTX_free':
E:\data\Go\pkg\mod\github.com\xeodou\go-sqlcipher@v0.0.0-20200727080346-d681773ef093/sqlite3-binding.c:24358: undefined reference to `HMAC_CTX_cleanup'
E:\data\Go\pkg\mod\github.com\xeodou\go-sqlcipher@v0.0.0-20200727080346-d681773ef093/sqlite3-binding.c:24358: undefined reference to `HMAC_CTX_cleanup'
E:\data\Go\pkg\mod\github.com\xeodou\go-sqlcipher@v0.0.0-20200727080346-d681773ef093/sqlite3-binding.c:24358: undefined reference to `HMAC_CTX_cleanup'
collect2.exe: error: ld returned 1 exit status

The installation of OpenSSL version and the system environment variables have been checked on both machines and they are consistent.
mingw64\include\openssl\opensslv.h and mingw64\x86_64-w64-mingw32\include\openssl\opensslv.h
# define OPENSSL_VERSION_NUMBER  0x1010108fL
# define OPENSSL_VERSION_TEXT    "OpenSSL 1.1.1h  22 Sep 2020"

any clue?

This looks like the libcrypto is undefined for the library. Can you double you have the files in the right place?
Or you can build the library with the specific OpenSSL library for example,
CGO_ENABLE=1 CGO_LDFLAGS="-L/usr/local/opt/openssl/lib" CGO_CPPFLAGS="-I/usr/local/opt/openssl/include" go build _example/encrypto/encrypto.go

I don't own a Windows laptop anymore. I probably can make a test at the weekend using a virtual machine.

@xeodou After going over the OpenSSL headers several times, found several OpenSSL headers in the x86 folder that were not replaced with the x64 version.
After replacing them, it works fine. Thanks again!


wake word issue

Im having issue to detect the wake work (porcupine Works), but no other.
I testes with respeaker 4 mic array, rspeaker 2 mic, and matrix voice.
Same thing with raspberry 4 (2gb) and raspberry pi 3
Using the latest version of raspian.
Any tips or advise?

Please consider upgrading to Rhasspy 2.5 and trying out Mycroft Precise or snowboy. Most of my testing has been going towards Precise.


Add Search Button in Projects Section

🛠 Fixes Issue #143
Closes #143

👨💻 Changes proposed
Removed the list of clones, and now on clicking on search icon, the website will be redirected

✔ Check List (Check all the applicable boxes)

[x] My code follows the code style of this project.
[x] This PR does not contain plagiarized content.
[x] The title of my pull request is a short description of the requested changes.

📄 Note to reviewers

📷 Screenshots

This branch is 6 commits ahead, 3 commits behind Rayman-Sodhi:main.

Can you make a video of something how it's working? and upload here! @zugzwang03

I updated my fork, and it is up to date with your repository. You can check its working from this website : https://zugzwang03.github.io/Clone-IT/

I updated my fork, and it is up to date with your repository. You can check its working from this website : https://zugzwang03.github.io/Clone-IT/

But it's not working, That's y I ask for video

The process is like: I type "Apple Clone" in the search box, and press the search icon, and the apple clone website is redirected to me. Similar thing goes for all other clones, but for any typo, the working will not show. Also, if the input box is blank, the working will not show. Try once again now, if it does not work still, I am trying to make a video.

Can you change a little bit CSS like changing the width of the search bar and fix it to center or corner that your choice where it looks good @zugzwang03

The process is like: I type "Apple Clone" in the search box, and press the search icon, and the apple clone website is redirected to me. Similar thing goes for all other clones, but for any typo, the working will not show. Also, if the input box is blank, the working will not show. Try once again now, if it does not work still, I am trying to make a video.

yeah it's working, actually, I used it on mobile so I didn't see a search icon no it's working on lappy

I tried, but changing the CSS is distorting the layout of the clone boxes placed below. It is better if someone else takes up that issue of making it user responsive in every device.


Theme changes

ES Store theme changes

This pull request is merged manually and pushed in to the repository.


Fix Scorecard tests

Some Scorecard tests have failed similarly to PP #142 PR:

olm-crds-have-resources-test
olm-spec-descriptors
olm-status-descriptors-test

Using API code markers for CSV in the CR_types.go file resolves that (see also here).
Signed-off-by: oraz<EMAIL_ADDRESS>

awesome.
/lgtm


add spanmetrics connector and count connector

Original issue: https://github.com/signalfx/splunk-otel-collector/issues/3298
This PR adds:

spanmetrics connector: Currently the processor is included but is more than a little fiddly to setup. The connector streamlines this.
count connector: Count connector allows creating metrics from logs (and other types like spans, traces, etc).
Adds these connectors to the docs

Examples would be provided in the next PR

Review comments are addressed and checks are passing. Let me know if you notice anything else you'd like changed up.
Thanks again!!


Retry connection to matrix server

The problem to solve
The matrix bot sdk seems to only try connecting to the server once, and doesn't retry, so if the bridges and synapse are started at the same time (e.g. in docker swarm, which expects applications to handle retry logic themselves) then the bridge just errors instantly from not being able to resolve the hostname, leaving it to the downstream consumer to properly handle it.
Proposed solution
I took a look and it doesn't seem like the request library this uses has a built-in way to do retries, so this probably goes along with #90. If got is chosen, that has nice facilities for handling retries: https://github.com/sindresorhus/got#retry
Alternatives
It could make sense to leave it to the downstream consumer to properly handle this stuff, but I think it would be better if this were handled upstream with the goal of keeping the matrix bot stuff as easy to use as possible. I don't think there is any real harm in retrying at least a few times for a few minutes.

Duplicate of https://github.com/turt2live/matrix-bot-sdk/issues/18


"whilespace" in PSScriptAnalyzer(PSMisleadingBacktick)

Type: Bug
Short cosmetic issue  "whilespace" instead of "whitespace"

Start VSCode with a new PowerShell File. (ps1)
Add the following code (there is a space after the backtick)

get-item `
-path c:\temp

Wait for the Hint about "PSMisleadingBacktick" from PSScriptAnalyzer
click on "quick fix"
The Menue offers "Remove training whilespace"  "l" instead of "t"

VS Code version: Code 1.95.2 (e8653663e8840adaf45af01eab5c627a5af81807, 2024-11-07T11:07:22.054Z)
OS version: Windows_NT x64 10.0.26100
Modes:

Just updated and the typo is still there
Version: 1.95.3 (user setup)
Commit: f1a4fb101478ce6ec82fe9627c43efbf9e98c813
Date: 2024-11-13T14:50:04.152Z
Electron: 32.2.1
ElectronBuildId: 10427718
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.26100

/extPowershell


Layout error in the hero search button in some locales

Description
I have found a small layout error in the hero image in some locales.
Reproduction
This may occur in other locales.
On https://fr.wordpress.org/openverse

Text protrudes from the button.

On https://ja.wordpress.org/openverse/

The letters on the buttons are vertically aligned.
Gallery images are placed above the search box at certain browser widths,

https://user-images.githubusercontent.com/54422211/158922847-85a81c72-ef82-46d5-99ea-5f5c8f82fcee.mp4
Expectation
I believe the following modifications are needed:

Increase z-index value of header components
Change the width of the search button to auto and insert left/right padding instead.

Environment

Device: Laptop
OS: Windows 11
Browser: Google Chrome 99.0.4844.51

Resolution

[x] 🙋 I would be interested in resolving this bug.

I have yet to contribute to this project, but I am sure it can be fixed with just a CSS change, so I want to try.😃

Thank you for reporting this, @t-hamano ! This is actually a duplicate of #895, but since you have more screenshots and details, I will close that issue instead.
Welcome to Openverse, we are excited to see your contributions!

Oh, sorry I didn't check the issue enough.
I would like to submit a PR within a couple of days 👍

No problem, @t-hamano ! Thank you!


[PROPOSAL][CCI] Update a pull request template

What/Why
What are you proposing?
Updating/adding  a pull request template in this repository
What problems are you trying to solve?
Currently, new contributors, when trying to propose a PR, are faced with a a pretty minimal pull request template (Describe what this change  achieves, what issue will be closed).
While looking at other repos i noticed that they all have pull_request_templates in the ./github directory - but the main branch of this one doesn't (branches '1.x' and '1.1' do have it, for example). I'm not sure where's the current "default" PR request template is located/why is it like this - the above mentioned branches' templates have the checklist e.g. 1.x.
I propose to add a  PULL_REQUEST_TEMPLATE.md to the main branch with fuller template than the current one - by adding a check list to check for the PR submitter to check if commits are signed by DCO/ make sure that linter doesn't give errors/changelog is updated we can streamline pull request approval and integrate them faster because of that.

I would like to  add the PR template to the main branch (if i understood the issue correctly)

Hi @Wielmany, we use the standardized template layout from .github across all repos.

Hi @Wielmany, we use the standardized template layout from .github across all repos.

Ah, thank you!
Some repos: Opensearch Dashboard seem to use a custom templates(unless i'm missing something), i was thinking that custom template for our opensearch-js client would be quite useful, seeing how new contributors (especially those coming from CCI) might need a bit more guidance.


community: support advanced text extraction options for pdf documents

Description:

Updated constructors in PyPDFParser and PyPDFLoader to handle extraction_mode and additional kwargs, aligning with the capabilities of PageObject.extract_text() from pypdf.

Added test_pypdf_loader_with_layout along with a corresponding example text file to validate layout extraction from PDFs.

Issue: fixes #19735
Dependencies: This change requires updating the pypdf dependency from version 3.4.0 to at least 4.0.0.
Additional changes include the addition of a new test test_pypdf_loader_with_layout and an example text file to ensure the functionality of layout extraction from PDFs aligns with the new capabilities.

Just to know that if there is something I can do to help as I saw an activity on last week

is there a way we can make this backwards compatible with version 3 of pypdf?

@efriis do you think something like this can be ok?
if pypdf.__version__.startswith('4'):
    page_content = page.extract_text(
        extraction_mode=self.extraction_mode, **self.extraction_kwargs
    )
else:
    page_content = page.extract_text()

Could we reverse it to if pypdf.__version.startswith('3.'): do the old thing, otherwise new? Base assumption being future releases are additive
Will mark this a draft, feel free to mark ready to review when you want me to take a look!

Hi @efriis,
I just added the changes. You can check it. I mentionned you on it.
Feel free to tell me if there is something to change or do better.
Thanks!


Add evals result

What
Closes https://github.com/dask/dask-xgboost/issues/59
Adds local_evals dictionary to each workers xgb.train method. When all workers return and are aggregated, the evals_result dict that is passed into the dask-xgboost.train method is updated with the resulting evaluation history.
Why
It is desirable to recall the evaluation at each iteration of the training process after training the model. This is a feature that exists in dmlc/xgboost that would be nice to have in dask-xgboost
Test
import dask
import dask.array as da
import numpy as np
import pandas as pd
from dask.distributed import Client, LocalCluster
from sklearn.datasets import load_digits, load_iris
from sklearn.model_selection import train_test_split

import dask_xgboost as dxgb
import xgboost as xgb

df = pd.DataFrame(
    {"x": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], "y": [1, 0, 1, 0, 1, 0, 1, 0, 1, 0]}
)
labels = pd.Series([1, 0, 1, 0, 1, 0, 1, 1, 1, 1])

X = df.values
y = labels.values

X2 = da.from_array(X, 5)
y2 = da.from_array(y, 5)

cluster = LocalCluster()
c = Client(cluster)

a = dxgb.XGBRegressor(eval_metric="rmse", random_state=1, seed=1, verbosity=0)
a.fit(X2, y2, eval_set=[(X, y)])

b = xgb.XGBRegressor(eval_metric="rmse", random_state=1, seed=1, verbosity=0)
b.fit(X, y, eval_set=[(X, y)])

c = xgb.dask.DaskXGBRegressor(eval_metric='rmse', random_state=1, seed=1, verbosity=0)
c.fit(X2, y2, eval_set=[(X2, y2)])

assert a.evals_result() == b.evals_result()
assert a.evals_result() == c.evals_result()
assert b.evals_result() == c.evals_result()

>>> print(a.evals_result())
{'validation_0': {'rmse': [0.461261, 0.425567, 0.392674, 0.36236, 0.334421, 0.308667, 0.284927, 0.263039, 0.242859, 0.22425, 0.207089, 0.191262, 0.176663, 0.163196, 0.150772, 0.139231, 0.128591, 0.118781, 0.109739, 0.101406, 0.093727, 0.086653, 0.080138, 0.074139, 0.068618, 0.063538, 0.058867, 0.054574, 0.050631, 0.047013, 0.043661, 0.04055, 0.037662, 0.034981, 0.032493, 0.030182, 0.028037, 0.026046, 0.024197, 0.02248, 0.020885, 0.019405, 0.01803, 0.016754, 0.015568, 0.014467, 0.013444, 0.012494, 0.011612, 0.010792, 0.010031, 0.009323, 0.008666, 0.008056, 0.007489, 0.006962, 0.006472, 0.006017, 0.005595, 0.005202, 0.004837, 0.004498, 0.004182, 0.003889, 0.003621, 0.003367, 0.003132, 0.002913, 0.002709, 0.00252, 0.002344, 0.00218, 0.002033, 0.001892, 0.00176, 0.001637, 0.00153, 0.001428, 0.001336, 0.001243, 0.001164, 0.001083, 0.001017, 0.000956, 0.000891, 0.00084, 0.000794, 0.000752, 0.000715, 0.000708, 0.000702, 0.000697, 0.000664, 0.00066, 0.000657, 0.000654, 0.000652, 0.00065, 0.000649, 0.000648]}}

Thanks @kylejn27. Looks great.


setup_ipv6() treats event enums as bitmasks

Here is a snippet from subsys/net/lib/config/init.c. I've added a comment in brackets after each assignment of mask, showing the result on the 'cmd' bits of mask:
static void setup_ipv6(struct net_if *iface, u32_t flags)
{
	struct net_if_addr *ifaddr;
	u32_t mask = NET_EVENT_IPV6_DAD_SUCCEED; // [mask = 0b1101]

	if (sizeof(CONFIG_NET_CONFIG_MY_IPV6_ADDR) == 1) {
		/* Empty address, skip setting ANY address in this case */
		return;
	}

	if (net_addr_pton(AF_INET6, CONFIG_NET_CONFIG_MY_IPV6_ADDR, &laddr)) {
		NET_ERR("Invalid address: %s", CONFIG_NET_CONFIG_MY_IPV6_ADDR);
		/* some interfaces may add IP address later */
		mask |= NET_EVENT_IPV6_ADDR_ADD; // [0b1101 | 0b0001 = 0b1101]
	}

	if (flags & NET_CONFIG_NEED_ROUTER) {
		mask |= NET_EVENT_IPV6_ROUTER_ADD; // [0b1101 | 0b1011 = 0b1111]
	}

After the statement mask |= NET_EVENT_IPV6_ADDR_ADD, the value of mask is unchanged, so is still NET_EVENT_IPV6_DAD_SUCCEED. The statement is thus a no-op.
After the statement mask |= NET_EVENT_IPV6_ROUTER_ADD, mask has the rather surprising value
NET_EVENT_IPV6_NBR_ADD.
This seems very wrong to me.
(This report has similarities to https://github.com/zephyrproject-rtos/zephyr/issues/6413.)
Ping @jukkar.

It's by design, the "mask" isn't a strict bit mask. At that time there was a big urge to save as much memory as possible, and thus a combination of events can make events to overlap, it was considered less harmful to do so as it would just call the callback some time too many, instead of eating up memory on each and every event registered, knowing that these evens are anyway seldom. It's just up to the event callback to verify the event as it always gets it.

I don't see how it calls the event handler too many times, I see it using the wrong value. The calling code tries to set DAD_SUCCEED and ROUTER_ADD, but ends up sending NBR_ADD. There is no way for the event handler to find out that the caller tried to do something other than NBR_ADD.
And ipv6_event_handler() never tries to decipher the mask, it always compares full integer value:
static void ipv6_event_handler(struct net_mgmt_event_callback *cb,
			       u32_t mgmt_event, struct net_if *iface)
{
	struct net_if_ipv6 *ipv6 = iface->config.ip.ipv6;
	int i;

	if (!ipv6) {
		return;
	}

	if (mgmt_event == NET_EVENT_IPV6_ADDR_ADD) {
		/* save the last added IP address for this interface */
		for (i = NET_IF_MAX_IPV6_ADDR - 1; i >= 0; i--) {
			if (ipv6->unicast[i].is_used) {
				memcpy(&laddr,
				       &ipv6->unicast[i].address.in6_addr,
				       sizeof(laddr));
			}
		}
	}

	if (mgmt_event == NET_EVENT_IPV6_DAD_SUCCEED) {
#if NET_LOG_LEVEL > 2
		char hr_addr[NET_IPV6_ADDR_LEN];
#endif
	...

If this is by design then it needs to be thoroughly documented. I'm not going to be the last person looking at this and saying "this can't be right".


SCRAM exchange: Wrong password

Working with Supabase vecs library. I am to connect with supabase using psycopg2.connect() by passing a URI string variables but when I try to use the vecs.create_client() with the same URI string (string not variables)then it gives me this error. I tried to find a solution but couldn't find any apart from installing 2.9.3 version of psycopg2 but that didn't help either. What could be the possible problem?

I'd suggest checking out https://supabase.github.io/vecs/0.4/hosting/ to see where you can grab your vecs compatible connection string from Supabase Studio and how to format it.
If you have trouble after that please open a support issue and we'll have visibility into your project's specifics to help track down what's going wrong


Add note to docs that setting / removing data in map fn will save inconsistently

@michaelsena Added this to Gitbook and merged, but if this is not the preferred flow (do you want to check before I merge?) then lmk


Move Center Pointer

How to move the center pointer into custom location.
For example for pointing a button?

you can use Builder to build context and show it .
                 Builder(
                    builder: (BuildContext c) {
                      return InkWell(
                        key: iconKey,
                        child: Icon(
                          Icons.help_outline,
                          color: Colors.white,
                          size: 20,
                        ),
                        onTap: () {
                          onTap(c);
                        },
                      );
                    },
                  ),

tooltip.show(c);

How to move the center pointer into custom location.
For example for pointing a button?

you can use Builder to build context and show it .
                 Builder(
                    builder: (BuildContext c) {
                      return InkWell(
                        key: iconKey,
                        child: Icon(
                          Icons.help_outline,
                          color: Colors.white,
                          size: 20,
                        ),
                        onTap: () {
                          onTap(c);
                        },
                      );
                    },
                  ),

tooltip.show(c);


Feature Request (Carettab beta): Image darkening

hi @bluecaret -
Not sure if the rest of the community would enjoy this or not, but when using the latest beta build of Carettab I noticed you could choose  a picture for the background, however there seemed to be no way to darken it via the extension.

How hard is this to do? If it's nearly impossible, never mind
If it is somewhat easy to add, it would be a nice feature as it would allow the textual time and date to stand out more from the background

This should be something I can do. Thanks!

Here's what I have setup, just a great tool, thanks for your hard work on it.

This will be available in the next release, thanks!


Missing "Tool" word for Arrow Filled Triangle

Navigate to ketcher
Navigate mouse to Arrow Filled Triangle

AR: it is "Arrow Filled Triangle"
ER: it should be "Arrow Filled Triangle Tool"
Version 2.10.0-rc.1
Build at 2023-04-20; 18:30:36
Google Chrome - Version 111.0.5563.149

Test cases are being created.


Translate setup/production-environment/tools/kubeadm/install-kubeadm into Japanese

This is a Feature Request
What would you like to be added
Translate setup/production-environment/tools/kubeadm/install-kubeadm into Japanese
Why is this needed
This document is not translated in Japanese.
Comments

/assign

/priority backlog

/language ja


bundle package flag --all-platforms has no effect

When i run bundle package --all-platforms I would expect vendor/cache to be populated with .gem for all platforms, however I only get the current platform gem.
# bundle env
Environment

    Bundler   1.11.2
    Rubygems  2.5.1
    Ruby      2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]
    GEM_HOME  /usr/local/bundle
    GEM_PATH
    Git       2.1.4

Bundler settings

    path
      Set for the current user (/root/.bundle/config): "/usr/local/bundle"
    bin
      Set for the current user (/root/.bundle/config): "/usr/local/bundle/bin"
    silence_root_warning
      Set for the current user (/root/.bundle/config): "true"
    app_config
      Set via BUNDLE_APP_CONFIG: "/usr/local/bundle"

Gemfile

    source 'https://rubygems.org'

    gem 'google-protobuf', '3.0.0.alpha.5.0.3'

Gemfile.lock

    GEM
      remote: https://rubygems.org/
      specs:
        google-protobuf (3.0.0.alpha.5.0.3)

    PLATFORMS
      ruby

    DEPENDENCIES
      google-protobuf (= 3.0.0.alpha.5.0.3)

    BUNDLED WITH
       1.11.2

and
# bundle package --all-platforms --verbose
HTTP GET https://bundler.rubygems.org/api/v1/dependencies
HTTP 200 OK
Fetching gem metadata from https://rubygems.org/
Query List: ["google-protobuf"]
Query Gemcutter Dependency Endpoint API: google-protobuf
HTTP GET https://bundler.rubygems.org/api/v1/dependencies?gems=google-protobuf
HTTP 200 OK
Query List: []
Fetching version metadata from https://rubygems.org/
Query List: []
Installing google-protobuf 3.0.0.alpha.5.0.3
0:  google-protobuf (3.0.0.alpha.5.0.3) from /usr/local/bundle/specifications/google-protobuf-3.0.0.alpha.5.0.3-x86_64-linux.gemspec
Using bundler 1.11.2
0:  bundler (1.11.2) from /usr/local/bundle/specifications/bundler-1.11.2.gemspec
Bundle complete! 1 Gemfile dependency, 2 gems now installed.
Bundled gems are installed into /usr/local/bundle.
Updating files in vendor/cache
  * google-protobuf-3.0.0.alpha.5.0.3-x86_64-linux.gem

My ultimate desire would be to just get the ruby platform version and build from source, but I thought that --all-platforms would be the next best alternative. I couldn't find this reported elsewhere (but was mentioned in https://github.com/bundler/bundler-features/issues/4#issuecomment-76508244)

That's because you only have the ruby platform in your lockfile, I believe

There are multiple gem files that match the ruby platform depending on your processor architecture. The following is listed on rubygems. I would expect them all to be included in the cache with --all-platforms.
3.0.0.alpha.5.0.3 - February 11, 2016 x86-mingw32 (894 KB)
3.0.0.alpha.5.0.3 - February 11, 2016 x86-linux (743 KB)
3.0.0.alpha.5.0.3 - February 11, 2016 (206 KB)
3.0.0.alpha.5.0.3 - February 11, 2016 x64-mingw32 (949 KB)
3.0.0.alpha.5.0.3 - February 11, 2016 universal-darwin (742 KB)
3.0.0.alpha.5.0.3 - February 11, 2016 x86_64-linux (860 KB)

I believe --all-platforms just considers all platforms in the lockfile. if you want to include those gems, you'll need to bundle on those platforms so they're in the lock file.

How would that work when the generated lock file on osx and on linux are the same, but the cached packages are incompatible?

@tam7t the cached packages are compatible. the cache contains the .gem files and nothing else.

hmm. that may only be partially true in this case. it is extremely rare for a gem to have prebuilt binary versions on either Linux or Darwin, but it seems that this gem does.
the gem that has no specific platform (which is the "ruby" platform) should contain the source code that needs to be compiled on either Linux or Darwin for the gem to function. it is the version that is cross-compatible. the precompiled versions will not be cross compatible (but they also don't have the platform "ruby", which seems to be the only one present I. your Gemfile at the moment).

@indirect are you suggesting that google is wrong to supply binary-builds in addition to their source-only gem? I would just expect that bundle package would prefer to source-only one or that bundle package --all-platforms would include all matching platforms and not just the one used by bundle install. The workaround we have is to manually include https://rubygems.org/downloads/google-protobuf-3.0.0.alpha.5.0.3.gem in the cache, but I just thought that bundler should handle this scenario more gracefully.

I'm suggesting that Google is alone in shipping binaries for Linux and Darwin among gem creators. Because that is a unique situation, Bundler does not have special handling for that case.

Thanks! Out of curiosity I downloaded a copy of the rubygem database and found only < 100 gems that would be affected by this. Luck me!

I've made some progress on this -- it turned out to involve re-writing a lot of how the resolver and lockfile deal with platforms