text:
Added the possibility to use local WSDL files

Note : the new method is already tested by the existing tests

Only for the reference: Superseded by #11.

repo: clue/php-soap-react


text:
gcm_test uses gcm_mul even if TEST_GCM_MUL_TABLE4 is selected

Hello,
I've noticed that at line 390 of gcm_test.c, gcm_mul is called regardless of the value of gcm_mul_implementation_t.
I seems to me that this area could use the same switch / case statement used to select the gcm_mul implementation at the other places in this function.
Is this a simple oversight, or on purpose ?

Thanks for reporting this. I think it was an oversight. I've committed a fix for it.

source: gharchive/issue

authors: cmcqueen pilatomic

repo: cmcqueen/aes-min

license: mit

license_type: permissive

license_source: bigquery


text:
CMake support

hi, do you support cmake?

No, cmake is currently not supported. (I've never used it myself.) Is the current autotools support unsuitable for your platform, and is cmake better?
On 4 Jan 2015, at 12:01 am, "Federico Tomassetti" <notifications@github.commailto:notifications@github.com> wrote:
hi, do you support cmake?

Reply to this email directly or view it on GitHubhttps://github.com/cmcqueen/simplerandom/issues/2.

authors: cmcqueen ftomassetti

repo: cmcqueen/simplerandom


text:
Exercises-w1

Exercises
Name
Paulien Lous
Class
Klas 207, project Tech
GitHub username
Plous01
Bootcamp exercises
https://github.com/Plous01/Paulien-Lous-js-bootcamp
Bootcamp notes
Samenvatting is bijna af.

The repository was checked by Rijk and your grade has been updated in the admin sheet!

license: MIT

license_source: github-api


text:
calling only --with-xcover still breaks at can't use both flags

Actual:
Tried using only "--with-xcover" or "--with-xcoverage" but it keeps stopping at error

its weird, because as per lines 44-46 this shouldn't have been a problem.
Is there any possibility of "options.enable_plugin_coverage" returning true by default?

Noticed a pattern
it happens when I try to run nosetets on complete directory like
nosetests ./tests/ --withxcover
but when I run on particular file nosetests ./tests/common/apis/test_homepage.py --withxcover
it works without complain
But I need to run on the whole directory instead of single file, any suggestions?

it not an issue so closing https://github.com/cmheisel/nose-xcover/issues/11#issuecomment-244949227
@cmheisel : i'm thinking to raise PR with change of error message & log little more convenient & self understood, should I go ahead?

@p00j4 -- Sure thing, I'd gladly welcome a PR like that!

@cmheisel : could you please review & take in: https://github.com/cmheisel/nose-xcover/pull/29

repo: cmheisel/nose-xcover


text:
Coverage Generation & Uploading Does Not Work

Description
Coverage generation does not work in a sense that there is no .gcno AND/OR .gcda file generated from "make check" command even if we turn on the flag by "-DCOVERALLS=ON"
Also coverage data is not properly uploaded, either because of the data not being properly generated or because of other problems in the build system
Status
Currently I have fixed the first one - gcda and gcno files are generated inside the build tree directories, by adjusting the order that we generate make file for "tests" folder and the materialization of compiler/linker flags
For the second issue, if I could not fix it tonight then probably I will switch to cpp-coverall which is another independent tool for uploading coverage data

@jessesleeping Please check with @wangziqi2013 about this problem. This is something that we want to fix quickly so that we have it for the rest of the semester.

Ok.

I think I have fixed this issue. Basically we need to add the coverage CXX/C flag before we generate the configure file. For further test, @jarulraj can you grant me the permission to get the Travis repo token?

@jessesleeping has fixed this issue.

authors: apavlo jarulraj jessesleeping wangziqi2013

repo: cmu-db/peloton


text:
Log performance fix

WAL was limiting transaction throughput even when not waiting on disk flush because of contention at a global callback map. It no longer does that as we now embed callback into a commit record. We achieve comparable performance to when logging is turned off on dev 4.  More detailed charts are coming.
Retardedness in the log IO code is also gone.

Coverage increased (+0.2%) to 95.223% when pulling efa885a6f34f115e70e544419fe85970ca68cace on tli2:log-performance-fix into e4c923ee77dd601e8ce8f204788f15abbd29ad9b on cmu-db:master.

At some point a flowchart describing the process of Persist(), Flush(), BufferWrite(), etc., who calls them, and under what circumstances would be helpful. It can be a bit hard to piece the whole process together just from code.

source: gharchive/pull-request

authors: coveralls mbutrovich tli2

repo: cmu-db/terrier


text:
Docs update: move safegraph to inactive category

Fixes #500.

safegraph patterns is still up while the mobility ones arent, so only a subset of the signals are being retired

ah, i'll fix that

authors: chinandrew dshemetov

repo: cmu-delphi/delphi-epidata


text:
Re-add 4 images linked from README.md, removed in PR #220

The current README.md file contains links broken in PR #220, and the previous link structure does not allow local viewing of images.

SLA signed

repo: cncf/demo


text:
[it] Localizzazione Continuous Deployment

https://glossary.cncf.io/continuous-deployment/

ciao @ugho16 posso fare io questo 👍

repo: cncf/glossary


text:
Show the actual duration for review apps to contributors

Closes #822
Signed-off-by: Takuya Noguchi takninnovationresearch@gmail.com
Pre-submission checklist:
Please check each of these after submitting your pull request:

[ ] 2 minutes after opening the pull request, the CNCF-Bot will post the URL for your staging server. Have you confirmed that it looks good to you and then added a comment to the PR saying "LGTM"?

I edited directly, thanks.

Deploy preview for landscape ready!
Built with commit 84c5b4e685ec8ea5fe71294581eff05fd6440dc9
https://deploy-preview-824--landscape.netlify.com

Thanks.

authors: CNCF-Bot dankohn tnir

repo: cncf/landscape


text:
See if this forces netlify to always build preview instances

Since we have various changes in the base dir of this repo affect the website nested in /website/, we'd like to tell netlify not to skip builds as it has been doing. I'm following the instructions here.

Closing this PR as I've added the change to this one.

repo: cncf/tag-app-delivery


text:
Docker image

I believe I got a docker image working. Took a lot of trial and error. Essentially, this creates a basic container with the following environmental variables:
URL
CLIENTID
DASH
USER
PASS
Works exactly as yours did before, but now you can make multiple containers running them for specific people if you like. The only thing I haven't been able to work out is how to make a variable for the time on the splash page. I personally would like it modifiable. I think 10 seconds may be a bit long.

Awesome! Thanks for doing this. I'll test it out this weekend.

So I am running Unraid, but the docker run command would be something like this:
docker run -d -p 80:80 -e URL:http://homeassistant.local:8123 -e CLIENTID:http://homeassistant.local:8123/ -e DASH:guest-dashboard -e USER:guest -e PASS:guess cnorick/ha-auto-guest-login
I basically turned the variables in the server.js to passable environmental variables in a container.

So I am running Unraid, but the docker run command would be something like this:
docker run -d -p 80:80 -e URL:http://homeassistant.local:8123 -e CLIENTID:http://homeassistant.local:8123/ -e DASH:guest-dashboard -e USER:guest -e PASS:guess cnorick/ha-auto-guest-login
I basically turned the variables in the server.js to passable environmental variables in a container.

Cool! I got it to work with that. I think my system was just being weird. I'm on WSL, and it didn't forward that port for me. It mostly looks good to me. I just had a couple of comments. Thanks again for working on this!

How to get the image (git clone or from an docker image repo)

How to start it with docker by specifying the env variables

I think I got 2 covered. Looking at other repos, seems like 1 isn't usually discussed? The image name is typically all you need to know so long as you get it built out to docker hub or other repositories

@muddro1 Thanks again for the work!

My pleasure. First time doing this. Good learning experience.

repo: cnorick/ha-auto-guest-login


text:
Player Status bug

Which clusters panel is this on?
c8
Describe the bug
While Checking live map in web panel , some players show as dead in it and when i click on that skull icon , a page opens up showing whole info about that player and in that player isn't dead . may be checked in at hospital or something but his blip on live map shows as skull which is used for dead player. this happen with few players tho. like 30-70 chances.
To Reproduce
Steps to reproduce the behavior:

Go to 'Data section in live map'
Click on 'Live map and observe players blip '
click on any dead player blip and check players info page.
See error

Expected behavior
Player blip must be changed as soon as he checked in or revived . ( again as mentioned above happens some time )
Screenshots
one with bug :
https://i.imgur.com/2s31HPR.png
https://i.imgur.com/9Uu9Qv4.png
one without Bug :
https://i.imgur.com/1BbnMls.png
https://i.imgur.com/tetiBqd.png

thats a framework and not a panel bug

repo: coalaura/opfw-admin


text:
Secure Postgres

Getting docker and spring boot to agree on a password at runtime is a little challenging.  Sort out how to do it without exposing the password in production.

Fixed as of the last sets of changes.

repo: cobblers-children/wiki


text:
sql: don't copy old pk when changing bucket size on sharded index

PR: https://github.com/cockroachdb/cockroach/pull/45894
From release notes:

Caused primary key changes to not create a copy of the old primary key if the primary key change only changes the bucket count of a hash sharded index. [#45894][#45894] {% comment %}doc{% endcomment %}

This doesn't require docs.
(See comments in https://github.com/cockroachdb/docs/pull/8718).

authors: ericharmeling jseldess

repo: cockroachdb/docs


text:
Working with Spatial Data Doc Update - Broken link

Re: Working with Spatial Data
Issue Description
The link to the tornado start points data set is broken.
Suggested Resolution
They updated the link to https://www.spc.noaa.gov/gis/svrgis/zipped/1950-2019-torn-initpoint.zip

Thanks @fabiog1901 - I have emailed the folks who run https://www.spc.noaa.gov/gis/svrgis/ and asked if they will replace the old file.  If they can't, I'll update this ASAP!


text:
Training v1 Content

This PR contains:

Structure for delivering training content from the docs URL (i.e. https://cockroachlabs.com/docs/training, including navigation
Labs we expect users to complete

This PR does not include final content for slides (though you can view rough Markdown versions of the slides in the training/slides directory.

This change is

Taking a quick look at this, still needs:

Description of each page before Presentation section.
Better introduction to overall training.
'Overview' pages in each 'By Topic' section.

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/7d2a4ed3fa1d1f72afa8178f062153ac07de9f4c/

One early thought on the sidenav: It confused me a bit that we present two "views" of the same content via the sidenav. I think I'd prefer a simpler approach, with something like:
CockroachDB 101
Day 1
    Day 1 Overview
    Introduction
        Why CockroachDB
        Architecture Overview
    Ops Basics
        Start and Scale a Cluster
        Replication and Rebalancing
        ...
    Day 1 Recap
Day 2
    Day 2 Overview
    Dev Basics
        ...
    Monitoring and Troubleshooting
        ...
    Maintenance
        ...
    Day 2 Recap

Thoughts?

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/f2e44d685d5580c7068b7f260a22e40197440c39/

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/2ec4f76f6f60cef7554dfc27651842817d49df9d/

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/be832f881c3bc49b96e681402fabe6c6ee661dc0/

Great, @sploiselle. I'll review today.

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/0a0a57f37c8d15de809289bac30ac0bbf20efa64/

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/d938f8197d142ee94c5c053a0f01c3585665c823/

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/d938f8197d142ee94c5c053a0f01c3585665c823/

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/dec734393c7717954e9da5cb4d16ea84dc901102/

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/b3f9b1b75518465ea37eacf184e9bfdd9cf3c7fa/

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/23dca629e9979792201bc4a5c482fcb6151d1c43/

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/77240f5bc1691cba28fbdfe31ef3f495a7e2595f/

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/0b63c55aa14bfb8f94cb26a9ad462b6c452cedec/

@sploiselle it looks like the edits you've commented on aren't done yet. I'll wait until you notify me to take another look. (Generally, to avoid that kind of empty cycle, we usually try to push-before-comment).

Review status: 0 of 37 files reviewed at latest revision, 13 unresolved discussions, all commit checks successful.

Comments from Reviewable

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/014420fdf8f8a0944260b3d2e051d33393ff0768/

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/5fc4cbb06475f18cd7756fb152972e060bc0233d/

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/d267e2861715e87e8cfda763173f70725b3546cd/

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/6d3d362bed3957b9f92ecfec9e377e6f635bf7a2/

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/61913b69ebef59cd07a942ae581a413f1327aa69/

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/0acafb11cef8a6d140f711c576c8948438c8face/

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/e346664cd735e46da10e0651f573c69d07f14779/

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/0356e1dacceb72e3f27b32570f08585fda279d5f/

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/668c4f54d527f7d1c1d1561dced011a13f363bca/

authors: cockroach-teamcity jseldess sploiselle tschottdorf


text:
More training updates

Add Software Panic troubleshooting and How to Get Support
Make troubleshooting insecure

This change is

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/09de355d22a25f463febbab53372ae61075857ee/

http://cockroach-docs-review.s3-website-us-east-1.amazonaws.com/72daa8e532e5dc8f22601936a54bc2808d5c4a04/

Again, merging. Will get reviews in a different format.

authors: cockroach-teamcity jseldess


text:
Panes do not scroll when params exceed window height.

Hi.
I've come across this issue where you cannot reach certain parameters if the ui exceeds the window height.
I tried to solve this in the parent container using overflow-y: auto; but still the only way to reach the bottom parameters was to collapse parent folders above. Even adding many separate TweakPane instances to a div container with overflow enabled doesnt seem to allow scrolling to reach them.
Is there a simple way to fix this using custom css for tweakpane or is it something that needs to happen in the library its self?
I'm not a css expert so apologies if this is trivial. Thanks in advance.

Maybe your overflow-y setting doesn't work because that element has no hint for its height.
I created a small example for scrollable pane:
https://codesandbox.io/s/tweakpane-scrollable-f4izl?file=/src/styles.css
Does this solve your problem?

You are absolutely right. I just found this 1min ago and was about to message. Apologies for the noise. :)

No problem! I'm glad the problem was solved.

Maybe your overflow-y setting doesn't work because that element has no hint for its height.
I created a small example for scrollable pane: https://codesandbox.io/s/tweakpane-scrollable-f4izl?file=/src/styles.css
Does this solve your problem?

This codesandbox seems to be missing - :disappointed:

authors: aniongithub cocopon felixfaire

repo: cocopon/tweakpane


text:
Error: Cannot find module 'js-yaml'

Reagarding the README: Some folks need todo npm i (or the yarn equivalent), to install the dependencies, for a flawless install :-)

You can do 'npm install js-yaml --save' and the problem disappear


text:
[MODULE] - Match an N digits number

Please describe the module you would like to add to the content library
E.g. to detect customer numbers or similar
Do you already have an implementation?
-
Additional context
-

@divyanshukatiyar this one has a faulty return in the endpoint:
{
    "text": "My PIN is 1337.",
    "digitLength": 4,
    "spacyTokenizer": "en_core_web_sm"
}

returns
{"Number":[3,4]}

which doesn't fit the standardized output format

repo: code-kern-ai/bricks


text:
[MODULE] - Credit card number extraction

Description
This module extracts the credit/debit card numbers from a given string. It uses regular expression that parses the card details in a specified format. The credit card number can either be 13 digits(outdated), 15 digits(e.g. American Express) or 16 digits(e.g. Visa or Master Card) and it can be written either one complete number, or separated with spaces, or separated with hyphens.
Implementation
If so, please share it here. For instance:
from typing import Dict
import spacy
import re

def credit_extraction(text: str = None) -> Dict:
    if text is None:
        text = "This is my card details please use it carefully 4569-4039-6101-4710."
    nlp = spacy.load("en_core_web_sm")
    doc = nlp(text)
    regex = re.compile(r"(\d{4}[-\s]?){3}\d{3,4}")

    credit = []
    for match in regex.finditer(text):
        start, end = match.span()
        span = doc.char_span(start, end)
        credit.append([span.start, span.end, span.text])

    return {"credit nr.": credit}

Additional information

Make sure to have spacy installed if running on the local machine since it is used to create the doc object which is a sequence of token objects. This can be installed by running pip install -U spacy.
Since we are tokenizing each word, we also need to make sure that a tokenizer is installed as well. We used en_core_web_sm which can be installed by running python -m spacy download en_core_web_sm.

@divyanshukatiyar I think this one has the wrong return format. In the endpoint,
{
    "text": "This is my card details please use it carefully 4569-4039-6101-4710.",
    "spacyTokenizer": "en_core_web_sm"
}

returns
{"creditCard":[[9,16,"4569-4039-6101-4710"]]}

but it should be
{"creditCard":[[9,16,"CARD"]]}

I found a small spelling mistake in common:
it is written Tupel instead of Tuple

authors: SvenjaKern divyanshukatiyar jhoetter


text:
Add ability to Edit status code and respond

The basic setup is done in #25.
This is the second part where we will be able to edit the status code and respond using interceptor.

Closing this as PR #43 is closed. One can edit status codes and intercept

authors: amit-mb revathskumar

repo: code-mancers/interceptor


text:
[Epic] User can click to perform all usual command line actions (system trays)

As planned, the Goal is to have a systemtray for crc. It'll make repetitive actions like start/stop possible with a few clicks. This would be useful for developers who tend to stay on the IDE . They'd perform all interactions with the cluster using IDE provided plugins. In that scenario having a tray to manage the crc cluster would fit in without much friction.
We'd need a server component (crc daemon) to perform the actions on behalf of  the  GUI component.

[x] system process; daemon/network service #796
[x] allow changing configuration through the daemon #1246

systray

[x] macOS #794
[x] Windows #795

[x] https://github.com/code-ready/tray-windows/issues/5

@anjannath ping

@gbraad macOS system tray can be moved out of experimental, remaining thing for the windows system tray to be out of experimental is

https://github.com/code-ready/tray-windows/issues/5

Will happen at the same time..

This issue can be closed as the epic has been resolved. Everything now are follow-up issues

authors: anjannath gbraad

repo: code-ready/crc


text:
finish norms document

The 2019 Transparency Report had a very good idea that was never realized:

The community needs more specifically articulated and codified values. In addition to the Code of Conduct, this would provide a lens through which the community understands and models acceptable behavior.

A "values.md" document, something constructive and idealistic, would be a welcome addition to this repository though it also would require gathering quite a bit of community input.

Oh wow how did I not know about this? We already have a norms document. But it has a "Big TBD" on it and definitely needs more work.

There is relevant conversation/history under #66 for this issue. In terms of a starting point, we have a few great resources:

the "how to code4lib" discussion
WriteTheDocs community principles in their CoC
WriteTheDocs Slack guidelines

I'll add more examples here as they come to my attention. I think the "how to Code4Lib' document is a wonderful starting point and the norms document could borrow from it heavily.


text:
Feature Request: Can we integrate Chromeless

Hi,
I have recently saw this project in github Chromeless getting popular every day. It was released recently and gain lot of users attraction. So can it be integrated with selenide? I know it was written in typescript but still can we do that. If not you can close it.
Thanks,
Anil

What is the main reason? According to the documentation, Chromeless is the same as Headless chrome, so just take your existing tests in selenide and run them in headless mode. Will be the same as chomeless

I've had our tests running with it for a while now- works like a charm!
It's as simple as adding System.setProperty("chromeoptions.args", "headless"); to your initialization block.

We can't integrate Chromeless somehow. If it needs you can use chrome with headless mode.

authors: BorisOsipov SVPA-BetsyFox SergeyPirogov anilreddy

repo: codeborne/selenide


text:
High DPI displays render blurry SVGs in Java 9+

    private Method lookupScaleMethod() throws NoSuchMethodException {
      Method scaleMethod;
      try {
        scaleMethod = Screen.class.getDeclaredMethod("getScale"); // until 8u51
      } catch (NoSuchMethodException e) {
        scaleMethod = Screen.class.getDeclaredMethod("getRenderScale");
      }
      scaleMethod.setAccessible(true);
      return scaleMethod;
    }

Both of these methods no longer work for determining the scale factor for the screen, but Java 9 introduced the public methods screen.getOutputScaleX and screen.getOutputScaleY which makes the above code obsolete.
I would have made a pull request instead of an issue, but using these new methods would make the new release incompatible with Java 8 and below, and I don't know how the owner of this repo would prefer to deal with that.
If creating a Java 9+ version of this project is acceptable, I can submit a pull request using these methods.

You could use a method like this:
	public static double getRenderScale(Window w) {
		if (w != null) {
			// Java 9
			try {
				Method m = Window.class.getDeclaredMethod("getRenderScaleX");
				return ((Double) m.invoke(w)).doubleValue();
			} catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException
					| InvocationTargetException e) {
				// Try next
			}

			List<Screen> screens = getScreens(w);
			if (screens.size() > 0) {
				// Java 8 > 8u60 b15
				try {
					Method m = Screen.class.getDeclaredMethod("getRenderScale");
					m.setAccessible(true);
					return ((Float) m.invoke(screens.get(0))).doubleValue();
				} catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException
						| InvocationTargetException e) {
					// Try next
				}

				// Java 8 <= 8u60 b15
				try {
					Method m = Screen.class.getDeclaredMethod("getScale");
					m.setAccessible(true);
					return ((Float) m.invoke(screens.get(0))).doubleValue();
				} catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException
						| InvocationTargetException e) {
					// Use default
				}

				log.error("Cannot get render scale. Default to 1.0");
			}
		}
		return 1.0;
	}

authors: brannamm mipastgt

repo: codecentric/javafxsvg


text:
Custom JS objects seem to confuse the transpiler

var self, routine;

self = this;

routine = {
	enemies: false,
	targetNearby: function () {
		routine.enemies = self.findEnemies();
		for (var i = 0; i <= routine.enemies.length; ++i) {
			var enemy = routine.enemies[i];
			if (enemy) {
				var distance = self.distanceTo(enemy);
				if (distance <= 35) {
					return true;
				} else {
					return false;
				}
			} else {
				return false;
			}
		}
		return false;
	}
};

while (routine.targetNearby()) {
	self.say(routine.targetNearby());
}

This code seems to confuse it. routine.targetNearby() should return a simple true or false if there is a target nearby that satisfies the distance requirement. It's returning [Object Object] as per the heros say. My best guess is that it's actually returning the function object itself instead of executing the function. but thats just a guess.

With the interpreter, this kind of code now gives a new error:

authors: nwinter sotonin

repo: codecombat/aether


text:
Enemies struck with the lightning bolt spell become invincible zombies

The lightning bolt spell that comes with the lightning twig weapon instantly reduces any enemy to 0 HP.  I did this to a 2900 HP Tharin on dueling grounds and reduced him to 0 HP in one shot.  It does the same to any enemy in the single player missions.  An enemy reduced to 0 in this way does not die, instead it plays the death animation, then continues to move and attack while laying on the ground, and cannot be killed.

Oh my! That's quite nice. Although that is exactly what lightning bolts do in real life, our game should have Game Balance. ;) I'll fix it.

Fixed it.

authors: JoshuaSpears nwinter

repo: codecombat/codecombat


text:
Copy coordinates

I came up with a new UI feature to add to the game. I wanted to add a way to copy the Coordinates that were displayed whenever the mouse moves over the stage. That way you could just paste those coordinates into functions like "hero.moveXY" without having the memorize their exact coordinates every time.
Ideally I wanted to create a new Context Menu or modify an existing one to have the option to copy the coordinates listed when you clicked the right mouse button, but I haven't yet figured out how to trigger the Context Menu for elements created using Create.js. If anyone knows how to trigger the Context Menu for the Create.js canvas that would help immensely.
In the mean time I created a new Keyboard command that triggers whenever you press "crtl-shift-S" that will check if the mouse is over the stage and if so will copy the coordinates displayed by CoordinateDisplay and I've got it working for the latest version of Chrome and Firefox.
Here is a gif showing my new feature in action:

I was hoping you could give me your thoughts on my new feature such as:

The best shortcut command to use if "crtl-shift-S" is already being used by something else I'm not aware of.
My copy command for older browsers creates a new hidden text element, puts the text I want to copy in it, calls "commandExec('copy')" to copy the text to the clipboard and finally deletes the text element. I was hoping some one could take a look at that and offer a more elegant solution.

I like this approach. I wonder if you can get it working using default ctrl+c / cmd+c shortcuts, and only have it fire if nothing is selected in the code editor and the mouse is showing the coordinate hover (so that we don't accidentally interfere with the normal copy shortcut when that's what is intended).
To do a custom context menu, you could do an event in PlayLevelView like contextmenu '#webgl-surface': onSurfaceContextMenu and write a function that prevented the default context menu (which is useless on the canvas) and instead made its own context menu. That would probably be more discoverable, and we could put a bunch of other interesting stuff in there later. Wanna give it a shot?
As far as the code, please take out the extra console.log statements and #MMN Copy Coordinates Action comments when you are ready for it to be merged in. Also, please sign the CLA. Thanks!

I was going to remove those console.log statement once the feature was fully ironed out.
In regards to the ctrl+c / cmd+c shortcuts, I'll try implement the check for selection in the entire window not just the code editor as we also need to consider the ctrl+c shortcut being used by the URL and search bars and only trigger when nothing is selected in the entire window and the CoordinateDisplay is shown.
I'll also look into creating a custom trigger for the Context Menu. Once I've got it so the event triggers and prevents the default Context Menu, I'll look into creating the custom Context Menu.

I'm closing this pull request due to creating the Custom Context Menu and passing the changes to a new Pull Request #4963

authors: mmnishid nwinter


text:
Notes

Pull request for Testing Out of the Workshop "unix & git for everyone"

NIce work! Good luck on any upcoming courses!

repo: codefellows/unix-and-git-workshop


text:
Show author

On tasks overview, display the owners name in first column.

Changing this to be "Show a NICE author name", ideally, plucked from the spreadsheet that has it formatted nicely. The email address suffices for the MVP.

repo: codeforamerica/ceviche-cms


text:
better drop-in title for jinja, fixes #160

Thanks @creade for the help!

MURGE

authors: bsmithgall shellicious


text:
Create sub-icon/marker to indicate if 3rd party user is pro/against the bill

I was thinking that we could change the color of the icon. But maybe it'd be easier to add a little plus or minus next to the icon.

This includes the data pull from the "Third Party Participants" google sheet

Update:

Need a academic institution icon. Need a business icon (we can have 2 colors - for profit/non-profit)
Could we surround the icon in green/red/yellow to indicate endorse/object/split

Closing issue. Possibility of modifying icons and changing logic if we change format of the google sheets on the backend in the future, but functionality exists.

repo: codeforboston/advocacy-maps


text:
REFACTOR: About Pages

Overview
This ticket is part of our initiative to enhance frontend components by implementing Bootstrap styling and react-bootstrap components and consolidating redundant component instances. This effort aims to streamline our frontend, facilitating smoother development processes, and positioning us favorably to introduce new features and adapt styling in the future.
Work Detail

This ticket specifically targets the components that make up the About pages (not including existing Card components, which are being handled under another ticket).

Tasks:

Refactor components to integrate Bootstrap and styled components while removing CSS modules.
When called for, find or create reusable (sub)components to reduce repetition and ensure uniformity.
Create or revise the Storybook story for these components, and any new sub-components.
Convert from js to tsx.

Reference:

About components can be found in the components/about/ folder.
Bootstrap components should be imported from the components/bootstrap.ts file.

Figma Reference:
Prerequisites:
This task requires knowledge of React, Bootstrap, css modules, styled components, and TypeScript.

Working on this!

repo: codeforboston/maple


text:
minor issue - when making CTRL+N is opened a new simple text file and not a one with a .sql extension

As said in the title, prior to latest VS Code update (I am on 1.90) when i make CTRL+N in the vscode-db2i context (v1.0.0 installed) it opened a .sql file, and it was very helpfull since i can write the statement i need and run it to see how it works, now when i make CTRL+N is opened a simple txt file and before i can run my statement i need to save it and then i can run the statement. Is there a way to have VS Code to open a .sql file?

Sadly, this is controlled by VS Code and not by the database extension.
You want this config:

authors: allthom worksofliam


text:
【機能】CDN経由でアクセスできるようになっている

改善詳細 / Details of Improvement

CDN経由でアクセスできるようになっている

スクリーンショット / Screenshot

期待する見せ方・挙動 / Expected behavior

xxxx(できるだけ簡潔に/as concise as possible)

動作環境・ブラウザ / Environment

macOS / Windows / Linux / iOS / Android
Chrome / Safari / Firefox / Edge / Internet Explorer

やったけど意味ないかもなー


text:
Merging to dev potential React Migration

Add more reviewers as needed for code review.

@leekahung can you rebase this onto the Development branch.

authors: k-mack leekahung

repo: codeforpdx/PASS


text:
Bug fix for contacts page

Bug Fix for Contacts Page

This PR:
1.    Fixes the bug where the website fails to render after login due to undefined variable client by changing it to contact and modifying the area which are causing the issue
2.   Also removes the unused link element from index.html for the original css file

The files this PR effects:
Components/Pages

src/pages/Profile.jsx

Other Files

index.html

Screenshots (if applicable):
Screenshot of fix:
https://github.com/codeforpdx/PASS/assets/14917816/1de0d2d0-ed42-4b28-9064-07f69719033d
Screenshot of signup link rendering for signups page:
https://github.com/codeforpdx/PASS/assets/14917816/1c51add1-2782-4773-94ea-bdc8d7cc2a20

Good quick fix
Only question is whether client should also be changed to contact on lines 45 and 111

Yeah, I think I could do that before merging.l the fixes. I'll check any of the test files, too, in case it fails one of them.

Hey @xscottxbrownx and @timbot1789, I've just updated PR based on the new comments. Let me know if there's still anything else that would need to be corrected. Would like to merge this in as soon as possible to fix the existing rendering bug.


text:
Simplify DI Container

We currently use a third party package to create DI Containers but it feels a bit overly complex and has a confusing interface for creating containers. I want to create a couple small interfaces to replace these classes that give us proper typing support.

done!

repo: codeghetti/seagulls-py


text:
Update Controller.php

I think this is potential of security flaw:
I edit system code:
public function cachePage(int $time){     CodeIgniter::cache($time);     echo 'should not execute'; }
And put on url: http://mysite.test/anycontroller/cachePage/10
And it executed (the message appears)
So I have 2 suggestion for this:

Have every method on CodeIgniter\Controller and its parent to be declared as 'protected' so it cannot accessed by router
Have every method on CodeIgniter\Controller and its parent to be prefixed with _ (single underscore) so it will excluded by router

Thankyou

Good catch. I don't use the auto-routing much anymore so didn't think about that. Not every method can be made protected as they are called from outside classes. The underscore method I really am not a fan of, though it might be appropriate here. Will have to consider.
I have no problem with the change in this PR, but it's causing a test to fail. Please update the tests so that they pass again.

My intend to make CI developer team notice this potential. Sorry, didn't know the other way for marking files.
For now, I still find a way to modify test. So for now I revert the function.
I catch it when writing some tracking code (web statistics) in constructor. It work as it should, but not as expected. The IncomingRequest object still NULL at this time. So I went through the router and controller code.

Just my curiosity, how you make routing works if turning autoroute off?
Let say, I have about 10 classes for 10 different sections. Do you mention every route with $route->get() one-by-one?

Correct. You would specify each available route explicitly. It's not nearly as bad as it might sound at first :)

Nothing changed when the dust settles, so closing this.

authors: jim-parry lonnieezell sugenganthos


text:
Minor fixes in Helpers

Each pull request should address a single issue, and have a meaningful title.
Description
Explain what you have changed, and why.
Checklist:

[ ] Securely signed commits
[x] Component(s) with PHPdocs
[x] Unit testing, with >80% coverage
[x] User guide updated
[x] Conforms to style guide

---------Remove from here down in your description----------
Notes

Pull requests must be in English
If the PR solves an issue, reference it with a suitable verb and the issue number
(e.g. fixes 12345
Unsolicited PRs will be considered, but there is no guarantee of acceptance
Pull requests should be from a feature branch in the contributor's fork of the repository
to the develop branch of the project repository

You have checked the "securely signed" box, but your commits are not GPG-signed, blocking their merge.
The changes you made to the helpers are good, though :)

Can these changes will get merged in master branch or I need to commit these securely again?

I can merge them, but they won't be attributed to you. Your call.

If my latest commit is secure, then It will be attributed to me?
Or I need to make new pull request for the same?

I want attribution as I want to make few more contribution

You might be able to do a "git amend -S" to GPG-sign it retroactively, though I am not sure of the details.
If not, then a new PR, with a signed commit, might be simplest, sorry!

No worries, i will give it a try

authors: atishamte jim-parry


text:
Can't use engine when building from source.

I've followed the tutorials exactly and it seems like the engine has lots of bugs. I'm excited to see what this engine is capable of, but I can't as long as it keeps this stuff up.
I got yet another error while trying to generate the programs from a jar I just built from source code following the wiki: Error: Could not find or load main class launcher.Main
(also, in the wiki page WORKING FROM SOURCE, the -C needs to be lowercase to actually create the jar.)

No, C must be uppercase, really. And yes, I am working on new commit, use releases, master branch isn't stable when working on new update.

when I tried to use -C and it brought up a list of commands for java. only -c made the jar.

and didnt you forgot to add dot at end of command? Maybe you didn't saw it first

Oh, that seemed to work, thanks. I really like this engine. It shows lots of promise.

Thanks for making such a great engine for me to use! here's my test program:

Image placement was a bit off but, i love the engine.

repo: codeindie/non


text:
Scrolling with trackpad not smooth on Chromium-based browsers on Ubuntu

Hello,
I've noticed a problem when scrolling on my laptop in Chromium-based browsers.  It's hard to describe, but basically, when scrolling a document, the scroll bar will move slowly and kind-of "vibrates" back and forth, making it quite hard to actually scroll up or down. This does not happen when clicking on and dragging the scroll bar, or when using a scroll wheel on a mouse.  I'm guessing this has something to do with horizontal scrolling messing things up?
I am on Ubuntu 17.04 with Unity.  I had the problem with 16.10 too.  I also tried on Firefox, but the issue only shows up on Chrome/Chromium.  I don't know which version of CodeMirror causes this, I noticed the bug on the software Abricotine and on the online CodeMirror demos (e.g. https://codemirror.net/demo/complete.html).
Thanks for your help :)

I'm not seeing this on Chrome 57 on Debian—but it may well be that this is dependent on the events generated by the trackpad driver, in which case it'd be tricky to reproduce on different hardware.

Experiencing the same, Dell XPS 13 with Ubuntu 17.04. The bug is visible in the official demo, chromium 60.0.3112.113. Firefox 55.0.2 runs fine. @xlambein , do you by any chance have the same laptop (or same touchpad)?
xinput --list gives
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ ELAN Touchscreen                        	id=10	[slave  pointer  (2)]
⎜   ↳ DLL0704:01 06CB:76AE Touchpad           	id=12	[slave  pointer  (2)]

Yup I have that one exactly.

I can confirm that this is related to horizontal two finger scroll. Deactivating it via synclient HorizTwoFingerScroll=0 leads to smooth scrolling in the codemirror demo

authors: grg2rsr marijnh xlambein

repo: codemirror/CodeMirror


text:
Text selection issue

I have a problem with selections in CodeMirror textarea.
When I press Ctrl+A (basically select all operation) on CodeMirror textarea, it selects text with the spaces. These spaces creating according to longest line in textarea. If you didn't understand what I mean, here is the picture:
What it looks like

It shouldn't include these parts

So it has to be a thing similar to this

I was thinking to change CodeMirror to somethink else but I thinked I must create a issue before it.

That's just how CodeMirror (and many other text editors) draw the selection. There are no spaces, it just indicates that the selection continues on the next line that way. This isn't going to change.

Is there no way to change this with manupilating CSS or Javascript? Because a library named Monaco Editor can do what I want bu I still want to use it with CodeMirror.

You could hide the editor's own selection with .CodeMirror-selected { background: none !important }, and use the mark-selection addon to give the selected text a class that you can style yourself.

Works like a charm! Thank you.

authors: marijnh ozanthedeveloper


text:
Add preventCursorLeft/preventCursorRight options for atomic markers

Per issue #5763. Hopefully it's this simple, seems to work for me.
Would probably be good to add tests that the precedence works right when both options are provided. I'm having trouble running the tests locally though, npm run test produces errors like ReferenceError: Can't find variable: addDoc (localhost:3000).

Some of the errors in the travis run seem spurious (I can't see why they'd occur, and they don't occur for me locally), but the core_atomicMarker test is definitely failing for me (both in Firefox and Chrome).
Also, I prefer to avoid negatives in option names (because you get a double negative when you set them to false), and this applies not just to cursors but to any selection endpoints, so I'd prefer to rename these to selectLeft and selectRight, and inverse their meaning (making sure they now default to the inverse of the corresponding inclusive option).
Finally, you failed to update the anchor name in the docs for preventCursorRight.

Thanks for the review! I'll make those changes.
Can you give me a hint on how to run the tests? I've tried npm install && npm run build && npm run test and gotten the exact same failures as Travis (which doesn't include a core_atomicMarker failure). I also just tried rebasing on the latest master and got the same result.

npm test is indeed how you run the tests, and they are passing on the master branch for me.

Sorry for the delay @marijnh -- I just took another look at this. Responded to your review, fixed up the tests and added specific tests for the fallback behavior. What do you think?

Thanks! Merged.

authors: marijnh thomasjm


text:
[vim] fix html in dialogs/prompts

Fixes vim registers command when html tags present.
Fixes vim prompts in Firefox Developer Tools.
Sorry for the gnarly diff, but it had to be done.
I've also inlined the dialog function and searchPromptDesc constant var, which had exactly one reference each.
Background:
Firefox - the cmdline and search prompt has been broken in Firefox for a while, the <input> tag gets stripped out (when assigning to innerHTML in the dialog addon). Luckily constructing DOM nodes instead works.
:registers - This command prints out text you last copied/changed/deleted along with named/numbers registers. If you have html in your registers, the output is incorrect / interpreted.

the <input> tag gets stripped out

Why? Is this some kind of elevated security setting active in the devtools? There's several other uses of innerHTML in the library (dialog and lint addons).

Is this some kind of elevated security setting active in the devtools?

Must be, got this message in Browser Toolbox:
Flattening unsafe node (descendants are preserved). Element: input.

There's several other uses of innerHTML in the library (dialog and lint addons).

True, but Firefox have implemented their own search dialog for default keymap. The only other case I found with an input field is Emacs "Goto line". I can do a PR for it later, or do you want it added here?
I didn't check which elements are unsafe, but I'd hazard a guess textarea, script and style would get flattened too.

Fair enough --- merged!

authors: benhormann marijnh


text:
pass Transaction to validFor

I'm using codemirror as a searchbox. I have two "types" of autocompletions:

Historical, i.e. previous things you've searched for.
Syntactical, i.e. typing kind: will give you different "kinds" of cards that you can search for.

I'm using activateOnCompletion to get completion after accepting another completion. I'm also using validFor to make historical completions work since they may have spaces.
However, as seen in this demo video, the historical completion is "overriding" the syntactical completion because the validFor is still returning true even after the initial completion was accepted. You can play with the searchbox here.
This PR passes the Transaction to validFor. Using that transaction, I can call tr.isUserEvent('input.complete') and break out of validFor. I used pnpm patch to test this new behavior in a branch of my project and it works the way I want.

Would it maybe make more sense to always reset existing completions when picking a completion?

Yeah, I can't think of a scenario where someone would want to keep the existing completions after accepting one of them. I tried to avoid potentially breaking behavior by making a small additive change. But if you also think it would make sense for validFor to always return false after accepting a completion, that'd work for me!

I've pushed an alternative patch, which cleans up some of the state transition handling, and does not add this argument to validFor.

authors: AlexErrant marijnh

repo: codemirror/autocomplete


text:
🛑 SMACH.US is down

In 5512448, SMACH.US (https://smach.us) was down:

HTTP code: 0
Response time: 0 ms

Resolved: SMACH.US is back up in 6712df7 after 8 minutes.


text:
Display prefecture after Dojo name (instead of region name)

Fix #380
This PR changes the following 2 things:
1. Display prefecture name instead of region name:

Delete hard-coded region name in /db/dojos.yaml
Display prefecture name after Dojo name

2. Records in DB:

Change records in Prefecture model like this:

北海道 -> 北海道
東京都 -> 東京
大阪府 -> 大阪
沖縄県 -> 沖縄

@yasulab
Sorry for replying so late.
Why do we need this commit ac0215c ?
It seems unnecessary for the purpose of this PR.

It seems unnecessary for the purpose of this PR.

@nalabjp Yeah, I thought this not necessary, but through creating this PR I needed to update some of dojo names as noted at ## 2. Records in DB. And I found this changed the order of dojo listing. So I put this code to set order by ascending.
But what I care about is the order and result, so if the order and result is same as now, I'm not against to deleting this code. ;)

@yasulab
Thank you for your easy explanation.
I believe that orders in prefectures are already collateralized.
That's because Dojo.default_order scope is applied to the return value of the following code.
https://github.com/coderdojo-japan/coderdojo.jp/blob/ae8da6c57f5bfe70c5ef10513357929f472816ba/app/controllers/home_controller.rb#L4
https://github.com/coderdojo-japan/coderdojo.jp/blob/ae8da6c57f5bfe70c5ef10513357929f472816ba/app/models/dojo.rb#L13

@nalabjp Thanks for explaining code by code. 🆒✨ I have deleted the line in this commit. ;) https://github.com/coderdojo-japan/coderdojo.jp/commit/ff6a548625743bc715d9444e9ba57f45f416bc74

authors: nalabjp yasulab


text:
nested if in for loop; Error: i is not defined

Im trying to nest a conditional in the for loop like below and receive error: Error: i is not defined
is there a way I can achieve the same result?
@@for (var i = 0; i < arr.length; i++) {         @@if(i == 0){           Hello World         }   }

+1, this would be very useful

any idea?

how about nest file in file? like this: https://github.com/coderhaoxin/gulp-file-include/issues/62

define one another variable with i,
@@for(var i = 0, s = ' selected'; i < 5; i++, s = '') {
+i+
}

After a day's attempting, I found out that in current version, there's no way to achieve this using only fileinclude. You just can't nest if/loop in if/loop. I've tried nested if in if, nested loop in loop , none of them worked. Just right a component or use js to judge. And fileinclude doesn't support trans data in js neither. I think it is best for simple header footer include, which is cool, too.

@pimkle thanks for info. Was also struggling with this.
Would be a very useful functionality if this is added.

do you fixed yet , i find way like this ,and it work
@@for (var i = 0; i < breadcrumb.length; i++) {

+ ((breadcrumb.length!=i+1)?('' +breadcrumb[i].name+ ''):breadcrumb[i].name) +

}
參數
系統參數

this solution not working for me
my code:
@@for (var i = 0; i < context.card.length; i++) {

+context.card[i].title ? (                             @@include('./_includes/_commons/h2.html', {                            "title": "context.card[i].title",                            "className": "context.card[i].titleClass"                            })                         ) : ''+

        }

error message:
Invalid or unexpected token: for (var i = 0; i < context.card.length; i++)  { result+=

                         +context.card[i].title ? (
@@include('./_includes/_commons/h2.html', {
"title": "context.card[i].title",
"className": "context.card[i].titleClass"
})
) : ''+`

        `; }

Details:
domainEmitter: [object Object]
domain: [object Object]
domainThrown: false

this solution  is not working for me:
my code:
@@for (var i = 0; i < context.card.length; i++) {

                        <div class="flex-col flex-stretch `+context.card[i].ImageClasses+`" style="background-image:url('`+context.card[i].image+`')">

                        `+context.card[i].title ? (
                           @@include('./_includes/_commons/h2.html', {
                           "title": "context.card[i].title",
                           "className": "context.card[i].titleClass"
                           })
                        ) : ''+`

            }

error message:
Invalid or unexpected token: for (var i = 0; i < context.card.length; i++)  { result+=`

                        <div class="flex-col flex-stretch `+context.card[i].ImageClasses+`" style="background-image:url('`+context.card[i].image+`')">

                        `+context.card[i].title ? (
                           @@include('./_includes/_commons/h2.html', {
                           "title": "context.card[i].title",
                           "className": "context.card[i].titleClass"
                           })
                        ) : ''+`

            `; }
Details:
    domainEmitter: [object Object]
    domain: [object Object]
    domainThrown: false

authors: adamlindqvist anulal-s codechameleon23 hesselberg huangwentai mishingo pimkle

repo: coderhaoxin/gulp-file-include


text:
Connected Login to Nav

Change Summary
Login modal now accessible via the nav buttons
Change Form
Fill this up (NA if not available). If a certain criteria is not met, can you please give a reason.

[ ] The pull request title has an issue number
[ ] The change works by "Smoke testing" or quick testing
[ ] The change has tests
[ ] The change has documentation

Other Information

Hey Aidan, please merge main into your merge and handle merge conflicts :) thank you :D:D:D

repo: codersforcauses/csf


text:
[Feat]: reCAPTCHA Implementation

Description:
Implementing reCAPTCHA on the VigyBag website will help in enhancing security, preventing spam and unauthorized access, protecting user data.
This also helps in preventing automated bots from accessing or submitting forms on the website.
Solution:
I would consider using reCAPTCHA v3, which provides a more user-friendly way to detect bots without requiring any interaction from the user.
I will prefer integrating reCAPTCHA in signup page as it will help prevent bot registrations on the site.

Hey @codervivek5, I want to work on this issue.
Please assign it to me under GSSoC '24.


text:
Apply widget margin to mobile scroll indicator

On mobile the scroll indicator is aligned on the rigth. Apply widget
margin to prevent it being hidden behind navigation bars which are
also visible on mobile.

Coverage remained the same at 99.156% when pulling c04812f880dcfbc41ad88dd5f2ae1f004afe052f on tf:mobile-scroll-indicator-margin into 3908b0f2d05157789cad6b52410cb5509ce99d87 on codevise:master.

authors: coveralls tf

repo: codevise/pageflow


text:
[Program]: Write a Swift program to find the inverse of a

Description
Write a Swift program to find the inverse of a
The inverse of a square matrix A is another square matrix B such that the product of A and B is the identity matrix I. The inverse of A is denoted as A-1.
Input  :
1 2 3
4 5 6
7 8 9

Output :
-0.16666666666666666 0.3333333333333333 -0.16666666666666666
0.3333333333333333 -0.6666666666666666 0.3333333333333333
-0.16666666666666666 0.3333333333333333 -0.16666666666666666

How to contribute

Save the solution in program/program/find-the-inverse-of-a/FindTheInverseOfA.swift file

Hi,could you please assign this issue to me? @harshraj8843 @REVERB283 @rakibul-islam-raju @thecomputerfella

I've written, tested and made a PR for the code which works perfectly fine. Can you please review and merge soon?

repo: codinasion/codinasion


text:
Write a Python program to convert seconds to weeks

Description
Write a Python program to convert seconds to weeks
1 week = 7 days = 168 hours = 10080 minutes = 604800 seconds
Input  : 3024000
Output : 5

How to contribute

Save the solution in program/convert-seconds-to-weeks.py file
Add convert-seconds-to-weeks.py file in convert-seconds-to-weeks folder

!assign

repo: codinasion/program


text:
Added javascript file to convert octal to hexadecimal.

Why:

Closes #456
What's being changed:
I wrote javascript code to convert octal to hexadecimal

Hey @DiamonndAde,
The issue should be #464 instead.
Thank you!


text:
Add Hammurabi game port to C and Rust

Linked the repo url's in the README. Each Linked repo have all the instructions on how to run the game.

Ah, thanks for following the rules around memory safety ;)

authors: beyonddream coding-horror

repo: coding-horror/basic-computer-games

license: Unlicense


text:
Build error: "webpack: not found"

When building 44bd7b798ba  on Ubuntu 14.04, sbt fails with such message:
[info] Bundling the application with its NPM dependencies
[error] sh: 1: webpack: not found
[error] npm ERR! weird error 127
[error] npm WARN This failure might be due to the use of legacy binary "node"
[error] npm WARN For further explanations, please read
[error] /usr/share/doc/nodejs/README.Debian
[error]
[error] npm ERR! not ok code 0

I had installed npm by apt-get, and tried to install nodejs-legacy in order to fix build. It didn`t helped.

Do you have any additional logs? Sometimes there's npm-debug.log in the directory you were running npm from.

I can't promise you that I'll be able to take a look at the issue today, but I'll definitely try to fix that ASAP.

There is no npm-debug.log file on my machine.

npm WARN This failure might be due to the use of legacy binary "node"

Both node and nodejs commands do start js interpreter, probably it`s not cause of problem.
Had anybody reproduced this issue?

Alright, for now I have done the following:
$ docker pull debian
$ docker run -i -t debian /bin/bash
# apt-get update
# apt-get install apt-transport-https # because otherwise it may fail on installing sbt
# # Starting from here, I'll follow the installation instructions from sbt site
# echo "deb https://dl.bintray.com/sbt/debian /" | tee -a /etc/apt/sources.list.d/sbt.list
# apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
# apt-get update
# apt-get install sbt
# # Install npm
# apt-get install npm
# # Check the build system
# npm --version
1.4.21 # oh god
# node --version
bash: node: command not found
# nodejs --version
v0.10.29 # oh my god

From that we can already conclude that nodejs and npm versions in the standard Debian repositories are terribly, extremely outdated. I'll follow with my investigation to see if we can do anything with that.

After that I've done the following:
# # Now let's build Keter
# git clone https://github.com/codingteam/Keter.git
# cd Keter
# sbt site
[error] /usr/bin/env: node: No such file or directory
[error]
[error] npm ERR! @ bundle: `webpack --config /Keter/target/scala-2.11/scalajs.webpack.config.js`
[error] npm ERR! Exit status 127
# # Alright, let's install this nodejs-legacy thing
# apt-get install nodejs-legacy
# sbt site
# ls target/site
index.html  keter-opt-bundle.js.map  keter.js

As you can see, I have the project built successfully with that nodejs-legacy thing even on this shitty old outdated Node.js version, so nope, I can't reproduce your problem, sorry. Could you try to do the following?
# cd target/scala-2.11
# cat package.json # and show it to me
# npm run bundle # and show the logs

Ah, please note that I was using Debian 8.6 through the investigation:
# uname -a
Linux 5b0496cc786c 4.4.27-moby #1 SMP Wed Oct 26 14:21:29 UTC 2016 x86_64 GNU/Linux
# cat /etc/issue
Debian GNU/Linux 8 \n \l
# cat /etc/debian_version
8.6

$ cat package.json
{
"dependencies": {
"rot-js": "0.6.2",
"rot-js": "0.6.2"
},
"devDependencies": {
"webpack": "1.13",
"source-map-loader": "0.1.5",
"concat-with-sourcemaps": "1.0.4"
},
"scripts": {
"bundle": "webpack --config /home/akon/src/keter/target/scala-2.11/scalajs.webpack.config.js"
}
}
$ npm run bundle

@ bundle /home/akon/src/keter/target/scala-2.11
webpack --config /home/akon/src/keter/target/scala-2.11/scalajs.webpack.config.js

sh: 1: webpack: not found
npm ERR! weird error 127
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! not ok code 0

Could you please execute ls node_modules/.bin there?

There is node_modules/rot-js only.

That's interesting. What will it do if you run npm install?

After nmp install and downloading a lot of packages, sbt site completed successfully. But after sbt clean, webpack is missing again.

That looks like a problem of scalajs-bundler. Could you please report the issue to them? I'm ready to participate.

Hope this problem will be solved after OS upgrade, hence "won`t fix".

repo: codingteam/Keter


text:
Preserve report type accross rotation

Not sure if this is the best way to avoid the crash but for an unknown reason the onAttachFragment() is being called from parent's onCreate()

fixes codinguser/gnucash-android#633

Thanks for the PR @GianpaMX
So I'm unsure from what you wrote: Does this fix the crashing or not?
Also, could you send the PR against the develop branch. We never merge anything directly into master

Yes this fixes the crashing. I'm closing this PR and opening a new one against develop; just code review it before merging to make sure the solution makes sense

authors: GianpaMX codinguser

repo: codinguser/gnucash-android


text:
Android Studio 3 compatibility

A few things to make the project build with Android Studio 3:

updating the build tools
adding flavor dimensions
handling output file name
updating Gradle plugin & Gradle

Sorry, just confirmed the auto-suggestion from GitHub. :D
Will send the pull request to Develop branch, instead.


text:
Start AUS2200 documentation

Beginning of the AUS2200 documentation. I have a meeting with NRI tomorrow about this and want something to show.

I'm not sure if I can get a review in time but it'll be the first thing I do tomorrow morning

Thanks, this is only the start, so don't spend too much time on it. Its more about having something online in preparation for the meeting (3:30pm). I'll submit another pull request when its done and it can be properly reviewed then.

authors: dsroberts paolap

repo: coecms/cms-wiki


text:
refactor cogent3.parse.genbank.Location to be PEP8 compliant

The constructor arguments should all be deprecated in favour of pep8 compliant versions. The general approach needs to be
class Location:
    def __init__(
        self,
        data,
        Ambiguity=None,
        ... # all the other args
       **kwargs
      ):
      # loop over key/value items of kwargs and assign key to corresponding pep8 compliant arg
      # collect deprecation messages
       # if any messages, call deprecated() with a date 6 months from the day you write the code

As this is a deprecated function/argument, see dev guidelines for deprecation of code. Indicate the limiting version (for when the old function/argument will be removed) as 6 months from when you make the change.

This needs to be done before any publication.

@GavinHuttley
I will be happy to do this.

authors: GavinHuttley Nick-Foto


text:
FeatureRequest: cog_translate destination as cloud storage

Hello,
I am using cog_translate() in a server that processes images and uplaods them but I need to store the file locally before I can upload it.
It would be nice if I could specify the cloud destination directly. E.g. if dest param accepted a file like "gs://bucket..." or if it worked with gcsfs, or fiona's vsigs.

@chrisg-ngis This is a GDAL/Rasterio limitation. I don't think GDAL can write GeoTIFF directly to the cloud.
links:

https://github.com/rasterio/rasterio/issues/2148#issuecomment-819115992
https://gdal.org/user/virtual_file_systems.html#network-based-file-systems

also you can use Memory File to avoid creating temporary file.
from rasterio.io import MemoryFile

from rio_cogeo.cogeo import cog_translate
from rio_cogeo.profiles import cog_profiles

from boto3.session import Session as boto3_session

dst_profile = cog_profiles.get("deflate")

with MemoryFile() as mem_dst:
    # Important, we pass `mem_dst.name` as output dataset path
    cog_translate("my-input-file.tif", mem_dst.name, dst_profile, in_memory=True)

    # You can then use the memoryfile to do something else like
    # upload to AWS S3
    client = boto3_session.client("s3")
    client.upload_fileobj(mem_dst, "my-bucket", "my-key")

Thanks for the clarification.
I want to open a GeoTIFF, manipulate it with Rasterio, then upload it to GCS or AWS S3 as a COG.
So I need to first convert rasterio dataframe to a GeoTIFF in-memory file, then translate that to COG in another local disk file, and then I can upload that using a cloud provided library. Ok.

authors: chrisg-ngis vincentsarago

repo: cogeotiff/rio-cogeo


text:
backend: fix next iterating on []

Thank you for contributing to the Cohere Toolkit!

[ ] PR title: "area: description"

Where "area" is whichever of interface, frontend, model, tools, backend, etc. is being modified. Use "docs: ..." for purely docs changes, "infra: ..." for CI changes.
Example: "deployment: add Azure model option"

[ ] PR message: Delete this entire checklist and replace with

Description: a description of the change
Issue: the issue # it fixes, if applicable
Dependencies: any dependencies required for this change

[ ] Add tests and docs: Please include testing and documentation for your changes

[ ] Lint and test: Run make lint and make run-tests

AI Description

The pull request makes a modification to the get_files_by_agent_id function in src/backend/services/file.py.
Summary
The change ensures that the agent_tool_metadata is not only checked for being None but also for being a non-empty sequence. This additional check prevents potential errors when attempting to access the artifacts from the agent_tool_metadata.
Changes

Modified the condition for checking agent_tool_metadata in the get_files_by_agent_id function.

Codecov Report
Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 82.24%. Comparing base (4edacee) to head (929ba52).
Report is 62 commits behind head on main.

Files
Patch %
Lines

src/backend/services/file.py
0.00%
1 Missing :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #563      +/-   ##
==========================================
+ Coverage   81.38%   82.24%   +0.86%
==========================================
  Files         199      214      +15
  Lines        8354     9397    +1043
==========================================
+ Hits         6799     7729     +930
- Misses       1555     1668     +113

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

authors: codecov-commenter scott-cohere

repo: cohere-ai/cohere-toolkit


text:
Festive iconography lost on refresh

The hat disappears on non-monetized sites upon refresh, but is restored upon switching tabs

Fixed with https://github.com/coilhq/web-monetization-projects/pull/1375

This was not fixed in all cases it seems

The following url really seems to surface the issue consistently:
https://mail.google.com/mail/u/1/#inbox

This fix still isn't quite right.
Now, after the xmas period is over, the Santa hat flickers
Probably refreshing chrome will fix it (the default icon is set only once upon extension startup, though likely needs to be done hourly)

repo: coilhq/web-monetization-projects


text:
aws cli expects AWS_DEFAULT_REGION

Very useful tool, just discovered one small thing, it appears the expected env var is AWS_DEFAULT_REGION instead of AWS_REGION.
p.s. also discovered a neat bonus feature, that if you're juggling multiple accounts (e.g. home, work) and want to use a profile besides default, you can invoke assume-role like:
AWS_PROFILE=your-non-default-profile assume-role your-account your-role your-code

Great stuff, thanks!

Hey, thanks for pointing out the bug. I am currently, writing a PR to fix the issue, should have that out today.
Also great demonstration of another way to use the tool.
Cheers!

I also stumbled into this. It might be useful for it to print which profile it's using as it took me a bit to realize I had to set that for this. It might also be nice to be able to specify the profile to use as an arg/flag.

authors: chancez grahamjenson skehlet

repo: coinbase/assume-role


text:
Create devcontainer.json

Summary

How did you test your changes?

🟡 Heimdall Review Status

Requirement
Status
More Info

Reviews

🟡
0/1

Denominator calculation

Show calculation

1 if user is bot
0

1 if user is external
0

From .codeflow.yml

1

Additional review requirements

Show calculation

Max
0

0

From CODEOWNERS

0

Global minimum
0

Max

1

1

1 if commit is unverified
0

Sum
1

repo: coinbase/coinbase-wallet-sdk


text:
docs(fix): Correct endpoint.dataExpiryLength in getting started

Typo before

Codecov Report

Merging #1698 (b2d37f9) into master (ccc2cf2) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1698   +/-   ##
=======================================
  Coverage   98.61%   98.61%
=======================================
  Files         102      102
  Lines        1874     1874
  Branches      375      375
=======================================
  Hits         1848     1848
  Misses         11       11
  Partials       15       15

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 ccc2cf2...b2d37f9. Read the comment docs.

authors: codecov-commenter ntucker

repo: coinbase/rest-hooks


text:
Other packages cannot be found from within package

This works:
cd /ws
colcon build --packages-select robotA

Using workspace root /ws
Starting >>> robotA
This does not work:
cd /ws/src/robotB/include
colcon build --packages-select robotA

Using workspace root /ws
[1.336s] WARNING:colcon.colcon_core.package_selection:ignoring unknown package 'robotA' in --packages-select
I suspect the find is done before the directory switching or something.

Have you built at least one package in the workspace to create the build directory prior to trying to build from the subdirectory?

Ye, the complete workspace is build actually.

You're using the implementation proposal from here: https://github.com/rhaschke/colcon-top-level-workspace/
You should file your issue there.

Apologies, wasn't aware but you are right!

@Timple, as you didn't open a new issue: The answer to your question is in the docs (README.md):

Package discovery is done relative to the current working directory. Thus, to build all packages in the current folder, just run colcon build.
To build all packages in the workspace, specify the special token ROOT for the --base-paths argument: colcon build --base-paths ROOT.

authors: Timple cottsay rhaschke

repo: colcon/colcon-top-level-workspace


text:
feat: added support for xAI Grok Beta

Added support for xAI Grok Beta for both directly using xAIs OpenAI API and the OpenRouter.
Addresses #48

Awesome, nice work @milutinke!!


text:
Generate zod schema code from schema already defined

Hello there!!
My use case is pretty specific. I wont to use drizzle-orm and drizzle-zod to generate insert schemas. I would like to use the schema in the server side and the client side.
The problem is that if I import the zod schema definition from the client side I get all the database dependencies.
import { pgTable, text, timestamp, uuid } from 'drizzle-orm/pg-core'
import { createInsertSchema } from 'drizzle-zod'

const usersTable = pgTable('users', {
    id: uuid('id').primaryKey().defaultRandom(),
    createdAt: timestamp('created_at').notNull().defaultNow(),
    email: text('email').notNull().unique(),
})

const insertUserSchema = createInsertSchema(usersTable, {
    id: (schema) => schema.id.uuid()
})

const insertUserCommandSchema = insertUserSchema.pick({ email: true })

If I try to import the insertUserCommandSchema to perform client-side validations I am getting all the server side stuff. That make sense.
Is it possible to generate the zod schema definition code from insertUserCommandSchema? Is there any tool that can achieve this?
Thanks in advance!!

Well... never mind https://github.com/drizzle-team/drizzle-orm/issues/941

repo: colinhacks/zod


text:
Set up gemnasium

Thanks for creating an issue! Please fill out this form so we can be sure to have all the information we need, and to minimize back and forth.

What are we trying to do?
Set up gemnasium to monitor dependency vulnerabilities

What feature or behavior is this required for?
~ security ~

Tagging in @DarthHater - can you handle?

Come to think of it, DCAF proper should have the creds here, and we should see if we can set up some secondary emails. I'll set up account stuff.

@DarthHater - regged a DCAF account and invited you. Let me know if you hit a roadblock!

Tagging in. I believe I need some elevated permissions on the DCAF org on gh and maybe even on this repo to get it setup. Expect emails.

authors: DarthHater colinxfleming


text:
Make search cast a wider net

Right now, our search code casts a pretty strict net, requiring someone to enter in exactly what's in database to retrieve a record.
Here are a few ways I'd like to loosen it before release:

Make it hyphen agnostic (e.g. when searching for '111-222-3333', it'll find the record if '1112223333' is entered into the form too
Make it case insensitive (e.g. 'susie everyteen' will return the record for Susie Everyteen)

This code lives in app/models/patient.rb

Tagging in @katsdc !

may try to take a stab at this unless others are working on it

Sorry I should have commented, but I am working on this!

Hey @KatSDC, wanted to check in on this -- going okay? Anything I can help with/

@colinxfleming Yes actually I encountered another error once I upgraded Rails that was resolved by also altering the output of the array with the to_s method. So I'm happy to resubmit with the clearer name. Additionally, I was able to resolve the order of the changelog for issue #403. Would you like me to submit that along with the updates to the patient model? Or should I save that for a different pull request?

authors: KatSDC colinxfleming sco-bo


text:
added a namespace.yaml file

I've added a namespace.yaml file

Thanks for contributing.

authors: anshuhtwt collabnix

repo: collabnix/kubelabs


text:
Deprecation warning generated on Rails 3.2rc2

The following deprecation warning is being generated when used with Rails 3.2rc2
DEPRECATION WARNING: Calling set_table_name is deprecated. Please use `self.table_name = 'the_name'` instead. (called from <top (required)> at <snip>

Fixed with #9.

authors: asanghi bryckbost


text:
Activation Protocol and Layer struct

Starts encapsulating Layer logic in a dedicated struct.
This could lead to an easier way for scaling the number of layers.
Uses some explicit pointers logic in order to reduce array copying.
This logic should remain limited to private logic.

I'll go ahead and make this merge.  I still need to go through the code in more detail, but everything seems to work okay so it should be safe for now (normally I'd do more testing before merging, but my time is limited this week so I'll let everybody else look it over too).  I'd just like to make one request, based on what I've seen so far:  @perlfly will you please include detailed documentation in the code?  This includes official 'documentation' for all functions and properties, as well as comments explaining each step in the calculations.  This will help all of us to better understand the logic and debug any issues that might come up.  It looks like some of the methods are already documented, so if you could keep expanding that, that would be great.  Thanks!
I like this direction for managing multiple layers - it should allow us to add support for many hidden layers without too much difficulty.

Hi @collinhundley my FFNN_Prop was intended as a proposal that needs further work. Since it changes a lot the FFNN design. Appreciate you like the directions. Now it makes sense going along with it.
I'd recommend a dedicated branch, say FFNN_Dev or sorting like that, where contributors can share changes to the FFNN before it is completed. This without braking into the master branch.
Once FFNN_Dev is more tested an documented, you could marge it into master.

I agree with @perlfly. If we're working on major features there should be different branches.

Now that Christmas is over, I've had a little time to sit down and look at the changes. @perlfly is right about needing another branch, so I created a new branch called FFNN_Deep_Dev. This is where we'll work on the feed-forward neural network until it fully supports multiple hidden layers, at which point I'll merge it back up to master.
I'm happy with the way this neural network is coming along - it works very well compared to most of the other neural nets I've used!  Adding support for multiple hidden layers will be a nice improvement, as well as finishing Softmax and improving the learning algorithm.  Eventually I'd like to improve the train() method to be a little more intuitive, and allow it to adjust learningRate and momentumFactor on the fly.  Adjusting those values based on the network's learning progress can really help it converge on a better solution, in my experience.
Due to the vanishing gradient issue, it's not likely that anybody will use FFNN for extremely deep learning.  I'd suspect that 3 hidden layers is probably the max before it starts to lose effectiveness. So although we'll continue our efforts to support multiple hidden layers (because they can be useful), soon I would like to start building a Convolutional Neural Network, with support for deeper learning.  That way, we can keep FFNN fairly lightweight and ideal for fast, simple applications, and gear CNN toward larger, more difficult tasks (computer vision, voice recognition, etc).  Eventually a Recurrent Neural Network will also find its way into Swift AI, but I don't want to worry about that quite yet.  Thoughts?

authors: KacheFlowe collinhundley perlfly

repo: collinhundley/Swift-AI


text:
Error: resolution failed for 1 modules. Although COURSIER_REPOSITORIES is set.

Hello, first of all thanks for the hard work that the team behind mill is putting on the tool. I wanted to check mill today by creating a small hello world program, but I'm getting the following error after running mill App:
[2/46] mill.scalalib.ZincWorkerModule.classpath
1 targets failed
mill.scalalib.ZincWorkerModule.classpath
Resolution failed for 1 modules:
--------------------------------------------
  com.lihaoyi:mill-scalalib-worker_2.13:0.11.0-M0
	download error: Caught java.net.ConnectException (Connection refused (Connection refused)) while downloading https://packages.corp.com/artifactory/maven/com/lihaoyi/mill-scalalib-worker_2.13/0.11.0-M0/mill-scalalib-worker_2.13-0.11.0-M0.pom

After investigation I found this in the documentation: https://mill-build.com/mill/Scala_Module_Config.html#_maven_central_blocked.
However, although I'm setting the COURSIER_REPOSITORIES variable the command's output is still the same. Any idea of what I'm doing wrong? I kindly ask for suggestions. Thanks in advance :-)

The URL in the error message (https://packages.corp.com/artifactory/maven/...) looks like it's already referring to your configured repository, so it seems you were successful with the setup, but your repository is refusing the connection. Is the URL correct? Have you tried to fetch the URL with another tool like curl?

As a quick update here @lefou, by using millw instead of mill, I was able to compile my program.
~/p/milldemo λ ::->  ./millw helloworld  --mill-version 0.11.4 --disable-ticker version
No mill version specified.
You should provide a version via '.mill-version' file or --mill-version option.
Using mill version 0.11.5
[48/48] helloworld.run
Hello World

@luisvgs Thanks for this update. This is very helpful for other. The in-repo mill script has no guaranteed support for older Mill versions. This is one of the reasons millw exists and is maintained outside of this repo, and why we recommend it in the installation docs.

authors: lefou luisvgs

repo: com-lihaoyi/mill


text:
[WIP] Improve overriden target detection to let it handle stackable-traits-style overrides

Fixes https://github.com/com-lihaoyi/mill/issues/554
This PR swaps out our detection of overriden targets and commands:

Previously, we tried to count how many overriden methods there are upstream of a particular target, statically at its definition site. Any target that has the max number of overriden methods is considered the "final" one, while others are considered overriden. This fails for stackable traits, e.g. the example in the test suite below, as multiple traits can have the same number of static definiton-site overrides but when stacked together on a module one of them ends up winning

Now, we simply do a reverse walk of the targets list after they have been topo sorted. Since the directionality of overrides is exactly opposite that of the topo sort, we can assume that the first time we see a target of a particular label in the reverse walk it's the "final" one, while any subsequent targets we see with the same label must be the overriden versions

The new mechanism is simpler, and possibly more correct. Hopefully CI would catch any issues...
Added a test case that fails on master and passes on this PR. Also verified manually that the issue reported above can be reproduced on master, and does not reproduce (i.e. it behaves correctly) on this PR.

I love that we get rid of the overrides parameter! I always avoided to understand it fully, haha.

@lefou looks like the bootstrap tests are failing due to some external plugins. Not sure what your SOP for dealing with these is, but IMO for plugins Mill's own build depends on we should just keep them in the mill repo's contrib folder to simplify this sort of change

Bootstrap tests are special and can break when we change some API of Mill. Although you see it fail because of plugins, this issue can also happen when we don't depend on external plugins, but instead use some API that has changed directly. (I remember we had that issue in the past, e.g. when we changed some publishing API.) Our CI now applies a patch file before it runs bootstrap tests, it's ci/mill-bootstrap.patch and currently empty. That way, we can customize the build.sc or other files before we bootstrap.
I don't think we should deny ourselves to use external plugins, just because we want to run some bootstrap tests. Instead, we can adapt the build (and ad-hoc disable plugins) to run the bootstrap tests.

I can prepare a patch file and push it to your branch later

authors: lefou lihaoyi


text:
Make java home configurable per-module

This PR aims to address https://github.com/com-lihaoyi/mill/issues/3480.
Changes:

adds coursier-jvm as a dependency to the util module, this library is for fetching JVMs using coursier and the coursier jvm-index
add a def JavaHome: Task[Option[PathRef]] task to ZincWorkerModule. This defaults to None, which is the existing behavior of using mill's java home.
add ZincWorkerModule.ForJvm dynamic cross module. This fetches the coursier jvm-index and populates the list of zinc worker modules based on that. This allows you to fetch a different Jvm and create a ZincWorkerModule e.g. ZincWorkerModule.ForJvm("temurin:1.11.0.24"). This uses coursier to fetch and cache the jvm and the jvm-index
updates the mockito and commons-io examples to use the new configuration options. Now these examples should run even when mill itself is not running on java 11.

This also required adding -encoding utf-8 to the projects' javac options.

update the JmhModule.generateBenchmarkSources task to not set jvmArgs = javacOpts. Since we now need the -encoding argument and that is not a valid jvm argument. The old behavior seems like a bug to me?
update the run and test tasks to use the zincWorker's java home if a different one specified

A few things I'm not sure about:

the ZincWorkerModule.ForJvm dynamic cross module will try to fetch the jvm-index on initialization. is this OK?
the tests will now fetch Jvms using coursier. maybe this is a bit too much to run tests? I'm not sure now to mock this out though/what the best way to test these changes are.

I think I'm running into the same issue as this https://github.com/sbt/sbt-assembly/issues/496. coursier-jvm pulls in shapless which has the problematic class. not sure what the correct fix is but I can think of a few options

add export LC_ALL=C.UTF-8 to the workflow as mentioned in the issue
since we might not want shapeless as a dependency anyway, reimplement the parts of coursier-jvm that we need. I don't think this should be too hard, since coursier already has all the fetching and caching logic

At a first skim this looks great. I didnt know coursier could fetch JVMs or that it was so easy to integrate
Is it possible to configure a module to point it at a JVM not listed in coursier's index? I imagine there would be some use cases for that
The cross module stuff is lazily initialized then cached, so it should be OK to perform heavy downloads and initialization, but is it possible to move the download into a task? That would help benefit from parallelization and log handling and error reporting and all that
@alexarchambault should probably review this as well, since he knows more about coursier than i do

Is it possible to configure a module to point it at a JVM not listed in coursier's index? I imagine there would be some use cases for that

yes this is possible. I added def javaHome: Task[Option[PathRef]] task to the base ZincWorkerModule trait that can be overridden to set the JVM to an arbitrary path. we could also expose a configuration option to change the url we fetch the index from or make the in-memory JvmIndex mapping a configuration option. I'm not sure how many knobs should be exposed though, so I just added the one javaHome option.

The cross module stuff is lazily initialized then cached, so it should be OK to perform heavy downloads and initialization, but is it possible to move the download into a task? That would help benefit from parallelization and log handling and error reporting and all that

How do you make the cross value for a cross module the output of a task? I'm not sure how, since it needs to be invoked outside of a Task { ... } block

Ah I see, you mean the index itself, and not the JVMs that the index references.
I think what we should do here is avoid using a Cross module to list out the various ZincWorkerModule.ForJvms, and instead just make it something that the user has to instantiate in their build. Something like:
object myZincWorker = new ZincWorkerModule.ForJvm("graalvm-community:23.0.0")
object core extends JavaModule {
  override def zincWorker = ModuleRef(myZincWorker)
  object test extends JavaTests with TestModule.Junit4
}

That is a tiny bit more boilerplate in the build file, but avoids the need for Mill to know about the contents of the coursier index entirely, and avoids having a huge cross module inside ZincWorkerModule that is mostly unused.
We still want to provide a way to download the index and list out its entries for debugging purposes, but that can be a normal task or command since it won't change the shape of the moduletree/taskgraph

@alexarchambault one question about https://github.com/coursier/jvm-index: do we offer any guarantees on that? e.g. does Coursier need to fetch it from Github every time? I'm concerned about having an operational dependency here, e.g. I don't want people's Mill builds to start failing if Github has an outage.
To avoid a dependency on Github, maybe we can publish the index to maven central somewhere, since that's already a piece of infrastructure we are bound to? Or we can bundle snapshots of it with Mill when we make releases

It used to be pushed to Maven Central too, some time ago. This can always be re-instated (https://github.com/coursier/jvm-index/issues/277).

Come to think of it, if the index is bundled with Mill, then having it used to initialize the Cross module becomes not an issue at all

It's up to you, but beware that it's getting more and more heavyweight (~1.8 MB uncompressed, 110 kB gzipped)

@albertpchen It looks like you inlined quite some code from coursier-jvm. Is it because of the shapeless issue you mentioned? It seems it's pulled by coursier-jvm by mistake (or not to break bin compat, I don't recall). You can safely exclude it manually when you pull it in Mill.

@alexarchambault I think 110kb is fine to bundle, the other issue is that it would fall stale relatively wuickly as new versions are added
I glanced through the indices, and it seems like a lot of the download paths are computed based on the artifact version. Could the logic to compute these be bundled into Mill, rather than bundling the generated JSON? That would have the effect that new versions of known distirbutions would automatically be supported, and we would only need to make a new release if new distributions are added or the URL pattern for a distribution changes (both of which should be much rarer than existing distirbutions adding new versions)

I glanced through the indices, and it seems like a lot of the download paths are computed based on the artifact version

Somehow, except there are often subtleties. In https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7+7/OpenJDK17U-jdk_x64_mac_hotspot_17.0.7_7.tar.gz, 17.0.7+7 is the "build" version, and it ends up as both 17.0.7+7 and 17.0.7_7 in the URL.

I glanced through the indices, and it seems like a lot of the download paths are computed based on the artifact version

Somehow, except there are often subtleties. In https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7+7/OpenJDK17U-jdk_x64_mac_hotspot_17.0.7_7.tar.gz for example, 17.0.7+7 is the "build" version, and it ends up as both 17.0.7+7 and 17.0.7_7 in the URL.

Yes, but that is accounted for by the Scala code in coursier/jvm-index right? So if we bundle the few kb of classfiles we get all these special cases included, as well as support for any future versions (unless they add additional special cases)

Yes, but that is accounted for by the Scala code in coursier/jvm-index right?

What do you mean? Right now, the index basically look like this:
$ cat "$(cs get https://github.com/coursier/jvm-index/raw/master/index.json)" | jq '.darwin.amd64["jdk@temurin"]'
…
  "1.17": "tgz+https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17%2B35/OpenJDK17-jdk_x64_mac_hotspot_17_35.tar.gz",
  "1.17.0.1": "tgz+https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.1%2B12/OpenJDK17U-jdk_x64_mac_hotspot_17.0.1_12.tar.gz",
  "1.17.0.10": "tgz+https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.10%2B7/OpenJDK17U-jdk_x64_mac_hotspot_17.0.10_7.tar.gz",
  "1.17.0.11": "tgz+https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jdk_x64_mac_hotspot_17.0.11_9.tar.gz",
  "1.17.0.12": "tgz+https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.12%2B7/OpenJDK17U-jdk_x64_mac_hotspot_17.0.12_7.tar.gz",
…

There's some logic in the coursier-jvm module, so that the 1. is ignored, and versions such as just 17 actually match the highest 17.x version… if there's no exact match (there's one here, but 17.0 will actually match the highest 17.0.x version)

But we can probably "compress" that a bit, with a pattern and "build" version listings (in the snippet above, 17+35, 17.0.1+12, etc., rather than 17, 17.0.1, etc.) and allow users to pass newer build versions if they'd like. But these build versions don't look handy…

@alexarchambault i mean the scala code in https://github.com/coursier/jvm-index/tree/master/src; isnt that what generates the json?

i mean the scala code in https://github.com/coursier/jvm-index/tree/master/src; isnt that what generates the json?

It does, yeah

Could that coxe be bundled with Mill to generate the download URL from a jdk version  that gets dynamically passed in? I see some parts of it are passing github tokens around, but its unclear to me how much of the logic needs to talk to github vs how much is just mangling strings locally

@albertpchen It looks like you inlined quite some code from coursier-jvm. Is it because of the shapeless issue you mentioned? It seems it's pulled by coursier-jvm by mistake (or not to break bin compat, I don't recall). You can safely exclude it manually when you pull it in Mill.

yeah thanks for the tip. I've updated the PR

So I looked up how Gradle does this, and it appears they depend on the Adoptium service API https://api.adoptium.net/. I'm reluctant to have an additional service dependency from Mill, because it means that we need to start worrying about rate limiting, uptime, SLAs, outages, etc.. "Pull from latest master on Github" also definitely counts as "service dependency", because a Github outage or someone fat-fingering a bad push would then be able to cause an outage in Mill users.

@alexarchambault can we re-enable publishing stable versions of coursier/jvm-index to maven central? That would give us an immutable artifact to depend on and provide stronger guarantees than pulling stuff directly off of github, improving hermeticity/reproducibility reducing the blast radius if anything goes wrong (github down, someone fat-fingers a push, etc.). We pay a price of staleness, but I think that's a tradeoff that's worth it.

Once that's done, we move this PR's runtime dependency to maven central instead of github/jvm-index master, and we can merge this and close out the bounty.

We can have a longer-term follow up discussion of how to reduce the staleness issue. I have some ideas, e.g. breaking up the JVM index into separate sonatype artifacts per-version, so that newer artifact version-numbers/download-urls can be added piecemeal and be picked up by Mill/Coursier without having to re-publish the whole index and bump the index version in Mill. But that can be done later and shouldn't block the merging of this PR

thanks @alexarchambault!

Right now, the coursier/jvm-index code recomputes the whole index every time it runs (it doesn't use previously computed indices). But maybe we could add a way to make it get just new entries for specific JVMs, and that could be used by Mill (and other coursier-jvm users too) 🤔
Plus that would probably need less GitHub API requests, so that a GitHub token would probably not be needed.

Yeah that sounds like it should be doable: we probably still want a way to do a clean build, but if we can isolate the incremental portion of the logic sufficiently, we can ship snapshot+incremental-logic with Mill and it will be able to extrapolate for new JVM versions using the same logic a clean build would do. That would ensure the logic doesn't fall out of sync, and remains consistent and easy to maintain

One thing to note though: even if we get the index from Maven Central, the JVMs themselves often get downloaded from GitHub (for Temuring and GraalVM at least)

@albertpchen coursier 2.1.15, with support for the new indices (https://github.com/coursier/jvm-index/pull/297, https://github.com/coursier/coursier/pull/3127, https://github.com/coursier/coursier/pull/3128), is out.
Something like this should allow to load new indices:
JvmIndex.load(
  cache = FileCache(), // the coursier.cache.Cache instance to use
  repositories = Resolve().repositories, // repositories to use
  indexChannel = JvmChannel.central(), // use new indices published to Maven Central
  os = None, // use defaults
  arch = None // use defaults
)

@alexarchambault thanks! I've updated to use the new indices.
@lihaoyi I added three new main methods to scalalib: DiscoverTestsMain, GetTestsTasksMain, and DiscoverMainClassesMain. We need to load compiled class files to discover main and test classes, but since we aren't using the same jvm as mill, they might have an incompatible class file version. So I've changed those tasks to fork a process to call these main methods when we are using a different jvm.

@albertpchen thanks for your patience, will take a look!

@albertpchen @alexarchambault perhaps questions for both of you:

What happens for partially qualified names? e.g. I know what "temurin:11.0.24" is, but what about "temurin:11.0" or "temurin:11"? Do they pick the most recent 11.x.y, or oldest 11.x.y, or most-recent-at-time-of-coursier-index-update 11.x.y, or most-recent-at-time-of-coursier-index-update-when-mill-was-published 11.x.y?

Is there a way to list out possible versions to use?

If there is a downloadable JVM somewhere on the internet that isn't in the coursier JVM index, how do I use that?

@alexarchambault you should probably take a pass at reviewing this as well since you are the most familiar with Coursier and are also familiar with Mill

What happens for partially qualified names? e.g. I know what "temurin:11.0.24" is, but what about "temurin:11.0" or "temurin:11"? Do they pick the most recent 11.x.y, or oldest 11.x.y, or most-recent-at-time-of-coursier-index-update 11.x.y, or most-recent-at-time-of-coursier-index-update-when-mill-was-published 11.x.y?

I think I didn't document that 🤔 This looks first for the most recent unpacked on disk 11.x.y (which may or may not be the highest in the index in cache). If there's none, coursier-jvm tries to download and unpack the highest 11.x.y in the index. This can be changed via the API: ensuring javaHome.update is true (via javaHome.withUpdate(true)) makes coursier-jvm use the highest 11.x.y in the index (downloading and unpacking it if necessary).
The index itself is obtained via the coursier cache. This follows a TTL, so that the index may not be the latest at this time (but it shouldn't be more than TTL-old). If the index is older than TTL, coursier-jvm tries to update the index (so it gets most up-to-date then).

2. Is there a way to list out possible versions to use?

On the command-line, yes, with cs java --available --jvm-index cs-central
Via the API, JvmIndex#available() allows to list available JVMs.

3. If there is a downloadable JVM somewhere on the internet that isn't in the coursier JVM index, how do I use that?

URLs of JVM archives are accepted as JVM ids, instead of temurin:21 say

Got it. I think as next steps:

@alexarchambault we need a documentation page for how the JVM indices work:

what Maven Central org they're under,
how they use maven-metadata.xml,
how to use an explicit JDK index version,
what the SLA is in terms of freshness, etc.

@albertpchen:

We should pin the JDK index version by default to ensure reproducibility and make "download latest index" an opt-in flag/override
We should expose JvmIndex#available() as a Mill task show availableJvms or something and document it for people to use so they can discover what JVMs they can use
We should show an example of using a full JVM download URL as the JVM version, in addition to the current examples of using the name:version string and local filesystem path
We should link to @alexarchambault 's documentation page from our example docs

Took a pass at cleaning up the PR, I think it's in pretty good state now. @alexarchambault and @lefou can take another review pass.
One existing limitation is that setting the JVM version does not apply to Scala module compilation, as AFAICT Zinc does not support setting the javaHome for compiling Scala https://github.com/sbt/zinc/discussions/1498. We may need to manually fork and manage our own JVM subprocesses to make that work, which I think we can leave to a follow up

Thanks for your contribution @albertpchen! I'll pay out half the bounty for this PR since we split the work, email me your international bank transfer details to haoyi.sg@gmail.com and I will transfer the funds

@lihaoyi sorry about the slow responses, and thanks for finishing up this PR for me! I think coursier-jvm is doing a lot of the heavy lifting here, so if you'd like to give the bounty to @alexarchambault that's fine with me.

@albertpchen no worries! If you don't want to take the bounty, I'll pass it to the Scala Center to support their good work

authors: albertpchen alexarchambault lihaoyi