Implements better way to do function inverses

For example, the following could be turned into one method just by having an "inverse' parameter.
The existing two methods:
# Newtons to Dynes (dyn)
def n_to_dyn(n):
    return n * 10 ^ 5

# Dynes to Newtons (n)
def dyn_to_n(dyn):
    return dyn * 0.00001  # Precision of 5 significant digits

could be turned into one:
# Newtons (N) and Dynes (dyn)
# Decimal value, boolean inverse
def n_dyn(value, inverse):
    if inverse:
        return value / (10 ^ 5)

    return value * 10 ^ 5

This would require a rewrite of the method selection function that would allow it to select the function that has both the units_from and units_to in the name, and then decide if it's units_from_units_to , in which case inverse should be false, or if not then inverse should be set to true. Implementing this will require a bunch of changes to multiple files.

Even better, the conversion factor could probably be selected from an array, and then we could just use one method for most, if not all of the conversions.

I have not the exact code in my mind and sitting not on my laptop but maybe it should be possible to give that function two optional params (via reflection and the UNITS array) named n and dyn and with this the code could 'inject' one of the given param into the function.
There we could only check against None and decide which conversion to make.

Can i work on this ??

@shin-migami Go for it! Definitely interested to see the different ways we could go about doing this.

As the commit comments indicate my solution is ready as a pull request (#31)
@shin-migami : Please keep implementing would love to see your solution


Add association button appearing multiple times

Hi @nathanvda great work on the gem.
When I'm using it on an edit form as opposed to a new form, I get multiple "Add association" buttons. How would you suggest the best way of getting around this is?
Code: https://gist.github.com/askl56/449956e303c8429431fa9078361419cc
SS: https://www.dropbox.com/s/bye5zbns8f57wts/Screenshot 2016-07-23 20.05.33.png?dl=0
Cheers man,
//askl56

I've temporarily fixed with:
$(function() {
  $('.edit_associated_products .edit-add:not(:last)').remove();
});

but would welcome feedback on if this is the right solution

You place the link_to_add_association inside the fields_for loop, which results in a "add button" for each nested item. Generally, if you want only one "add" button, you place it outside this loop (as demonstrated in my examples).
Your code is not cleanly formatted at all which does not help with readability, for me that is good reason to use haml. But I am guessing you are not used to haml, so check out the ERB examples.

Problem is that when I move it outwith the fields_for loop it no longer follows the right route


Fix Overflow error for delete

Codecov Report

Merging #268 into master will decrease coverage by 1.71%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##             master     #268      +/-   ##
============================================
- Coverage     39.25%   37.53%   -1.72%
- Complexity      331      339       +8
============================================
  Files           105      109       +4
  Lines          1819     1934     +115
  Branches        153      170      +17
============================================
+ Hits            714      726      +12
- Misses         1056     1157     +101
- Partials         49       51       +2

Impacted Files
Coverage Δ
Complexity Δ

...in/java/seedu/address/commons/util/StringUtil.java
62.06% <0.00%> (-32.67%)
7.00 <0.00> (ø)

...in/java/seedu/address/logic/parser/ParserUtil.java
18.75% <0.00%> (-11.87%)
7.00 <1.00> (+1.00)
:arrow_down:

...in/java/seedu/address/model/expenditure/Price.java
58.33% <0.00%> (-11.67%)
5.00% <0.00%> (ø%)

...rc/main/java/seedu/address/model/ModelManager.java
49.04% <0.00%> (-6.36%)
30.00% <0.00%> (ø%)

...ain/java/seedu/address/model/budget/Threshold.java
40.00% <0.00%> (-6.16%)
3.00% <0.00%> (ø%)

...in/java/seedu/address/model/budget/BudgetList.java
71.42% <0.00%> (-3.04%)
15.00% <0.00%> (ø%)

...c/main/java/seedu/address/model/budget/Budget.java
77.27% <0.00%> (-2.73%)
23.00% <0.00%> (ø%)

src/main/java/seedu/address/MainApp.java
0.00% <0.00%> (ø)
0.00% <0.00%> (ø%)

src/main/java/seedu/address/model/Nusave.java
62.16% <0.00%> (ø)
19.00% <0.00%> (ø%)

... and 16 more

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 9438311...f6259cb. Read the comment docs.


Firebase Analytics plugin does not properly report all types of route changes

If you replace or remove the current route, I would expect it to be reported by FirebaseAnalyticsObserver; however, that class does not observer didRemove nor didReplace.

@alanrussian
This issue has been moved to https://github.com/FirebaseExtended/flutterfire/issues/716. Any further collaboration will be done there.


Advantage macros affect actors rather than tokens

The add, clear and reduce macros are updating the advantage on the actor rather than the token. Where multiple tokens are created from (and therefore share) the same actor, they are equally affected by the advantage change, even when Link Actor Data is not selected on the token.

The current actor-based behaviour is fine when you only have a single token for an actor (such as with PCs or main NPCs).
If you drag actors direct from a compendium (eg, Bestiary), that generates additional (unique) actor-tokens, and also avoids the issue. It's a workaround, but it does mean you end up with multiple copies of the compendium entry in your actor list.

To fix this

[ ] change the macro to affect the token's advantage rather than the related actor data

This needs tidying and reincorporating to take account of linked tokens, but should work:
let tokenData = canvas.tokens.controlled[0].data
let newStatus = Number(0)
// Get max based on base actor
// Check if unlinked
if (tokenData.actorData.data !== undefined) {
   newStatus = Number(tokenData.actorData.data.status.advantage.value)+1
   token.update({"actorData.data.status.advantage.value": Number(newStatus)});
} else {
   token.update({"actorData.data.status.advantage.value" : newStatus})
   return;
}


Description field is broken

Notepad++: v8.1.4
NppGist: v<IP_ADDRESS>
The description area covers the entire right section as seen in the image below and I cannot access some buttons for this reason.

Could you describe the sequence of actions to reproduce this issue? Do resize anchors work?

Quite strange. Could you describe the sequence of actions to reproduce this issue? Do resize anchors work?

Resizing anchors did not fix the issue. The issue occurs when I open the NppGist window, nothing special.

I opened the project with Visual Studio and check the design from the source code, the same issue also exists when in Visual Studio. Buttons are located out of the form view. I can easily solve the issue by drag buttons to the form view. I can open a PR for this but what do you think?
Also, I have a question, how can I update a Gist content with NppGist? There is no button for update Gist in the toolbar or anywhere. I share a picture below to show how my toolbar looks like.

I opened the project with Visual Studio and check the design from the source code, the same issue also exists when in Visual Studio. Buttons are located out of the form view. I can easily solve the issue by drag buttons to the form view. I can open a PR for this but what do you think?

It's strange because they are located fine for me. I'll try to view it on a monitor with another resolution. But PR is also welcome.

Also, I have a question, how can I update a Gist content with NppGist? There is no button for update Gist in the toolbar or anywhere.

Sure you can. I merged both forms into a single one in 1.5.0. Save button is available there.

I share a picture below to show how my toolbar looks like.

Hmm, it looks like there is also something wrong with the icon. I don't have artifacts with displaying:

I have a similar issue as OP. Using NPP 8.6, NppGist <IP_ADDRESS> and Windows 11.

Any updates about this? Still having the issue. My screen resolution is 1366x768.

No. If you want, you can try to figure out the problem by yourself and suggest a PR.


Crashes on these points

> var qh = require('quickhull3d');
> var pts =
[ [ 38, 89, 0 ],
  [ 85, 91, 0 ],
  [ 94, 89, 0 ],
  [ 70, 40, 0 ],
  [ 63, 90, 0 ],
  [ 60, 52, 0 ],
  [ 20, 16, 0 ],
  [ 38, 13, 0 ],
  [ 25, 82, 0 ],
  [ 7, 80, 0 ],
  [ 28, 80, 0 ],
  [ 43, 64, 0 ],
  [ 48, 68, 0 ],
  [ 86, 64, 0 ],
  [ 52, 60, 0 ],
  [ 56, 75, 0 ],
  [ 47, 3, 0 ],
  [ 68, 13, 0 ],
  [ 50, 44, 0 ],
  [ 82, 54, 0 ],
  [ 96, 45, 0 ],
  [ 85, 1, 0 ],
  [ 30, 24, 0 ],
  [ 54, 3, 0 ],
  [ 65, 95, 0 ],
  [ 95, 7, 0 ],
  [ 97, 42, 0 ],
  [ 44, 73, 0 ],
  [ 79, 55, 0 ],
  [ 72, 34, 0 ],
  [ 8, 18, 0 ],
  [ 79, 46, 0 ],
  [ 92, 32, 0 ],
  [ 61, 29, 0 ],
  [ 21, 7, 0 ],
  [ 24, 25, 0 ],
  [ 41, 32, 0 ],
  [ 72, 91, 0 ],
  [ 1, 63, 0 ],
  [ 18, 8, 0 ],
  [ 44, 99, 0 ],
  [ 59, 90, 0 ],
  [ 12, 15, 0 ],
  [ 81, 60, 0 ],
  [ 21, 10, 0 ],
  [ 9, 71, 0 ],
  [ 12, 86, 0 ],
  [ 99, 41, 0 ],
  [ 32, 48, 0 ],
  [ 40, 20, 0 ],
  [ 47, 89, 0 ],
  [ 41, 9, 0 ],
  [ 29, 80, 0 ],
  [ 56, 63, 0 ],
  [ 36, 11, 0 ],
  [ 25, 14, 0 ],
  [ 44, 40, 0 ],
  [ 60, 41, 0 ],
  [ 32, 81, 0 ],
  [ 64, 56, 0 ],
  [ 41, 90, 0 ],
  [ 29, 73, 0 ],
  [ 68, 97, 0 ],
  [ 91, 90, 0 ],
  [ 57, 0, 0 ],
  [ 67, 34, 0 ],
  [ 64, 8, 0 ],
  [ 66, 65, 0 ],
  [ 39, 90, 0 ],
  [ 72, 62, 0 ],
  [ 63, 13, 0 ],
  [ 45, 94, 0 ],
  [ 2, 34, 0 ] ];
> qh(pts);
TypeError: Cannot read property 'point' of undefined
    at QuickHull.createInitialSimplex (/tmp/node-v6.11.1-linux-x64/qhull3/node_modules/quickhull3d/dist/QuickHull.js:398:32)
    at QuickHull.build (/tmp/node-v6.11.1-linux-x64/qhull3/node_modules/quickhull3d/dist/QuickHull.js:835:12)
    at runner (/tmp/node-v6.11.1-linux-x64/qhull3/node_modules/quickhull3d/dist/index.js:18:12)
    at repl:1:1
    at sigintHandlersWrap (vm.js:22:35)
    at sigintHandlersWrap (vm.js:73:12)
    at ContextifyScript.Script.runInThisContext (vm.js:21:12)
    at REPLServer.defaultEval (repl.js:340:29)
    at bound (domain.js:280:14)
    at REPLServer.runBound [as eval] (domain.js:293:12)

Thanks for the report! For a degenerate case where the input belongs to a plane the program couldn't find a point with distance > 0, the solution was to set the minimal distance allowed to be >= 0
fixed in v2.0.1


[macOS] Rework Xamarin documentation

Description
We've improved the documentation for Xamarin by adding the table containing Xamarin bundles and associated symlinks.

Related issue:
Add information about default Xamarin / Mono to MacOS image documentation #1929
Check list

[x] Related issue / work item is attached
[x] Documentation is updated (if applicable)
[ ] Changes are tested and related VM images are successfully generated

Looks like the table contains inaccurate information. For e.g:
                "symlink": "6_4_1",
                "mono": "6.4",
                "ios": "13.4",
                "mac": "6.4",
                "android": "10.0"

Looks like the table contains inaccurate information. For e.g:
                "symlink": "6_4_1",
                "mono": "6.4",
                "ios": "13.4",
                "mac": "6.4",
                "android": "10.0"

This table was for an example, the data in it was entered manually and randomly. I've updated it


for the gitRepo can we support both public key and private key

If we want the repo to be accessible via SSH and using flux, we need to satisfy the following secret spec. Note the part on SSH credentials.
apiVersion: v1
kind: Secret
metadata:
  name: my-repository-creds
  namespace: default
data:
  # HTTP/S basic auth credentials
  username: <base64 encoded username>
  password: <base64 encoded password>
  # SSH credentials
  identity: <base64 encoded private key>
  identity.pub: <base64 public key>
  known_hosts: <base64 encoded known_hosts>

We will also need to support known_hosts as well. In case only private key is supplied in clouddriver, we will need to derive public key from it.


Full .NET build error after installing EntityFramework.SqlServer (Multiple assemblies with equivalent identity have been imported)

Create a console app in VS2015
Install EntityFramework.SQL Server
Build

Build error

Multiple assemblies with equivalent identity have been imported: 'C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Collections.Concurrent\v4.0_<IP_ADDRESS>__b03f5f7f11d50a3a\System.Collections.Concurrent.dll' and 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.6\Facades\System.Collections.Concurrent.dll'. Remove one of the duplicate references.	EFGetStarted.ConsoleApp	C:\Users\rowmil\Documents\GitHub\EntityFramework.Docs\docs\getting-started\traditional-dotnet\sample\EFGetStarted.ConsoleApp\CSC

Looks like we're accidentally referencing a design-time facade in our nupkg. Easy to do since it's required for DNX to build.

We should consider creating a build verification test to catch these. (or DNX should play better with NuGet & MSBuild)

Filed aspnet/dnx#2031

This appears to be fixed using the latest tools and packages.

Can you be more specific on "the latest tools and packages" please?
I believe I am seeing this with ASP.NET 5 projects + EF 6.1.3 as well, but only in the Published application scenario. (running through VS works just fine) I would like to update dependencies so that it works once published, or the repro can be reduced and actionable.

Hey,
EF6 + EF7 in the same application is not supported. You end up trying to load two different versions of assemblies with the same names (which is not supported by the CLR).
~Rowan

Im not using both. Just a dll built with 6.1.3, referenced via Nuget, in an ASP.NET 5 project.

You might have other references that are breaking your packages. What does your project.json look like

You may think that you are not trying to use both but the EntityFramework.SqlServer the title refers to is a v7 package. The SQL Server provider never had its own package in EF 6.x. For EF 6.x you just need to install the EntityFramework package and you'll get the SQL Server provider alongside the core EntityFramewotk.dll assembly.
Can you detail your repro steps?

@divega That could very well be the case, but how would it explain the differences in runtime behavior? Locally running it works just fine and it has all the new stuff installed. Publishing to a server doesn't work, and it has nothing new installed.
My steps are basically:

Create an EF 6.1.3 database first dll and publish as a Nuget package
Create an MVC6 API solution.
Validate local run. Ok
Validate publish and browse. Ok
Set up a project in the API solution to consume the Nuget package from 1.
Validate local run. Ok
Validate publish and browse. FAIL.

@davidfowl
Project that consumes the EF nuget package:
{
"version": "0.0.2-alpha",
"description": "Api.BusinessLogic",
"authors": [ "jd" ],
"tags": [ "" ],
"projectUrl": "",
"licenseUrl": "",
"dependencies": {
"DataModel": "<IP_ADDRESS>"
},
"frameworks": {
"dnx451": { }
}
}
Top level Web API project:
{
"webroot": "wwwroot",
"version": "0.0.2-alpha",
"dependencies": {
"Microsoft.AspNet.Mvc": "6.0.0-beta6",
"Microsoft.AspNet.Server.IIS": "1.0.0-beta6",
"Microsoft.AspNet.Server.WebListener": "1.0.0-beta6",
"Microsoft.AspNet.StaticFiles": "1.0.0-beta6",
"System.Net.Http": "4.0.0",

"Swashbuckle": "6.0.0-beta6",
"System.Reflection": "4.0.10-beta-22605",
"System.Xml.XPath.XmlDocument": "4.0.0-beta-22816",
"System.Reflection.TypeExtensions": "4.0.0-beta-23019",
"System.Reflection.Extensions": "4.0.0-beta-23019",

"Api.BusinessLogic": "0.0.2-alpha"

},
"commands": {
"web": "Microsoft.AspNet.Hosting --config hosting.ini"
},
"frameworks": {
"dnx451": { }
},
"exclude": [
"wwwroot",
"node_modules",
"bower_components"
],
"publishExclude": [
"node_modules",
"bower_components",
".xproj",
".user",
"**.vspscc"
]
}


Google Play Music not visible in enabled apps

I'm running official nougat on One Plus 3 and the Scrobbler says in "Android music player" apps, that "This app is not installed".

Does Google play music scribble?

Scrobble?

I will close this until further notice from OP.
Google Play Music should work, but will appear as "Android Music Player" Apps


change of docker backend

What does this PR do?
Modify docker backend for overlay2
How should this be manually tested?
Perform an installation
Is there a relevant Issue open for this?
https://trello.com/c/DPwnHNy8/971-5spike-azure-ocp-use-overlay2
Who would you like to review this?
cc: @glennswest @e-minguez

@e-minguez or @glennswest can someone do a test deploy with this?

I'll do, let me figure it out how Azure worked :D

Just saw this will test tomm
Sent from my iPhone

On 14 Sep 2017, at 4:23 AM, Ryan Cook<EMAIL_ADDRESS>wrote:
@e-minguez or @glennswest can someone do a test deploy with this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

I'm still not able to try your PR as I cannot deploy the ref. arch. due to quota limits and the all-in-one template doesn't work with ansible, so I need to test it manually... I've created a couple of cards to track it (update ansible code for all-in-one support) and some other issues I've found (update the ref. arch. doc for the new folder structure) and I've just realized that to test it I need to change the github template here so I need to clone your changes and add that one 💃


DDS: replace libsquish with bcdec, add BC4-BC7

Description
Implements support for BC4, BC5, BC6H (unsigned and signed) and BC7 GPU texture compressed formats in DDS reader (#2338).

BC4: loaded into 1 channel uint8,
BC5: loaded into 2 channel uint8,
BC6H: loaded into 3 channel half,
BC7: loaded into 4 channel uint8.

This is implemented by replacing whole of libsquish (~4700 lines of code) with bcdec.h (https://github.com/iOrange/bcdec, ~1300 lines of code). bcdec.h has an advantage of being faster, smaller and supports all BCn formats for decoding.
bcdec.h license is MIT or Unlicense (aka public domain), updated all the relevant third party / license files that I could find.
Tests
This uses just-added extended DDS test coverage (#3459) and enables previously disabled BC4..BC7 tests. The pixel value SHA1 hashes of BC1..BC3 formats do change - BC1..BC3 decoding is not specified bit-exactly anywhere, and out there in the wild there are 4 possible ways to decode it. bcdec.h decodes it slightly differently from libsquish (i.e. some color values might be 1 off in 0..255 range, sometimes). Visually I've compared the results and they are all fine.
Checklist:

[x] I have read the contribution guidelines.
[ ] If this is more extensive than a small change to existing code, I
have previously submitted a Contributor License Agreement
(individual, and if there is any way my
employers might think my programming belongs to them, then also
corporate).
[x] I have updated the documentation, if applicable.
[x] I have ensured that the change is tested somewhere in the testsuite
(adding new test cases if necessary).
[x] My code follows the prevailing code style of this project.

@aras-p  Keeping in mind that certainly within the next month, we'll branch and have a beta for the first 2.4 release, which will be the primary supported release going forward (with 2.3 becoming the legacy release family that only gets critical fixes), do you think we should also backport this to 2.3? Or just let this overhaul be a 2.4 feature?

@aras-p Keeping in mind that certainly within the next month, we'll branch and have a beta for the first 2.4 release, which will be the primary supported release going forward (with 2.3 becoming the legacy release family that only gets critical fixes), do you think we should also backport this to 2.3? Or just let this overhaul be a 2.4 feature?

No idea what's the expected backporting / multiple releases policy in OIIO :) In most places I've worked previously, a change like this would not get backported - it's technically not "a fix for something that's broken", but rather "implementing new functionality", and these by default don't get backported.

I will backport "features" on a case-by-case basis, judging risk versus user benefit, but only when it can be done without breaking backward ABI/link compatibility, and when it's unlikely to harm anybody who isn't using that particular feature. In this case, I would consider backport fairly low risk because it doesn't change any external APIs at all, and it can't possibly hurt anything other than reading DDS files specifically, which is a feature only required by a small percentage of users.
On the other hand, it also means that only a small percentage of users will benefit from the improvement, so maybe they can wait until 2.4 is released within a couple months.
Since you yourself don't need it in a release branch right now, I'll leave it for 2.4 unless somebody else requests the backport.
Thanks, Aras!


AWS EKS Image Builder breaking issue with RHEL 8.10 or cloud-init 23.x version

What happened:
AWS EKS Image Builder breaking issue with RHEL 8.10 or cloud-init 23.x version.

Error during execution :

TASK [providers : Execute cloud-init-vmware.sh] ********************************
    vsphere-iso.vsphere: fatal: [default]: FAILED! => {"changed": true, "cmd": "bash -o errexit -o pipefail /tmp/cloud-init-vmware.sh", "delta": "0:00:00.509110", "end": "2024-06-11 15:56:52.420263", "msg": "non-zero return code", "rc": 1, "start": "2024-06-11 15:56:51.911153", "stderr": "Traceback (most recent call last):\n  File \"/usr/lib/python3.6/site-packages/cloudinit/sources/DataSourceVMwareGuestInfo.py\", line 48, in <module>\n    LOG = logging.getLogger(__name__)\nAttributeError: module 'cloudinit.log' has no attribute 'getLogger'", "stderr_lines": ["Traceback (most recent call last):", "  File \"/usr/lib/python3.6/site-packages/cloudinit/sources/DataSourceVMwareGuestInfo.py\", line 48, in <module>", "    LOG = logging.getLogger(__name__)", "AttributeError: module 'cloudinit.log' has no attribute 'getLogger'"], "stdout": "using python 3\ninstalling datasource\nvalidating datasource", "stdout_lines": ["using python 3", "installing datasource", "validating datasource"]}

==

This is related to that recent RHEL 8.x update  :

2024-01-08 Jon Maloy<EMAIL_ADDRESS>- 23.4-1
- Rebase to 23.4.1 [RHEL-18314]
- Resolves: RHEL-18314
([RHEL-8]Rebase cloud-init to 23.4)

And the fact your tooling using a very old library of cloud-init-vmware.sh.

Ref:
https://github.com/aws/eks-anywhere-build-tooling

What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:

EKS Anywhere Release:
EKS Distro Release:

@saiteja313 It is clear that the cloud-init-vmware-guestinfo is the source of all the trouble, but the step Directly install Guestinfo which installs the tool as it's required only if Cloud-init version is less than 21.3. I tried reproducing this with a RHEL 8.10 source ISO, where the final cloud-init version is set to 23.4 and the image build works fine, and the E2E test using this image works well too without using any of these workarounds.
The only thing that would make the build execute that guestinfo step is if this cloud-init version is set to a value <= 21.3. We can find out what this value is if we run the image-builder CLI with --ansible-verbosity flag to 2, then try to debug from that point on.
Could you try that out and provide the output you get for this step?
The sample config file I used is:
{
  "cluster": "<cluster>",
  "convert_to_template": "false",
  "create_snapshot": "true",
  "datacenter": "<datacenter>",
  "datastore": "<datastore>",
  "folder": "<folder>",
  "insecure_connection": "true",
  "linked_clone": "false",
  "network": "<network>",
  "password": "<password>",
  "resource_pool": "<resource_pool>",
  "template": "",
  "username": "<username>",
  "vcenter_server": "<vcenter_server>",
  "vsphere_library_name": "<library>",
  "rhel_username": "<rhel_username>",
  "rhel_password": "<rhel_password>",
  "iso_url": "file:///tmp/rhel-8.10-x86_64-dvd.iso",
  "iso_checksum_type": "sha256",
  "iso_checksum": "9b3c8e31bc2cdd2de9cf96abb3726347f5840ff3b176270647b3e66639af291b",
}

The command I ran to build the image is:
image-builder build --hypervisor vsphere --os redhat --os-version 8 --vsphere-config vsphere.json --release-channel 1-29 --ansible-verbosity 2


Fix failing GitLab integration test

#3314

 Here is an overview of what got changed by this pull request:

Complexity increasing per file
==============================
- dockstore-webservice/src/main/java/io/dockstore/webservice/helpers/GitLabSourceCodeRepo.java  1

See the complete overview on Codacy


Java 17 support

The rececently released Java 17 removed Unsafe.defineAnonymousClass(): https://bugs.openjdk.java.net/browse/JDK-8267178
In effect Guice will use ChildClassDefiner where it previously used UnsafeClassDefiner, and will then fail when generating its proxy classes for non-public classes e.g. using @Inject on their constructor, with an error like this:
class XYZ$$EnhancerByGuice$$575108993 cannot access its superclass XYZ (XYZ$$EnhancerByGuice$$575108993 is in unnamed module of loader ChildClassDefiner$ChildLoader @72acb566; XYZ is in unnamed module of loader 'app')
If you trace down where this error comes from in the JDK, the inter-module boundaries are not even checked if the superclass is not public, so there is no chance of fixing this by adding module exports or opens to the codebase that is using Guice. Apparently Hidden Classes are the suggested replacement for Unsafe.defineAnonymousClass:
https://openjdk.java.net/jeps/371

(Related: https://github.com/google/guice/pull/1529)

Yes, this should be fixed by #1529 (I just need to add some documentation around the new defining process)

Hey @mcculls
In Java 17 the proxy classes are getting created in an unnamed module instead of the owning class module/ or the com.google.inject module (as with 11->16)
The superclass access check is failing on the proxy class, problem doesn't exist in a lower JDK (except 12, where it popped up and vanished in JDK 13)
Previous behaviour that works
module {
opens my.package.that.injects to com.google.inject;
}

Required changes for JDK 17 (because of superclass access check)
module {
exports my.package.that.inject ; //this is now required because the proxy class is loaded into an unnamed module now)
opens my.package.that.injects to com.google.inject;
}

Exception
Caused by: java.lang.IllegalAccessError: class za.co.uwe.assist.v5.web.SaveFarmSessionIntoScopeOnCallExit$$FastClassByGuice$$118282047 (in unnamed module @0x1fdd8364) cannot access class za.co.uwe.assist.v5.web.SaveFarmSessionIntoScopeOnCallExit (in module za.co.uwe.assist.v5.web) because module za.co.uwe.assist.v5.web does not export za.co.uwe.assist.v5.web to unnamed module @0x1fdd8364
	at za.co.uwe.assist.v5.web.SaveFarmSessionIntoScopeOnCallExit$$FastClassByGuice$$118282047.GUICE$TRAMPOLINE(<generated>)
	at za.co.uwe.assist.v5.web.SaveFarmSessionIntoScopeOnCallExit$$FastClassByGuice$$118282047.apply(<generated>)
	at com.google.guice@0.0.0_0-SNAPSHOT/com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:82)

Dropping a JDK version and the issue goes away xD
======================
Full classname legend:
======================
SaveFarmSessionIntoScopeOnCallExit:                              "za.co.uwe.assist.v5.web.SaveFarmSessionIntoScopeOnCallExit"
SaveFarmSessionIntoScopeOnCallExit$$FastClassByGuice$$118282047: "za.co.uwe.assist.v5.web.SaveFarmSessionIntoScopeOnCallExit$$FastClassByGuice$$118282047"
========================
End of classname legend:
========================

Forgot to mention - When doing this, the unsafe access exception disappears and this one pops up

@GedMarc can you share an example project or test that recreates the exception?

Here we are :-
guiced17.zip
profile "raw" for replicating on automatic module names, profile "modular" for executions on pure modules (for jlink/jpackage distributions)
Modular results :-
Java HotSpot(TM) 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
Exception in thread "main" com.google.inject.ProvisionException: Unable to provision, see the following errors:

1) [Guice/ErrorInjectingConstructor]: IllegalAccessError: class Caller$$FastClassByGuice$$1904349 (in unnamed module @0x197d671) cannot access class Caller (in module guiced17) because module guiced17 does not export my.application.to to unnamed module @0x197d671
  at Caller.<init>(Caller.java:10)
  while locating Caller

Learn more:
  https://github.com/google/guice/wiki/ERROR_INJECTING_CONSTRUCTOR

1 error

======================
Full classname legend:
======================
Caller:                            "my.application.to.Caller"
Caller$$FastClassByGuice$$1904349: "my.application.to.Caller$$FastClassByGuice$$1904349"
========================
End of classname legend:
========================

	at com.google.guice@<IP_ADDRESS>-jre17-rc1/com.google.inject.internal.InternalProvisionException.toProvisionException(InternalProvisionException.java:251)
	at com.google.guice@<IP_ADDRESS>-jre17-rc1/com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1103)
	at com.google.guice@<IP_ADDRESS>-jre17-rc1/com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1138)
	at guiced17/my.application.to.Caller.main(Caller.java:18)
Caused by: java.lang.IllegalAccessError: class my.application.to.Caller$$FastClassByGuice$$1904349 (in unnamed module @0x197d671) cannot access class my.application.to.Caller (in module guiced17) because module guiced17 does not export my.application.to to unnamed module @0x197d671
	at my.application.to.Caller$$FastClassByGuice$$1904349.GUICE$TRAMPOLINE(<generated>)
	at my.application.to.Caller$$FastClassByGuice$$1904349.apply(<generated>)
	at com.google.guice@<IP_ADDRESS>-jre17-rc1/com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:82)
	at com.google.guice@<IP_ADDRESS>-jre17-rc1/com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114)
	at com.google.guice@<IP_ADDRESS>-jre17-rc1/com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
	at com.google.guice@<IP_ADDRESS>-jre17-rc1/com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:296)
	at com.google.guice@<IP_ADDRESS>-jre17-rc1/com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1100)
	... 2 more

Raw execution Results
Java HotSpot(TM) 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
Exception in thread "main" com.google.inject.ProvisionException: Unable to provision, see the following errors:

1) [Guice/ErrorInjectingConstructor]: IllegalAccessError: class Caller$$FastClassByGuice$$1660256 (in unnamed module @0x27c86f2d) cannot access class Caller (in module guiced17) because module guiced17 does not export my.application.to to unnamed module @0x27c86f2d
  at Caller.<init>(Caller.java:10)
  while locating Caller

Learn more:
  https://github.com/google/guice/wiki/ERROR_INJECTING_CONSTRUCTOR

1 error

======================
Full classname legend:
======================
Caller:                            "my.application.to.Caller"
Caller$$FastClassByGuice$$1660256: "my.application.to.Caller$$FastClassByGuice$$1660256"
========================
End of classname legend:
========================

	at com.google.guice@5.0.1/com.google.inject.internal.InternalProvisionException.toProvisionException(InternalProvisionException.java:251)
	at com.google.guice@5.0.1/com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1103)
	at com.google.guice@5.0.1/com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1138)
	at guiced17/my.application.to.Caller.main(Caller.java:18)
Caused by: java.lang.IllegalAccessError: class my.application.to.Caller$$FastClassByGuice$$1660256 (in unnamed module @0x27c86f2d) cannot access class my.application.to.Caller (in module guiced17) because module guiced17 does not export my.application.to to unnamed module @0x27c86f2d
	at my.application.to.Caller$$FastClassByGuice$$1660256.GUICE$TRAMPOLINE(<generated>)
	at my.application.to.Caller$$FastClassByGuice$$1660256.apply(<generated>)
	at com.google.guice@5.0.1/com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:82)
	at com.google.guice@5.0.1/com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114)
	at com.google.guice@5.0.1/com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:91)
	at com.google.guice@5.0.1/com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:296)
	at com.google.guice@5.0.1/com.google.inject.internal.InjectorImpl$1.get(InjectorImpl.java:1100)
	... 2 more

Thanks, so the issue with the module example is that recent JDKs disallow access to sun.misc.Unsafe from modules unless they requires jdk.unsupported.  Without this requires the Unsafe class is not available and Guice falls back to using a child classloader. Note if Guice is on the classpath, it can access sun.misc.Unsafe - so this is only an issue when Guice is on the module path either as an automatic module or a pure module.
For the pure module case adding requires jdk.unsupported to the Guice module should be enough.
For the automatic module case you can either add requires jdk.unsupported to the example module, or use --add-modules jdk.unsupported on the command-line. (As long as some module requires jdk.unsupported or it's added via the command-line then Guice running as an automatic module will be allowed to also access it.)
I'll have a think about how best to do this in the build (which will probably involve making it a pure module)

Hmm I can't confirm that,
I've added the requires clause to both the core as a pure module, and the consumer as an automatic module, the same exception - (Only in 17) - also to command line

Caused by: java.lang.IllegalAccessError: class za.co.uwe.assist.v5.web.SaveFarmSessionIntoScopeOnCallExit$$FastClassByGuice$$114333740 (in unnamed module @0x403b2e0b) cannot access class za.co.uwe.assist.v5.web.SaveFarmSessionIntoScopeOnCallExit (in module za.co.uwe.assist.v5.web) because module za.co.uwe.assist.v5.web does not export za.co.uwe.assist.v5.web to unnamed module @0x403b2e0b
	at za.co.uwe.assist.v5.web.SaveFarmSessionIntoScopeOnCallExit$$FastClassByGuice$$114333740.GUICE$TRAMPOLINE(<generated>)
	at za.co.uwe.assist.v5.web.SaveFarmSessionIntoScopeOnCallExit$$FastClassByGuice$$114333740.apply(<generated>)
	at com.google.guice@0.0.0_0-SNAPSHOT/com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:82)
	at com.google.guice@0.0.0_0-SNAPSHOT/com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:114)

Removing the added exports and adding in the requires still ends with the same result

I'm attaching the jar(zip) with the module-info updated to include jdk.unsupported,
Can use the previous replicator with jdk.unsupported as well to produce the same exception
guice-0.0.0_0-SNAPSHOT.zip

The module shade/build is configured here (maybe to look at to assist not sure) - https://github.com/GedMarc/GuicedEE-Services/tree/master/guice-core

@GedMarc have you pulled in the changes from #1529 ?

i haven't sorry! let me do that quick

@mcculls Purring like a kitten sir!
the requires clause only necessary on the guice module, otherwise everything looks good -
checked (obviously all the default as well)

aop & private modules
generic types binding
persistence modules
servlet modules

Happy panda :) You're the man!

putting the modular jar here with my module-info just incase a multi release jar becomes a thing (doesn't include error prone annotations)
guice.zip
module-info.zip

@mcculls is there any plan to make a release that includes recent JDK17 related improvements in the near future?

Would it be possible to publish a new Guice release that includes #1529? I wasn't able to get our services to start up on Java 17 without those changes

Can we pretty please get a new release out? :cat2:

Can we put out a new release of Guice?

@markmarch @ad-fu @java-team-github-bot Sorry for dropping yet another comment, but I hope the explicit mentions here bring in some progress.
There are life signs as commits in the tree, but the lack of a release is really a hard blocker and very painful currently. Can we pretty please get a new release so we can make use of the fixes? :crying_cat_face:

We are working on a new release but there are currently some test failures when running with Java 17.
@mcculls If you have time, can you look into some of the test failures since you are most familiar with the bytecode gen stuff and those tests failures all seem to be related to that?
With bazel installed, you can reproduce the issue with the following command from the root of the repo:
bazel test --java_runtime_version=remotejdk_17 //...

I'll also spend some time looking into this.
The original plan is to migrate from maven to bazel then create a new release that also include some of the kotlin work we've done that hasn't been released but I probably will just cut a new release once the test failures are fixed and punt the bazel and kotlin work to next release.

Hi @markmarch some of those failing tests rely on parsing stack traces to verify what mechanism was used to call the method. Java17 hides certain types of frames by default, particularly frames relating to anonymous nest-mates, so you need to add -XX:+UnlockDiagnosticVMOptions -XX:+ShowHiddenFrames so those tests can find the frames they're looking for:
https://github.com/google/guice/blob/master/core/pom.xml#L104
Note this is just for test verification purposes - in everyday use you wouldn't worry about not seeing these frames in stack traces.


App does not render after update to 0.4.14

After applying the latest version bump on our local instance (v0.4.14), we cannot use Backstage - the app gets rendered through an 'empty DOM', i.e no content gets rendered in . If we revert back to our previous installation HEAD it works with no issue. I will add a version diff in the last section of the bug report.
When inspecting the page, this is the HTML I see:

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="theme-color" content="#000000">
    <meta name="description" content="Backstage is an open platform for building developer portals">
    <link rel="apple-touch-icon" href="/logo192.png">

    <link rel="manifest" href="/manifest.json" crossorigin="use-credentials">
    <link rel="icon" href="/favicon.ico">
    <link rel="shortcut icon" href="/favicon.ico">
    <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
    <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
    <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
    <title>App Title</title>

    You need to enable JavaScript to run this app.

I've tried on Chrome and Firefox and the result is the same.
Interestingly, if I open it on an "incognito window", the auth page renders properly (we have 'guest' and GitHub auth set up), but then after logging in (or taking guest mode) we get back to the empty screen.
Another interesting data point is that we see no logs pointing to route visits on the server's stdout.
Expected Behavior

Backstage should render.
Current Behavior

An empty page gets rendered on all routes, making Backstage unusable.
Possible Solution

Steps to Reproduce

Open localhost:3000
(if not logged in) log in
Observe

Context

Our production instance is working, although I have also noticed recent problems with a search collator that reaches out to a separate backend (confluence). I am not sure if this is related to the <App /> rendering issue.
Your Environment

backstage-cli info with issue
yarn run v1.22.11
OS:   Darwin 21.2.0 - darwin/x64
node: v14.17.6
yarn: 1.22.11
cli:  0.12.0 (installed)

Dependencies:
  @backstage/app-defaults                                  0.1.5
  @backstage/backend-common                                0.10.4
  @backstage/backend-tasks                                 0.1.4
  @backstage/catalog-client                                0.5.5
  @backstage/catalog-model                                 0.9.10
  @backstage/cli-common                                    0.1.6
  @backstage/cli                                           0.12.0
  @backstage/config-loader                                 0.9.3
  @backstage/config                                        0.1.13
  @backstage/core-app-api                                  0.5.0
  @backstage/core-components                               0.8.5
  @backstage/core-plugin-api                               0.6.0
  @backstage/dev-utils                                     0.2.18
  @backstage/errors                                        0.2.0
  @backstage/integration-react                             0.1.19
  @backstage/integration                                   0.7.2
  @backstage/plugin-analytics-module-ga                    0.1.7
  @backstage/plugin-api-docs                               0.7.0
  @backstage/plugin-app-backend                            0.3.22
  @backstage/plugin-auth-backend                           0.7.0
  @backstage/plugin-bitrise                                0.1.23
  @backstage/plugin-catalog-backend                        0.21.0
  @backstage/plugin-catalog-common                         0.1.1
  @backstage/plugin-catalog-graph                          0.2.7
  @backstage/plugin-catalog-import                         0.7.10
  @backstage/plugin-catalog-react                          0.6.12
  @backstage/plugin-catalog                                0.7.9
  @backstage/plugin-gocd                                   0.1.2
  @backstage/plugin-org                                    0.4.0
  @backstage/plugin-permission-common                      0.4.0
  @backstage/plugin-permission-node                        0.4.0
  @backstage/plugin-permission-react                       0.3.0
  @backstage/plugin-proxy-backend                          0.2.16
  @backstage/plugin-scaffolder-backend-module-cookiecutter 0.1.9
  @backstage/plugin-scaffolder-backend                     0.15.21
  @backstage/plugin-scaffolder-common                      0.1.3
  @backstage/plugin-scaffolder                             0.12.0
  @backstage/plugin-search-backend-node                    0.4.4
  @backstage/plugin-search-backend                         0.3.1
  @backstage/plugin-search                                 0.5.6
  @backstage/plugin-tech-radar                             0.5.3
  @backstage/plugin-techdocs-backend                       0.13.0
  @backstage/plugin-techdocs                               0.13.0
  @backstage/plugin-todo-backend                           0.1.19
  @backstage/plugin-todo                                   0.1.20
  @backstage/plugin-user-settings                          0.3.17
  @backstage/search-common                                 0.2.1
  @backstage/techdocs-common                               0.11.4
  @backstage/test-utils                                    0.2.3
  @backstage/theme                                         0.2.14
  @backstage/types                                         0.1.1
  @backstage/version-bridge                                0.1.1
Done in 1.14s.

backstage-cli diff from previous (working) version
diff --git a/after.txt b/before.txt
index 9bc3d7c..850c17e 100644
--- a/before.txt
+++ b/after.txt
@@ -1,61 +1,60 @@
 yarn run v1.22.11
 OS:   Darwin 21.2.0 - darwin/x64
 node: v14.17.6
 yarn: 1.22.11
-cli:  0.11.0 (installed)
+cli:  0.12.0 (installed)

 Dependencies:
-  @backstage/app-defaults                                  0.1.4
-  @backstage/backend-common                                0.10.3
-  @backstage/backend-tasks                                 0.1.3
-  @backstage/catalog-client                                0.5.4
-  @backstage/catalog-model                                 0.9.9
+  @backstage/app-defaults                                  0.1.5
+  @backstage/backend-common                                0.10.4
+  @backstage/backend-tasks                                 0.1.4
+  @backstage/catalog-client                                0.5.5
+  @backstage/catalog-model                                 0.9.10
   @backstage/cli-common                                    0.1.6
-  @backstage/cli                                           0.11.0
-  @backstage/config-loader                                 0.9.2
-  @backstage/config                                        0.1.12
-  @backstage/core-app-api                                  0.4.0
-  @backstage/core-components                               0.8.4
-  @backstage/core-plugin-api                               0.5.0
-  @backstage/dev-utils                                     0.2.17
+  @backstage/cli                                           0.12.0
+  @backstage/config-loader                                 0.9.3
+  @backstage/config                                        0.1.13
+  @backstage/core-app-api                                  0.5.0
+  @backstage/core-components                               0.8.5
+  @backstage/core-plugin-api                               0.6.0
+  @backstage/dev-utils                                     0.2.18
   @backstage/errors                                        0.2.0
-  @backstage/integration-react                             0.1.18
-  @backstage/integration                                   0.7.1
-  @backstage/plugin-analytics-module-ga                    0.1.6
-  @backstage/plugin-api-docs                               0.6.22
-  @backstage/plugin-app-backend                            0.3.21
-  @backstage/plugin-auth-backend                           0.6.2
-  @backstage/plugin-bitrise                                0.1.22
-  @backstage/plugin-catalog-backend                        0.20.0
-  @backstage/plugin-catalog-common                         0.1.0
-  @backstage/plugin-catalog-graph                          0.2.6
-  @backstage/plugin-catalog-import                         0.7.9
-  @backstage/plugin-catalog-react                          0.6.11
-  @backstage/plugin-catalog                                0.7.8
-  @backstage/plugin-gocd                                   0.1.1
-  @backstage/plugin-org                                    0.3.34
-  @backstage/plugin-permission-common                      0.3.1
-  @backstage/plugin-permission-node                        0.3.0
-  @backstage/plugin-permission-react                       0.2.2
-  @backstage/plugin-proxy-backend                          0.2.15
-  @backstage/plugin-scaffolder-backend-module-cookiecutter 0.1.8
-  @backstage/plugin-scaffolder-backend                     0.15.20
-  @backstage/plugin-scaffolder-common                      0.1.2
-  @backstage/plugin-scaffolder                             0.11.18
+  @backstage/integration-react                             0.1.19
+  @backstage/integration                                   0.7.2
+  @backstage/plugin-analytics-module-ga                    0.1.7
+  @backstage/plugin-api-docs                               0.7.0
+  @backstage/plugin-app-backend                            0.3.22
+  @backstage/plugin-auth-backend                           0.7.0
+  @backstage/plugin-bitrise                                0.1.23
+  @backstage/plugin-catalog-backend                        0.21.0
+  @backstage/plugin-catalog-common                         0.1.1
+  @backstage/plugin-catalog-graph                          0.2.7
+  @backstage/plugin-catalog-import                         0.7.10
+  @backstage/plugin-catalog-react                          0.6.12
+  @backstage/plugin-catalog                                0.7.9
+  @backstage/plugin-gocd                                   0.1.2
+  @backstage/plugin-org                                    0.4.0
+  @backstage/plugin-permission-common                      0.4.0
+  @backstage/plugin-permission-node                        0.4.0
+  @backstage/plugin-permission-react                       0.3.0
+  @backstage/plugin-proxy-backend                          0.2.16
+  @backstage/plugin-scaffolder-backend-module-cookiecutter 0.1.9
+  @backstage/plugin-scaffolder-backend                     0.15.21
+  @backstage/plugin-scaffolder-common                      0.1.3
+  @backstage/plugin-scaffolder                             0.12.0
   @backstage/plugin-search-backend-node                    0.4.4
-  @backstage/plugin-search-backend                         0.3.0
-  @backstage/plugin-search                                 0.5.5
-  @backstage/plugin-tech-radar                             0.5.2
-  @backstage/plugin-techdocs-backend                       0.12.3
-  @backstage/plugin-techdocs                               0.12.14
-  @backstage/plugin-todo-backend                           0.1.18
-  @backstage/plugin-todo                                   0.1.18
-  @backstage/plugin-user-settings                          0.3.16
+  @backstage/plugin-search-backend                         0.3.1
+  @backstage/plugin-search                                 0.5.6
+  @backstage/plugin-tech-radar                             0.5.3
+  @backstage/plugin-techdocs-backend                       0.13.0
+  @backstage/plugin-techdocs                               0.13.0
+  @backstage/plugin-todo-backend                           0.1.19
+  @backstage/plugin-todo                                   0.1.20
+  @backstage/plugin-user-settings                          0.3.17
   @backstage/search-common                                 0.2.1
-  @backstage/techdocs-common                               0.11.3
-  @backstage/test-utils                                    0.2.2
+  @backstage/techdocs-common                               0.11.4
+  @backstage/test-utils                                    0.2.3
   @backstage/theme                                         0.2.14
   @backstage/types                                         0.1.1
   @backstage/version-bridge                                0.1.1
-Done in 1.65s.
+Done in 1.14s.

Any unusual output in the browser console?

@freben Yep, this is something I haven't seen before:
Uncaught Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
    at resolveDispatcher (react.development.js:1476)
    at useMemo (react.development.js:1531)
    at useElementFilter (index.esm.js:569)
    at FlatRoutes (index.esm.js:2698)
    at renderWithHooks (react-dom.development.js:14804)
    at mountIndeterminateComponent (react-dom.development.js:17483)
    at beginWork (react-dom.development.js:18597)
    at HTMLUnknownElement.callCallback (react-dom.development.js:189)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:238)
    at invokeGuardedCallback (react-dom.development.js:293)

Could this be related to the React 17 bump in the latest version of Backstage? If so, can you give me pointers on how to debug/pinpoint what needs to be changed to prevent the error?

Yes this is most likely due to having multiple versions of react-dom (or maybe react) being pulled in.
You could try yarn backstage-cli versions:check for starters to see what it says.
But apart from that you can do more regular yarn leven debugging such as using yarn why react-dom to see who is pulling in the old version 16, and low level yarn.lock file poking.

Thanks for the pointers, unfortunately I'm not getting much insight from them:
$ yarn backstage-cli versions:check
yarn run v1.22.17
Done in 2.16s.

yarn why react
yarn why v1.22.17
[1/4] Why do we have the module "react"...?
[2/4] Initialising dependency graph...
warning Resolution field<EMAIL_ADDRESS>is incompatible with requested version<EMAIL_ADDRESS>warning Resolution field<EMAIL_ADDRESS>is incompatible with requested version<EMAIL_ADDRESS>[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found<EMAIL_ADDRESS>info Reasons this module exists
   - "_project_#app" depends on it
   - Hoisted from "_project_#app#react"
   ...
info Disk size without dependencies: "17.06MB"
info Disk size with unique dependencies: "29.06MB"
info Disk size with transitive dependencies: "34.06MB"
info Number of shared dependencies: 3
Done in 8.70s.

yarn why react-dom
yarn why v1.22.17
[1/4] Why do we have the module "react-dom"...?
[2/4] Initialising dependency graph...
warning Resolution field<EMAIL_ADDRESS>is incompatible with requested version<EMAIL_ADDRESS>warning Resolution field<EMAIL_ADDRESS>is incompatible with requested version<EMAIL_ADDRESS>[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found<EMAIL_ADDRESS>info Reasons this module exists
   - "_project_#app" depends on it
   - Hoisted from "_project_#app#react-dom"
   ...
info Disk size without dependencies: "40.06MB"
info Disk size with unique dependencies: "76.19MB"
info Disk size with transitive dependencies: "81.19MB"
info Number of shared dependencies: 4
Done in 7.15s.

Something interesting I found while looking at yarn.lock is that<EMAIL_ADDRESS>depends on "@hot-loader/react-dom" "^16.13.0" - could this be related?

Side note:
warning Resolution field<EMAIL_ADDRESS>is incompatible with requested version<EMAIL_ADDRESS>warning Resolution field<EMAIL_ADDRESS>is incompatible with requested version<EMAIL_ADDRESS>
you should remove these resolutions from your package. Those were obviated a long time ago and can cause other problems.

Something interesting I found while looking at yarn.lock is that<EMAIL_ADDRESS>depends on "@hot-loader/react-dom" "^16.13.0" - could this be related?

Hm, that is a little interesting, but it doesn't pull in anything else that seems to be of interest so not entirely sure that it might cause the original issue. @Rugvip ideas?

@freben

you should remove these resolutions from your package. Those were obviated a long time ago and can cause other problems.

True, thanks for pointing that out. That indeed does not help with the issue at hand, but it is good hygiene anyways 👍

Hm, that is a little interesting, but it doesn't pull in anything else that seems to be of interest so not entirely sure that it might cause the original issue

I tried downgrading only @backstage/cli to 0.11.0 and indeed the error persists. At this point I am not sure where else to look.
I've found another couple interesting data point, though:

If I try to access the frontend through localhost:7007 (that is backend.baseUrl) I see it render correctly. The problem is when accessing through localhost:3000 (that is: app.baseUrl).
if I build Backstage through yarn --frozen-lockfile --production, the frontend renders correctly under localhost:3000. Could this be an indication that the problem is in one of my declared devDependencies?

It's very likely related to react version duplication. What versions of react and react-dom do you currently see in yarn.lock? There should only be a single entry for each of them.
The @hot-loader/react-dom dependency in the CLI should be fine as long as you've got the latest CLI. The CLI will only use that patched version if react-dom itself is also at v16.
Have you gone through with the bump to v17 yet, or are you on v16? If you're bumping to v17 you may need to bump some other plugin packages as well, particularly the @roadiehq ones released React 17 support very recently. As mentioned in the changelog you may in the end up needing to use resolutions to force all transitive dependencies to use React 17, but it's always nice if that's not needed.

I've just seen this after bump version, resolution for me was to update react from 16 to 17 in a couple of local plugins. That was done manually by first searching from the react versions in the package.json files then making any old ones consistent with the latest version in the main app.

Tried again, and bumping versions to the latest fixed it. Unfortunately I could not pinpoint the exact reason, but I do assume it could have been one of our third-party plugin dependencies still relying on React 16 vs the Backstage frontend app depending on React 17.
For others' reference, here is the current output of backstage-cli info:
yarn run v1.22.11
OS:   Darwin 21.3.0 - darwin/x64
node: v16.11.1
yarn: 1.22.11
cli:  0.14.0 (installed)

Dependencies:
  @backstage/app-defaults                                  0.1.8
  @backstage/backend-common                                0.10.9
  @backstage/backend-tasks                                 0.1.8
  @backstage/catalog-client                                0.7.1
  @backstage/catalog-model                                 0.10.1
  @backstage/cli-common                                    0.1.8
  @backstage/cli                                           0.14.0
  @backstage/config-loader                                 0.9.5
  @backstage/config                                        0.1.15
  @backstage/core-app-api                                  0.5.3
  @backstage/core-components                               0.8.9
  @backstage/core-plugin-api                               0.6.1
  @backstage/dev-utils                                     0.2.22
  @backstage/errors                                        0.2.2
  @backstage/integration-react                             0.1.22
  @backstage/integration                                   0.7.4
  @backstage/plugin-analytics-module-ga                    0.1.10
  @backstage/plugin-api-docs                               0.7.3
  @backstage/plugin-app-backend                            0.3.26
  @backstage/plugin-auth-backend                           0.10.2
  @backstage/plugin-auth-node                              0.1.2
  @backstage/plugin-bitrise                                0.1.26
  @backstage/plugin-catalog-backend                        0.21.5
  @backstage/plugin-catalog-common                         0.1.4
  @backstage/plugin-catalog-graph                          0.2.11
  @backstage/plugin-catalog-import                         0.8.2
  @backstage/plugin-catalog-react                          0.6.15
  @backstage/plugin-catalog                                0.8.0
  @backstage/plugin-gocd                                   0.1.5
  @backstage/plugin-org                                    0.4.3
  @backstage/plugin-permission-common                      0.5.1
  @backstage/plugin-permission-node                        0.5.1
  @backstage/plugin-permission-react                       0.3.1
  @backstage/plugin-proxy-backend                          0.2.20
  @backstage/plugin-scaffolder-backend-module-cookiecutter 0.2.1
  @backstage/plugin-scaffolder-backend                     0.16.1
  @backstage/plugin-scaffolder-common                      0.2.1
  @backstage/plugin-scaffolder                             0.12.3
  @backstage/plugin-search-backend-node                    0.4.7
  @backstage/plugin-search-backend                         0.4.4
  @backstage/plugin-search                                 0.7.0
  @backstage/plugin-tech-radar                             0.5.6
  @backstage/plugin-techdocs-backend                       0.13.5
  @backstage/plugin-techdocs                               0.13.4
  @backstage/plugin-todo-backend                           0.1.23
  @backstage/plugin-todo                                   0.2.1
  @backstage/plugin-user-settings                          0.3.20
  @backstage/release-manifests                             0.0.2
  @backstage/search-common                                 0.2.4
  @backstage/techdocs-common                               0.11.9
  @backstage/test-utils                                    0.2.5
  @backstage/theme                                         0.2.15
  @backstage/types                                         0.1.3
  @backstage/version-bridge                                0.1.2
Done in 1.17s.


requireCordovaModule issue with cordova 9

After upgrading Cordova to version 9 I get this error message:
Using "requireCordovaModule" to load non-cordova module "path" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.
It's related to after_prepare.js file. Is there a way, how to fix this?

same problem here!

the same problem

Please use the following plugin
https://github.com/PeterHdd/cordova-plugin-crypto-file
I have updated it and now it works with cordova 9.
to install it do the following:
npm i cordova-plugin-crypto-file@latest

Thanks @PeterHdd.
I wasn't able to use Ionic as it can't guarantee the layout will be the same on every device. Instead I'm using Crosswalk. I referenced Peter's version to get a file that worked still.
In hooks/after_prepare.js, I changed:
    var path              = context.requireCordovaModule('path'),         fs                = context.requireCordovaModule('fs'),         crypto            = context.requireCordovaModule('crypto'),         Q                 = context.requireCordovaModule('q'),
to:
    var path              = require('path'),         fs                = require('fs'),         crypto            = require('crypto'),         Q                 = require('q'),
And:
var sourceFile = path.join(pluginDir, 'com/tkyaji/cordova/DecryptResource.java');
to:
var sourceFile = path.join(pluginDir, '../app/src/main/java/com/tkyaji/cordova/DecryptResource.java');
(I'm not really sure why the path is different... but that seemed to fix it. Something about the different 'path' object I guess).
I hope that helps others until this plugin gets updated (Please, @tkyaji ...?).

@cyborgk9 you can just use the plugin I referenced, made it to work with the new ionic webview. But it can work even if you are not using ionic.

@cyborgk9 you can just use the plugin I referenced, made it to work with the new ionic webview. But it can work even if you are not using ionic.

My app seemed to render incorrectly until I installed cordova-plugin-ionic-webview, but that bypassed crosswalk I guess, as there were other layout issues. Maybe there's a way to get Ionic running with Crosswalk, in which case I would use that and your plugin... (that'd be ideal, in fact...)

Hi all,
Anyone find a solution for this plugin not working on Cordova 9 (not ionic) ?
I tried https://github.com/PeterHdd/cordova-plugin-crypto-file
It works on build, files are crypted but are not decrypted after installation.
Thx in advance.

Additionally, I also had to remove the references to Parser and ParserHelper in "hooks/after_prepare.js" for Cordova CLI 9 with Android 8.1.0
To recap, the first line beginning with "var path ..." now looks like:
    var path              = require('path'),         fs                = require('fs'),         crypto            = require('crypto'),         Q                 = require('q'),         cordova_util      = context.requireCordovaModule('cordova-lib/src/cordova/util'),         platforms         = context.requireCordovaModule('cordova-lib/src/platforms/platforms'),         ConfigParser      = context.requireCordovaModule('cordova-common').ConfigParser;
The other change (to the line var sourceFile = path.join(pluginDir, 'com/tkyaji/cordova/DecryptResource.java'); ) is the same as mentioned by @cyborgk9
i.e., change it to:
var sourceFile = path.join(pluginDir, '../app/src/main/java/com/tkyaji/cordova/DecryptResource.java');

Thanks @PeterHdd.
I wasn't able to use Ionic as it can't guarantee the layout will be the same on every device. Instead I'm using Crosswalk. I referenced Peter's version to get a file that worked still.
In hooks/after_prepare.js, I changed:
 var path = context.requireCordovaModule('path'), fs = context.requireCordovaModule('fs'), crypto = context.requireCordovaModule('crypto'), Q = context.requireCordovaModule('q'),
to:
 var path = require('path'), fs = require('fs'), crypto = require('crypto'), Q = require('q'),
And:
var sourceFile = path.join(pluginDir, 'com/tkyaji/cordova/DecryptResource.java');
to:
var sourceFile = path.join(pluginDir, '../app/src/main/java/com/tkyaji/cordova/DecryptResource.java');
(I'm not really sure why the path is different... but that seemed to fix it. Something about the different 'path' object I guess).
I hope that helps others until this plugin gets updated (Please, @tkyaji ...?).

you can use cordova 8 instead of 9

platform : android 9
cordova : v.10.0.0
remove plugin
cordova plugin rm cordova-plugin-crypt-file
install plugin
cordova plugin add cordova-plugin-crypto-file@latest
latest version 1.4.0 fixes the cordova 9 issue.

platform : android 9
cordova : v.10.0.0
remove plugin
cordova plugin rm cordova-plugin-crypt-file
install plugin
cordova plugin add cordova-plugin-crypto-file@latest
latest version 1.4.0 fixes the cordova 9 issue.


Too much magic, not enough explanation

Hi folks,
First off, I really like the project, but how it works is completely mysterious.
While I like the approach guild takes to the ML logging problem, you need clearer documentation/ more extensive examples if you are to achieve wisespread adoption.
How it finds hyper-parameters seems discoverable, but how it knows to capture things like loss, and val_acc in the image classifier example is entirely unclear.
Is it making use of some tf.keras magic? Who knows?
Is it making assumptions about how functions/classes are structured and what they return?
If so, what are these assumptions?
My use case is of similar complexity to the image classifier, albeit implemented in plain Tensorflow rather than tf.keras. The model class definition contains a .train() method, which is called in a train_model function within the script I use to pre-process data and then train the model with.
These methods return, at the end of the training run, the best validation accuracy which guild fails to capture, and despite consulting the documentation at length I am at a loss (no pun intended) on how to fix this.
If you please could answer/provide:

What form the scripts should be in, in order for guild to capture values of interest
More transparent explanation of how guild infers what to capture.
More complex/varied examples of training set-ups and how guild can be configured to work across different set-ups.

Many thanks

I agree on the black magic and need for more examples. @gar1t  has been working on new docs for a while now and I expect this is one of the things that will be improved on.

All points taken to heart! As @samedii mentioned, the docs are undergoing a revamp to address these gaps. In response to this issue, I'll port some of these more important topics over to the active docs.
The custom scalar example is a decent reference on how to configure Guild for logging scalars from your script.
Guild's interface to scalar output (or metrics) is via TensorFlow event logs. Guild is independent of TensorFlow and so you don't need to use TensorFlow in any way.
You have two options for logging scalars:

Write values to standard output using some well-defined pattern. Guild defaults to the pattern ^NAME: VAL. You can define whatever you want for your operation. See the example link above for examples.

Log the values directly using either a TensorFlow summary writer or tensorboardX.

The rationale for this approach is that Guild doesn't want to introduce Guild-specific APIs that tie your project code to Guild as a build tool. The cost is that the configuration for these topics is moved outside your project code - or that you have to follow a convention for logging (in this case writing to TF event logs). The upside is that you can layer Guild on top of projects without modifying them. This all gets frustrating when there are gaps in the docs and for that I apologize!
I'll update here when useful docs land.
In the meantime - and I realize this is not a replacement for the need for documentation - if you have specific questions about project configuration, please feel free to post a question to Slack. There are a number of examples that cover a variety of use cases and we can help point you in the right direction.

We might keep this issue open forever as I feel it could always apply to Guild! Still waiting on 0.7 to land, but a lot of progress has been made on this front. It's taken WAY too long to get this out but the release is definitely approaching! It's an old fashioned expression, but Real Soon Now.

Finally coming back to this. Thanks @higginrp again for the constructive and fair criticism!
The new docs at my.guild.ai cover these topics in a great deal more detail. There are a number of cheatsheets that provide sample code and command. Guild now has a number of examples some of which are annotated.
The new support site is geared for improved content generation and transparency. If you run into something that you think is too opaque, it would be terrific if you could bring that up. Feel free to update here or open a new issue.
I'll keep this open a while longer in case anyone wants to weigh in. At some point we should close it and address new topics as they come up.


Pack UI components and serve through console server

This PR depends on mhf-console branch.
In this PR:

Configure Vue Webpack to move production build assets in a subdirectory called assets.
Config console grpc-gateway router to server / and /assets/ using a virtual filesystem powered by packr
Implemented accounts operations.
Harden configuration file checking to ensure non-empty values

@mofirouz can you update the README with instructions on how to pack the console:
https://github.com/heroiclabs/nakama#full-source-builds


add full reference to CIDR_OR_ID_MATCHER

Without the full reference to CIDR_OR_ID_MATCHER, tagging API is returning  uninitialized constant Api::Subcollections::Tags::CID_OR_ID_MATCHER errors (as was referenced in #13581).
cc: @imtayadeway
@miq-bot add_label bug, api
@miq-bot assign @abellotti

Can you add one test in this PR that exercises the fix ?  Thanks.

@jntullo I'm curious if the other places that reference this constant in the API are broken? Also, did you find out where/why this regressed?

CIDR_OR_ID_MATCHER is also present in CompressedIds. The compressedIds seem to be still included in the same final class.
Perhaps it is now included in different order than it used to?

@imtayadeway Has the PR for the move away from ApplicationRecord been merged yet?  If so, could that be responsible?

@Fryguy it hasn't....probably need to go over that carefully before that gets merged. I suspect this is either a) ordering of includes in Api::BaseController, which may have been changed a while back when doing some housekeeping in that file, or b) some weirdness to do with constant lookup inside mixed-in modules, the structure of which changed when we broke out into separate controllers. I'm curious why the references in app/controllers/api/base_controller/parser.rb and
app/controllers/api/subcollections/policies.rb don't appear to have broken (or don't have coverage?). @jntullo LMK if you want me to look into this....I am putting myself as the leading suspect :wink:

@imtayadeway investigating now 😄

@imtayadeway I believe it has to do with the reordering, and I am worried that some things don't have coverage (going to work on that). When include CompressedIds is added to Api::Subcollections::Tags, it also solves the problem

@imtayadeway can do, but was also waiting for feedback on #13581 where I have refactored this line out.

@jntullo I spent some time digging into this today and made a PR based on my findings in https://github.com/ManageIQ/manageiq/pull/13671. LMK what you think!

Closing in preference of merged https://github.com/ManageIQ/manageiq/pull/13671


threshold not working

What is happening?
I'm not sure what is happening, but it seems the threshold is not working. Image is only triggered to load when it hits the user viewport.

Which version of LazyLoad are you using?
10.4.2

In which browser(s) and browser version(s) are you experiencing the problem?
Chrome 64

Could you provide the HTML, CSS and JS code you use for your images?
https://codepen.io/podrivo/pen/EQgddV

What are the steps to reproduce the problem?
Check console for logs that images are only set when it hits the viewport.

Do you know what it is I'm doing wrong?
Thank you.

Hi @podrivo,
I've tried the Pen you provided on Chrome 64 on Mac, and I didn't notice any particular problem.
I suggest you to add a minimum height to the images, otherwise they would be 0 pixel and be shown all at the same time. I did it on this fork of your Pen setting a min-height on the images, but the best way to do it would be the one I described in the section occupy vertical space and maintain ratio of the readme. If you don't feel like using the padding trick, you could also use a combination of CSS grid and SVG.
Let me know if this solves.
Thanks

Hey @verlok, I'm aware of the minimum height to occupy vertical space, but the problem for me, is that the callbacks are ignoring the threshold.
I've made this video, to better illustrate my side: https://d2ffutrenqvap3.cloudfront.net/items/072O3N3L1v0y0Z273L1J/threshold.mp4
Same thing happens in the pen you forked.

I'm having same problem.

Duplicate of #176

Hey @verlok , this is not the same issue as https://github.com/verlok/lazyload/issues/176...
They're both regarding the use of callbacks and threshold, but they are separate issues.


Include parameterNotFoundAction in Validating Admission Policy documentation

Description
This pull request updates the Kubernetes documentation for Validating Admission Policies to include details about the parameterNotFoundAction field in ValidatingAdmissionPolicyBinding.
Changes made:

Added a detailed explanation of the parameterNotFoundAction field to the paramRef section in validating-admission-policy.md, describing its purpose, allowed values (Allow and Deny), and behavior.
Updated YAML examples (binding-with-param.yaml and binding-with-param-prod.yaml) to include the parameterNotFoundAction field, ensuring consistency with the API requirements.
Clarified the importance of setting parameterNotFoundAction for policy bindings that use parameter resources.
Highlighted how the field interacts with scenarios where parameters are missing.

This change addresses the omission of parameterNotFoundAction from the documentation, which can lead to misconfigurations or confusion for users configuring admission policies.

@Lahoussine-Bouhmou Thanks you for your contribution.
Could you please sign the CLA before the PR can be reviewed.
You can follow the steps documented here: CLA Steps

/sig api-machinery

@dipesh-rawat
Thank you for the feedback! I've did these commits as requested:

Updated the note to use the shortcode.
Fixed the missing triple backticks in the code block.

Let me know if there's anything else to adjust!