text:
FDKFeatureCompiler is broken on POSIX

This commit which added shell=True to the subprocess invocation of makeotf may have fixed it for windows, but broke it for POSIX:
https://github.com/googlei18n/fontmake/commit/6d10690d321b3c7f3120e8b7107406ee8449f5fa
Quoting subprocess docs

On POSIX with shell=True, the shell defaults to /bin/sh... If args is a sequence, the first item specifies the command string, and any additional items will be treated as additional arguments to the shell itself. That is to say, Popen does the equivalent of:

 Popen(['/bin/sh', '-c', args[0], args[1], ...])

So on Unix, fontmake is trying to call makeotf as: /bin/sh -c makeotf -f font.ttf -ff feautures -o output.ttf, which means that the shell is only treating the first argument after -c as the command, the rest is ignored as those are not shell options, but options to the makeotf command...
Interestingly nobody complained in the last 8 months...
Which makes me think not many people rely on this feature.
I would actually like to kill it, or at least remove it from fontmake proper, and maybe readd it later as a new optional ufo2ft feature compiler class.
But in any case, we should implement this properly, and with tests, otherwise it gets unnoticed like now.
Perhaps we can do that after makeotf will return a sensible exit code, instead of always success, leaving us in the position of having to parse its output to determine whether it has failed or not:
https://github.com/adobe-type-tools/afdko/issues/417
Or even better, if ever MakeOTF.py exposed some function that we could import and call directly from fontmake instead of having to create temporary files and spawn a new process.

in the meantime, things have changed and now afdko comes installable via pip so it has nice .exe native launchers instead of using the old .cmd batch wrappers.
Therefore this workaround in https://github.com/googlei18n/fontmake/pull/365 should no longer be needed.
anybody with a windows machine at hand and with the afdko installed (from pip) could please try this command and let me know if it works now, without adding the shell=True parameter?
import subprocess
subprocess.check_output(["makeotf", "-h"])

yes, I tried on my Windows VM without shell=True and it works. Will revert that commit for now.

Try concatenating the command string before you use it as an argument in the call to subprocess.check_output and then use it as a single argument rather than as an argument list as you do with Popen.  And definitely consider using a shellquote style approach with the command string as part of this transition...  Don't know about the consequences on Win but this approach works for me on *nix systems.

no I don't want to do that. It's not necessary. A list of strings as args is the recommended one.

Providing a sequence of arguments is generally preferred, as it allows the module to take care of any required escaping and quoting of arguments (e.g. to permit spaces in file names). If passing a single string, either shell must be True (see below) or else the string must simply name the program to be executed without specifying any arguments.

Here is an example provided in the current Py3 docs:
subprocess.check_output(
    "ls non_existent_file; exit 0",
    stderr=subprocess.STDOUT,
    shell=True)

the use of shell=True is discouraged for security considerations, and is only needed when one needs access to shell-specific features like pipes, wildcards, env variable expansion, etc. (which we don't need in this particular case).

the use of shell=True is discouraged for security considerations

👍 shlex.quote is available when you must use it.
The Py2 documentation provides an example of list arguments with check_output but only with the executable and a single argument to the executable.  It looks like Py3 encourages use of subprocess.run rather than check_output in current version.
Here are the cPython repository tests for subprocess.check_output.  They all test with the Python interpreter as executable with -c option followed by a single, complete string of the Python source.   https://github.com/python/cpython/blob/master/Lib/test/test_subprocess.py#L149-L225
Closed so I will quit investigating :)

@anthrotype I've issued a pre-release build that contains the fix for https://github.com/adobe-type-tools/afdko/issues/417, in case you want to give it a try.

authors: anthrotype chrissimpkins miguelsousa


text:
IsValidPhone  number is incorrect return  for 7042094906

Hi
i am windows phone developer when i am using this number with IN locale
but this api is giving wrong autntication please help this is my code
public static bool ValidatePhoneNumber(string strphonenumber, string locale)
{
bool isValid = false;
try
{
PhoneNumberUtil phoneUtil = PhoneNumberUtil.GetInstance();
PhoneNumber swissNumberProto = phoneUtil.Parse(strphonenumber, locale);
isValid = phoneUtil.IsValidNumber(swissNumberProto);
}
catch (Exception ex)
{
}
return isValid;
}
but is retun false

@ashishgupta-kiwi ,
Thank you for using libphonenumber!
Please upgrade to the latest release, this is not a live issue. To check the latest behavior for yourself, see the demo (instructions in our contribution guidelines).
Closing this issue as library is working as intended.
https://libphonenumber.appspot.com/phonenumberparser?number=7042094906&country=IN

Hi
I am using this library from nuget. I think this is latest library but this library function isValidNumber return false for locale "IN" and phonenumber 7042094906.
Please help.
Thanks
Ashish Kumar Gupta

@ashishgupta-kiwi
We do not maintain the csharp port of libphonenumber.
You can contact actual owners of the library that you are using:
https://www.nuget.org/packages/libphonenumber-csharp.unofficial/

source: gharchive/issue

authors: ashishgupta-kiwi penmetsaa

license_type: permissive

license_source: github-api


text:
[unittests] Simplify ligature test

Not expecting ligatures to be inactive when they're active with
parameters gives more flexibility. One might want to check that a
ligature works both with and without certain parameters.

LGTM

source: gharchive/pull-request

authors: dougfelt jamesgk

license_source: bigquery


text:
Missing maneuver property definition in DirectionsStep interface

The maneuver property is missing from the type definitions in this interface:
https://github.com/googlemaps/js-types/blob/09d392f4bd7e0a54ec5e9392d8a209ae4c816eaa/index.d.ts#L1602
Property legality:
https://developers.google.com/maps/documentation/directions/get-directions?hl=en#DirectionsStep
As a reference, the @googlemaps/google-maps-services-js has this properly already:
https://github.com/googlemaps/google-maps-services-js/blob/66720cb38652e42e31588a4132cdabf04b91355f/src/common.ts#L1082

Sorry I missed this. This was closed in https://github.com/googlemaps/js-types/commit/935f7fc7433bf76d94ce108a517762d13e18b8b6 and available in @types/google.maps@3.47.3 (I think). Latest is 3.48.*

authors: dzonatan jpoehnelt

repo: googlemaps/js-types


text:
Pass scoped parameters to ViewModel

Hello,
I used the code in the GitHub sample. I'm currently facing an issue with the way the ViewModels are injected. Since ViewModelModule lives at the scope of the App (@Singleton), I can't pass arguments that exist at the scope of the Activity/Fragment.
I opened a thread on SO, here.
The only possible solutions I'm thinking is either having a ViewModelFactory for each ViewModel or passing the parameters after the constructor. Both options seem bad.
Is there any way around this?
Thank you.

First I was passing the parameters after the constructor. But I found out that I would need to have a way for each ViewModel to only initialise once and not repeat, for example, the load of data.
Then I tried the factory, and while the solution looked cleaner, I still had to write the factory. I wrote this annotationProcessor to do it for me:
https://github.com/kakai248/AutoViewModelFactory
I'm not sure if it's the best solution, but it's the best I've found so far. I would like to hear more opinions about this.

I also was looking for more elegant solution for this
https://stackoverflow.com/questions/46278357/understanding-android-architecture-components-example-githubbrowsersample-viewm
Would be great to have at least one ViewModel with params in this sample

@savjolovs That annotation processor pretty much solved my problem. I would still prefer to have only one generic factory, but with dagger-android, it seems like it's not possible.
Also, in the examples they have fragment-scoped parameters, but they pass them after the constructor. See here.

You may inject viewmodel at activity/fragment level by creating a viewmodel factory at each level here is an example https://gist.github.com/SamYStudiO/1510b144e6508c20522fdcf18e0e0035

But is it ok to pass Activity/Fragment-scoped dependencies to ViewModels?
Say Foo has activity scope. After configuration change the ViewModel will be retained and keep the reference to Foo created for the dead activity, while any other place that also uses Foo will have a new instance. Looks like a problematic situation to me.

@arekolek It's okay for parameters that don't reference the activity/context. To pass an id to an object or something similar. But if that parameter holds the activity context then it's a memory leak for sure.
I prefer this approach instead of having an init in each ViewModel. I don't like to have the ViewModel in an invalid state.

@kakai248 even if it has no activity reference I see a problem. It is supposed to be a singleton for the activity scope, but the ViewModel has a different instance than anything else that is not retained.
@ActivityScope
class Foo @Inject constructor() {
    var bar: Int = 0
}

View model could write to foo.bar and activity (or whatever also has Foo) would never see it. And there could be more serious problems than that probably.

I prefer this approach instead of having an init in each ViewModel. I don't like to have the ViewModel in an invalid state.

What would be an example of a dependency for ViewModel that can't be unscoped or @Singleton-scoped?

The only possible solutions I'm thinking is either having a ViewModelFactory for each ViewModel or passing the parameters after the constructor. Both options seem bad.

I was doing using an unscoped factory (see https://gist.github.com/arekolek/e5083776d263b16666aff38dd0d3c439) and I think it worked fine. Not sure if that ("ViewModelFactory instance for each ViewModel") is what you refer to as "ViewModelFactory for each ViewModel".

@kakai248 even if it has no activity reference I see a problem. It is supposed to be a singleton for the activity scope, but the ViewModel has a different instance than anything else that is not retained.
@ActivityScope
class Foo @Inject constructor() {
    var bar: Int = 0
}

View model could write to foo.bar and activity (or whatever also has Foo) would never see it. And there could be more serious problems than that probably.

I could be making a mistake saying these parameters are activity/fragment-scoped. They are not actually annotated with a scope, so we get a new instance each time we request them. ViewModel depends on some parameters and it's the Activity/Fragment that is going to provide them.
@Module
public abstract class ProfileActivityModule extends BaseActivityModule<ProfileActivity> {

    @Nullable
    @Provides
    static String provideUserId(ProfileActivity activity) {
        return activity.getUserId();
    }
}

That getUserId() is going to return what the Activity received on the Bundle. My ViewModel depends on this id as it's a profile screen, and I need to know which user I need to fetch. The screen doesn't make sense if it doesn't have this id.

I was doing using an unscoped factory (see https://gist.github.com/arekolek/e5083776d263b16666aff38dd0d3c439) and I think it worked fine. Not sure if that ("ViewModelFactory instance for each ViewModel") is what you refer to as "ViewModelFactory for each ViewModel".

I no longer use a factory for each ViewModel. I started using a single one for all the ViewModels, as described here (or some more detail here).

authors: SamYStudiO arekolek kakai248 savjolovs


text:
Android Studio 1.3 RC3. Google Play services out of date. Requires 7571000 but found 6774470

I ran this sample with below AVD config and I have listed down SDK tools.
But I get an error saying "Google Play services out of date. Requires 7571000 but found 6774470."
I understand that it could be an issue with emulator not catching up the latest version. But how do I run this sample with an emulator.

Try using an emulator running API 21 or 19. These API versions include the updated version of Google Play Services. The sample should run as expected on these API levels.

Closing issue, no response.

authors: kroikie ksraja

repo: googlesamples/google-services


text:
Use the padding only under iOS especially if it is only for iPhone 5.

Without these changes the 10px padding occurs on my Sony Xperia Z5 when starting the VR in Portrait mode and it won't go away. So just use it on iOS if it is only for iPhone 5

Just saw that on my iPhone 6 Plus the behaivour is the same as on the Sony Xperia Z5... also have the padding there... is there a possibility to diff between iPhone 5 and iPhone 6 so we can only use the padding on the iPhone 5?

We can differentiate, but this seems like an overly specific hack. Could you provide a screenshot of the problem you're seeing?

hmm... I would like to, but somehow now I can't manage to reproduce it...
don't know why it works now... but if it do it is fine :D so we can forget my last comment.

Please close then!
On Mon, Oct 10, 2016 at 1:54 AM cnspaha notifications@github.com wrote:

hmm... I would like to, but somehow now I can't manage to reproduce it...
don't know why it works now... but if it do it is fine :D so we can forget
my last comment.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/borismus/webvr-polyfill/pull/155#issuecomment-252564595,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAQ8gKkRns7BItDpCLZvPFbNAaC8WOSgks5qyf0tgaJpZM4KIibM
.

The issue still exists. I'm working with A-Frame in embedded mode and changing the orientation of the device will produce a 10px thick border on the right and bottom. I'm using an iPhone 7.

I'm still seeing this padding issue as well on lots of modern Android devices: Pixel, Pixel XL, 5X, 6P, etc. One key point is that this only happens when presenting to VR from portrait mode (otherwise the onResize_() function which adds the padding doesn't get called).  Here is screenshot of the issue on a nexus 5X:

I added a artificial red border to highlight the issue which is the padding added at the bottom and right sides. You can also notice in the screen shot that the back and settings buttons are abnormally large.

authors: PaHae borismus cnspaha jamesvecore lennerd

repo: googlevr/webvr-polyfill


text:
[Feat] 비밀번호 초기화 페이지 생성 및 GraphQL 연동

작업 개요

이메일 링크로 접속할 비밀번호 초기화 페이지 생성
패스워드 validate 추가
validate가 통과될 경우 API 연동
graphql 코드 추가

작업 분류

[ ] 버그 수정
[x] 신규 기능
[ ] 프로젝트 구조 변경

작업 상세 내용
생각해볼 문제

test 코드 작성

  const [searchParams, setSearchParams] = useSearchParams();

get parameter 가져오는 부분에서 useSearchParams 훅을 사용하였는데 set 하는 함수도 기본적으로 가져와지고 있어서 사용하지 않는 함수가 선언됩니다.
resolve #63

고생하셨습니다〰 몇가지 코멘트 남겼는데 시간 되실 때 확인 부탁드려요! 테스트 파일도 들어가면 좋을거 같아요〰

ad42fbfb6cb97bc59b72f222f79a9f96f9201194 커밋에 리뷰 내용은 반영되었습니다 👏🏻 좋은 리뷰 고마워영

repo: goorea/muscleman-web

license: MIT


text:
🛑 goormIDE is down

In 5fad16e, goormIDE (https://ide.goorm.io) was down:

HTTP code: 403
Response time: 772 ms

Resolved: goormIDE is back up in cad9a84 after 1 hour.

repo: goorm-dev/goorm-status


text:
feat(support): Added convert package

📑 Description

convert.Tap(...)
convert.With(...)
convert.Transform(...)
convert.Default(...)

✅ Checks

[x] My pull request adheres to the code style of this project
[ ] My code requires changes to the documentation
[ ] I have updated the documentation as required
[x] All the tests have passed

ℹ Additional Information
Added convert package in support

hlp? Short for helpers. Or is there a better suggestion?

hlp
util
fn
fns
……

@flc1125 I have a PR that adds a similar function, I put Pointer into the convert package, how about the Tap, With, etc?

@hwbrzzl It's okay, I can migrate to convert.
Then which one between Ptr and Pointer should I keep?
Reference:

https://github.com/xanzy/go-gitlab/blob/main/types.go#L31-L34

I think Pointer is clearer, User doesn't need to memory the short name.

I think Pointer is clearer, User doesn't need to memory the short name.

Adjusted.

Hey @flc1125   We created a private channel in Discord for contributors. You can click the link and DM me (@Bowen) to join it if you are interested.
Here you can:

Send PR link or review others' PRs;
Discuss new features before creating an issue;
Vote for something;
etc.

Hey @flc1125 We created a private channel in Discord for contributors. You can click the link and DM me (@bowen) to join it if you are interested.
Here you can:

Send PR link or review others' PRs;
Discuss new features before creating an issue;
Vote for something;
etc.

Thank you for the invitation, I will join.

repo: goravel/framework


text:
Error when upgrading goreleaser version

I got an error when trying to generate a shell script for a repository using a certain goreleaser.
   ⨯ failed                    error=unable to parse: yaml: unmarshal errors:
  line 83: field tap not found in type config.Homebrew

I noticed that the cause of the error was in the goreleaser version of go.mod, so I tried updating the version but that also resulted in an error.
dependabot was giving the same error.
https://github.com/goreleaser/godownloader/pull/191/checks?check_run_id=957111892
echo "make lint" > .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit
go build
# github.com/goreleaser/nfpm/rpm
##[error]../../../go/pkg/mod/github.com/goreleaser/nfpm@v1.6.0/rpm/rpm.go:161:5: rpm.AddCustomTag undefined (type *rpmpack.RPM has no field or method AddCustomTag)
##[error]../../../go/pkg/mod/github.com/goreleaser/nfpm@v1.6.0/rpm/rpm.go:161:37: undefined: rpmpack.EntryUint32
##[error]../../../go/pkg/mod/github.com/goreleaser/nfpm@v1.6.0/rpm/rpm.go:162:5: rpm.AddCustomTag undefined (type *rpmpack.RPM has no field or method AddCustomTag)
##[error]../../../go/pkg/mod/github.com/goreleaser/nfpm@v1.6.0/rpm/rpm.go:162:37: undefined: rpmpack.EntryStringSlice
##[error]../../../go/pkg/mod/github.com/goreleaser/nfpm@v1.6.0/rpm/rpm.go:163:5: rpm.AddCustomTag undefined (type *rpmpack.RPM has no field or method AddCustomTag)
##[error]../../../go/pkg/mod/github.com/goreleaser/nfpm@v1.6.0/rpm/rpm.go:163:37: undefined: rpmpack.EntryStringSlice
##[error]../../../go/pkg/mod/github.com/goreleaser/nfpm@v1.6.0/rpm/rpm.go:213:3: unknown field 'Epoch' in struct literal of type rpmpack.RPMMetaData
##[error]../../../go/pkg/mod/github.com/goreleaser/nfpm@v1.6.0/rpm/rpm.go:228:3: unknown field 'BuildTime' in struct literal of type rpmpack.RPMMetaData
##[error]../../../go/pkg/mod/github.com/goreleaser/nfpm@v1.6.0/rpm/rpm.go:229:3: unknown field 'BuildHost' in struct literal of type rpmpack.RPMMetaData
##[error]../../../go/pkg/mod/github.com/goreleaser/nfpm@v1.6.0/rpm/rpm.go:362:60: undefined: rpmpack.FileType
##[error]../../../go/pkg/mod/github.com/goreleaser/nfpm@v1.6.0/rpm/rpm.go:229:3: too many errors
note: module requires Go 1.14
make: *** [build] Error 2
##[error]Makefile:48: recipe for target 'build' failed
##[error]Process completed with exit code 2.

The pull request has been merged into the v2 branch.

repo: goreleaser/godownloader

license: mit


text:
Show more fields: Subject, To, CC, BCC

Status: :warning:
Connects to #169
Notice:

Still working on adding support for all plugins, but you can test in Gmail right now.

Features:

Support for To, CC and BCC fields
Replaced setTitle method in plugins with setField. It will be called with
{ field: 'subject', value: 'quicktext title', element: $textarea } for each field in the quicktext (subject, to, cc, bcc).

Testing:

git checkout show-more-fields

This change is

Subject should be under 'Show more fields'.
I forgot, but we also need the sync backend support for these new fields. See the attachments commits on the gorgias.io repo. Want to do it?

Review status: 0 of 8 files reviewed at latest revision, all discussions resolved.

Comments from Reviewable

Fixed the issue with the subject field always being visible, even if empty.
Sure, I'll take a look in the backend repo once I'm done with the frontend.

Reviewed 7 of 8 files at r1, 1 of 2 files at r2, 11 of 11 files at r3.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable

authors: ghinda xarg

repo: gorgias/gorgias-chrome


text:
How to produce PDF/UA with LibreOffice

LibreOffice supports the creation of PDF/UA (accessible PDF documents) when the input docx file contains appropriate accessibility information (e.g. alternative text for images and so on).
Is it possible with Gotenberg to pass the appropriate conversion option to LibreOffice?
When exporting from the LibreOffice GUI the relevant options are those highlighted in the picture below. Based on the documentation, I belive that Gotenberg allows requesting a PDF/A output, but does not provide an option for PDF/UA.

It looks like the appropriate export options to pass to LibreOffice are:
EnableTextAccessForAccessibilityTools=true
UseTaggedPDF=true
so until gotenberg provides a way to pass such options, I created a derived docker image that replaces unoconv with a shell script that invokes unoconv and always specifies such options:
FROM gotenberg/gotenberg:7

USER root
RUN mv /usr/bin/unoconv /usr/bin/unoconv2
RUN echo '#!/bin/bash\n/usr/bin/unoconv2 -e EnableTextAccessForAccessibilityTools=true -e UseTaggedPDF=true "$@"' > /usr/bin/unoconv && \
    chmod 755 /usr/bin/unoconv
USER gotenberg

@giamma thanks for the details!

One additional comment: if you need your accessible PDFs to be in PDF/A format, make sure to use the "nativePdfFormat" option (which I believe uses LibreOffice), instead of "pdfFormat" (which I believe uses unoconv) because the latter strips some accessibility information from the PDF document produced by LibreOffice (e.g. alternative text for pictures).

authors: giamma gulien

repo: gotenberg/gotenberg


text:
Use cross-env to change default port

We should change default port from 3000 to 4100 to prevent conflict
with locally running node/rails backend for Conduit (they also have
default port 3000).
This fixes https://github.com/gothinkster/react-redux-realworld-example-app/issues/52

I think a better solution would be to leave it at 3000 with the changes you've made and document the ability to change port by editing the script before starting. A change in readme regarding this is needed, currently it says the port used is 3000. A note for users to change the port to avoid conflicts while running the backend would be a plus.

@SandeeshS : nope. You also trapped in this port mash.
Readme mentioned uri/port for local node/rails backend - its fine to leave it as is - 3000 port for api.
But current frontend's webserver port was also 3000 - now with my PR its changed to 4100.

What i meant to say was to make use of cross-env to let users change the port. My suggestion was to use it and set the port to the way it is and give a note to users to have them change when needed during testing. At the same time it wouldn't be practical for users who just wanna get the frontend and backend up with least effort.
You should at least include the port change in the readme in the PR.

Ok, i m agree, no problem - i will add commit with some readme stuff!

@deksden sure :+1:

@SandeeshS : PR updated with readme docs

@deksden didn't expect you to go so detailed haha :+1:

@SandeeshS : maybe detail can be moved to separate wiki page

I think it's good to have this info in the readme actually, as I'm sure it will be a common question people run into 👍
Thanks a ton!! 💯

authors: EricSimons SandeeshS deksden


text:
Panic: runtime error: slice bounds out of range

Hello, just got a panic running govend:
govend golang.org/x/crypto

Panic:
panic: runtime error: slice bounds out of range

goroutine 1 [running]:
github.com/govend/govend/imports/filters.projectImportPath(0x0, 0x0)
        /home/fz/environments/gopath/src/github.com/govend/govend/imports/filters/filters.go:144 +0x399
github.com/govend/govend/imports/filters.Local(0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /home/fz/environments/gopath/src/github.com/govend/govend/imports/filters/filters.go:81 +0x3e
github.com/govend/govend/imports.Scan(0xc8204c0f80, 0x1a, 0xc820507760, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0)
        /home/fz/environments/gopath/src/github.com/govend/govend/imports/scan.go:119 +0x9d6
github.com/govend/govend/deps.Vend(0xc8200f7000, 0x1, 0x1, 0x9160e8, 0x4, 0xc820507b08, 0x0, 0x0, 0x0, 0x0)
        /home/fz/environments/gopath/src/github.com/govend/govend/deps/vend.go:185 +0xfae
main.glob.func1(0xb6c640, 0xc8200f6f20, 0x1, 0x1)
        /home/fz/environments/gopath/src/github.com/govend/govend/main.go:114 +0xa8c
github.com/govend/govend/vendor/github.com/spf13/cobra.(*Command).execute(0xb6c640, 0xc82000a190, 0x1, 0x1, 0x0, 0x0)
        /home/fz/environments/gopath/src/github.com/govend/govend/vendor/github.com/spf13/cobra/command.go:569 +0x869
github.com/govend/govend/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xb6c640, 0xb6c640, 0x0, 0x0)
        /home/fz/environments/gopath/src/github.com/govend/govend/vendor/github.com/spf13/cobra/command.go:656 +0x56b
github.com/govend/govend/vendor/github.com/spf13/cobra.(*Command).Execute(0xb6c640, 0x0, 0x0)
        /home/fz/environments/gopath/src/github.com/govend/govend/vendor/github.com/spf13/cobra/command.go:615 +0x2d
main.main()
        /home/fz/environments/gopath/src/github.com/govend/govend/main.go:132 +0x49d

@FZambia it appears the slice reporting that out of bounds error is due to this line: https://github.com/govend/govend/blob/master/imports/filters/filters.go#L144
Are you running the govend command outside of your $GOPATH src? govend is meant to be ran in the repository root of your project.
When I run govend -v golang.org/x/crypto in a project repo root directory inside of my $GOPATH I am unable to reproduce the error above.  Instead I get:
→ govend -v golang.org/x/crypto
golang.org/x/crypto

If the above doesn't help, can you give me some more info, such as your $GOPQTH the pwd of where your currently running govend and the version of Go you have installed? Also you may want to try go get -u github.com/govend/govend to ensure you have the current version.
Thanks!

hello @jackspirou, thanksfor response. From my home computer everything worked fine! I got this panic at work on Centos 6 – will try to reproduce this and provide details tomorrow. I think I launched it from $GOPATH and used latest version but will be sure tomorrow:)

@jackspirou - so it seems that I used it in wrong way, but not because outside of $GOPATH:
$GOPATH: /home/fz/environments/gopath
pwd: /home/fz/environments/gopath/src/mrmon
When I ran govend golang.org/x/crypto just now - everything works as expected.
But yesterday my Go bin dir was not in PATH so I ran this ../../bin/govend golang.org/x/crypto - and this resulted in panic.

@FZambia thanks for the info.  You need to be in the src directory of your $GOPATH.  Sorry, I inferred that above and didn't make it clear.  I have added "/src" to the error message now, so you don't get a panic error :)
https://github.com/govend/govend/blob/master/deps/vendorable.go#L35
I'll close this issue, but please let me know if you have any other thoughts or feedback.

authors: FZambia jackspirou

repo: govend/govend


text:
Fix global commands getting overridden.

About this pull request
Fix an edge case where some commands can specifically only be run on one guild, and also happens to be the debug_guild. This resulted in the global commands being overridden.
Changes
Bugfix to sync method.
Checklist

[x] I've run the pre_push.py script to format and lint code.
[x] I've checked this pull request runs on Python 3.6.X.
[ ] This fixes something in Issues.

Issue:

[ ] This adds something new.
[ ] There is/are breaking change(s).
[ ] (If required) Relevant documentation has been updated/added.
[ ] This is not a code change. (README, docs, etc.)

No plans to update v3 at this time.


text:
Fix ts issues in icons

Fix ts issues in icons

Codecov Report

Merging #945 (629444c) into main (d1110c3) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #945      +/-   ##
==========================================
- Coverage   99.63%   99.63%   -0.01%
==========================================
  Files         114      114
  Lines         827      826       -1
  Branches      234      235       +1
==========================================
- Hits          824      823       -1
  Misses          3        3

Impacted Files
Coverage Δ

packages/icons/src/ArrowLeft/index.tsx
100.00% <100.00%> (ø)

packages/icons/src/ArrowRight/index.tsx
100.00% <100.00%> (ø)

packages/icons/src/ButtonArrow/index.tsx
100.00% <100.00%> (ø)

packages/icons/src/IconImportant/index.tsx
100.00% <100.00%> (ø)

packages/icons/src/SVGBase/index.tsx
100.00% <100.00%> (ø)

packages/icons/src/Search/index.tsx
100.00% <100.00%> (ø)

packages/icons/src/Spinner/index.tsx
100.00% <100.00%> (ø)

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 d1110c3...629444c. Read the comment docs.

authors: codecov-commenter penx

repo: govuk-react/govuk-react


text:
bug about reload tmux config

this error came out after i reload my tmux config in a session
cut -c3- ~/.tmux.conf | sh -s _apply_configuration' returned 127
but if i start a new session . no such error

Hello @rmGFW 👋
Does the problem still exist with the current master branch?
Please make sure you kill all tmux processes with tmux kill-server or pkill -f tmux 🙏

authors: gpakosz rmGFW


text:
Add procgov

See https://github.com/ScoopInstaller/Main/issues/4536

Relates to #4536

[x] I have read the Contributing Guide.

This is my first PR on Scoop, I need assistance! The manifest has hash (can be viewed on release page), but it refers to files inside the zip. Also the zip contains two architectures, did I doing it right?

repo: gphg/Main

license: Unlicense


text:
📅 5/18 @ 10:30am PT - Learn with Jason: GitHub Automation with Octokit with @jlengstorf

💁🏻 Learn with Jason: GitHub Automation with Octokit
📅 Tuesday, May 18, 2021
🕐 10:30am Pacific Time (in your timezone)
🎙 hosted by @jlengstorf
🏷 Automation

Subscribe to this issues to get a notification before the show begins and a summary after the show concludes.
This will be a show on Learn With Jason: https://www.learnwithjason.dev/github-automation-with-octokit. Check out all the existing shows on learnwithjason.dev. You can also follow @LWJShow on Twitter.
Learn with Jason: GitHub Automation with Octokit

GitHub Automation with Octokit
GitHub has powerful APIs, and with Octokit we can do just about anything on GitHub through code. Gregor Martynus will teach us how!

— learnwithjason.dev/github-automation-with-octokit
Everyone should be able to follow along. It will be helpful to know these technologies though:

Node.js + npm
REST API
GraphQL
OAuth
Webhooks
Netlify Functions

Feel free to ask any questions ahead of the show about these

Outline
This will be a 90 minute show, so plenty of time to get through. We will boop Jason's nose by utilizing all kinds of GitHub APIs and octokit

Part I: Octokit for REST API & GraphQL

[ ] Create a CLI app that will edit a file on GitHub
[ ] Use GitHub's OAuth Device flow to authenticate
[ ] Create an issue using GitHub's REST API and GraphQL API.
[ ] Publish the package to npm and make it usable with npx.
[ ] Create a reusable Octokit plugin and publish it as part of the npm package.

Part II: Octokit for GitHub Actions

[ ] Create a GitHub Action with Node.js + Octokit
[ ] Make the action available to others
[ ] Publish the action to the Marketplace

Part III: Octokit for OAuth Apps, Webhooks, and GitHub Apps

[ ] Create an OAuth App and deploy it to Netlify Functions. The OAuth app handles the OAuth web flow and bumps the counter as the user by creating a new issue.
[ ] Setup continuous deployment using Netlify’s GitHub integration.
[ ] Create a GitHub App that bumps the counter when an issue was created

Part IV: Octokit in the browser

[ ] Create a web app that uses the OAuth web flow to bump the counter, but with a nice custom UI.

Recording
will be added after the show

Shownotes
will be added after the show
Preparation

[x] Work through all the things we want to cover during the show to make sure that they will all just work :tm: or at least most of them 😁

The recording for the show is now on Twitch, and will be on YouTube tomorrow: https://www.twitch.tv/videos/1027033591

we will continue where we left of on @learnwithjason this coming Tuesday on @github's own "30 minutes to merge" show. Check out https://github.com/gr2m/helpdesk/issues/18 for details and subscribe to the issue for updates


text:
feat: popup timeout

Description
Adds basic timeout support (without custom ui messaging). The user will just see an idle checkout state.

Checklist

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own changes
[x] I have run yarn lint to make sure my changes pass all tests
[x] I have run yarn test to make sure my changes pass all linters
[x] I have pulled the latest changes from the upstream main branch
[ ] I have tested both the react and the CDN versions on local and integration environments
[x] I have added the necessary labels to this PR in case a new release needs to be published after merging into main (e.g. release and patch)

Contribution guidelines
For contribution guidelines, styleguide, and other helpful information please
see the CONTRIBUTING.md file in the root of this project.

:rocket: PR was released in v2.14.0 :rocket:


text:
Replacing ScriptEngine Invocable cast with Context API equivalent

Hello!
I am working on porting a rather large code base from nashorn to graal.js. The original code was using javax.script.ScriptEngine.
 private ScriptEngine engine =
    new ScriptEngineManager().getEngineByName("nashorn");

I have decided to replace the ScriptEngine with the polyglot Context API.
private Context cx = Context.newBuilder().allowAllAccess(true).allowHostAccess(HostAccess.ALL).build();

I replaced every call to engine.put() with a call to cx.getBindings("js").putMember() and similarly engine.get() with cx.getBindings("js").getMember() like this:
cx.getBindings("js").putMember("mote", mote);
cx.getBindings("js").putMember("id", id);
//engine.put("mote", mote);
//engine.put("id", id);

However, there is one place in the code where I cannot get rid of the engine. The engine is cast as an Invocable and runs a Thread in a thread group:
scriptThread = new Thread(group, new Runnable() {
  public void run() {
    try {
      ((Invocable)engine).getInterface(Runnable.class).run();
    } catch (RuntimeException e) {
      Throwable throwable = e;
      while (throwable.getCause() != null) {
        throwable = throwable.getCause();
      }

      if (throwable.getMessage() != null &&
          throwable.getMessage().contains("test script killed") ) {
        logger.info("Test script finished");
      } else {
        if (!Cooja.isVisualized()) {
          logger.fatal("Test script error, terminating Cooja.");
          logger.fatal("Script error:", e);
          System.exit(1);
        }

        logger.fatal("Script error:", e);
        deactivateScript();
        simulation.stopSimulation();
        if (Cooja.isVisualized()) {
          Cooja.showErrorDialog(Cooja.getTopParentContainer(),
              "Script error", e, false);
        }
      }
    }
    /*logger.info("test script thread exits");*/
  }
});
scriptThread.start(); /* Starts by acquiring semaphore (blocks) */
while (!semaphoreScript.hasQueuedThreads()) {
  Thread.yield();
}

This is the part I would like to change:
 ((Invocable)engine).getInterface(Runnable.class).run();

Is there a Context equivalent for this? I could not find any documentation regarding Invocables in the Context API. I have, however, read somewhere that it I should use Context to execute JavaScript code when using GraalVM. So my question is, is there a way to change this piece of code, so that it keeps its functionality but I don't have to use the engine anymore and use the Context API instead? If not, what would be a good way to do it?
Thanks.

Hi @KatarinaKulkova,
The Context API's Value class provides the as method, which can be used to cast a Value object to some Java type. In your example above, I think you could try using .as(Runnable.class).run()?

Hello.
Which Value exactly do you think should be cast as Runnable? I tried the following:
cx.getBindings("js").as(Runnable.class).run();

but this gave me the following error when trying to run the code:
 java.lang.UnsupportedOperationException: Unsupported operation identifier 'run' and  object
 'com.oracle.truffle.polyglot.PolyglotLanguageBindings@57302cec'(language: Java, type:
 com.oracle.truffle.polyglot.PolyglotMap). Identifier is not executable or instantiable.

I don't think I am using any other Value except for the Bindings.

I am missing a bit of context, so I am not sure I fully understand what the code in your example is trying to achieve, but if I understand correctly your usage of getInterface() I think that you should be able to achieve the same semantics by using the global object in your script, so e.g., context.eval("js", "this").as(Runnable.class) or context.eval("js", "globalThis").as(Runnable.class) should do the same thing as  ((Invocable)engine).getInterface(Runnable.class)

I will try to provide some general context. I am currently working on this document: https://github.com/contiki-ng/cooja/blob/63538bbb882ba06a7b8cf97c11ce2fe4d22e4f88/java/org/contikios/cooja/plugins/LogScriptEngine.java
This is a copy of the document before I made any changes. All I did was replace all instances of the engine with the Context API, as I described in my question.
There is a function in the code called activateScript(). It parses the JavaScript code, then calls engine.eval(jsCode) which I replaced by cx.eval("js", jsCode), then there are some calls to engine.put() which I replaced by calls to cx.getBindings("js").putMember(). Finally, scriptThread (which is a Thread created at the beginning of the document), is assigned to be a new Thread, with its run function containing the cast to Invocable. This thread is supposed to run the parsed JavaScript. The activateScript function also does some semaphore stuff, but I don't think it is related to the issue I am having.
So I tried
context.eval("js", jsCode).as(Runnable.class).run();
as you suggested, but this resulted in the following error:
java.lang.NullPointerException
at org.contikios.cooja.plugins.LogScriptEngine$4.run(LogScriptEngine.java:328)
at java.base/java.lang.Thread.run(Thread.java:834)
where LogScriptEngine.java:328 is the line where I do context.eval("js", jsCode).as(Runnable.class).run();
I wonder whether the fact that the engine was cast as an Invocable enabled it to run, and so replacing it with the Context API doesn't work? I am not sure about this.

Nevermind, this solved it:
context.eval("js", "this").as(Runnable.class)
Thank you very much.

OK, happy to hear that it worked (and thanks for the context info) -- your call to  ((Invocable)engine).getInterface(Runnable.class).run(); essentially looks for a function called run in your JS global scope and then calls it, which is why context.eval("js", "this").as(Runnable.class).run() (or using "globalThis") should be equivalent

I see. That makes sense. Thank you for clearing that up. It was very helpful.

authors: KatarinaKulkova eleinadani

repo: graalvm/graaljs


text:
Investigate why the permission flag doesn't translate in sample zips

It seems like the permission flag are tricky to set. It also seems that our tests around the "executable permission" of the wrapper script is lacking. It's executing the script using the shell which work around any executable permission. A test should be added to avoid this and ensure the permission flags are kept.

Waiting PR https://github.com/gradle-guides/gradle-guides-plugin/pull/61 to be merge, then we can release and update the sample plugin.

Done.

repo: gradle/gradle


text:
Project name disambiguation causes project / external dependency conflicts to be missed.

The fix done in #11859 for #847 has an unfortunate side effect for project / binary dependency replacement.
If a project foo:api, with another project named *:api in the same multi project, was replacing a binary dependency org.test:api before the fix, it will no longer replace it after the fix as its name changed to foo-api, changing the coordinates, and causing the conflict to be missed.

This has been resolved by reverting in 6.2.1 the fix for #847 done in 6.2, which had unforeseen consequences.