Make Triggering Process Details Available To Actions

Background and Motivation
This (and another issue) came out of investigation for replacing some bespoke monitoring code with dotnet-monitor.  It's possible I missed some way to accomplish this that already exists.
We have a ton of processes we're monitoring, a number of which are spun up by ServiceFabric (or similar automated services), so our CollectionRules are numerous and relatively broad (just name matches).  We also have a number of tools which we want to run via Actions which need a PID or other details.
While we could probably hack something together with exact name matches or bespoke tools, ideally dotnet-monitor would make the details of the process (if any) triggering a CollectionRule available.
Proposed Feature
The exact names don't matter, but make something like $(Trigger.Process.Id), $(Trigger.Process.Name), and so on available in Actions.
Ideally everything allowed for Filters would be passed, if available, so PID, Name, and CommandLine.
Usage Examples
One of our collection rules would look something like:
{
  "AutomatedAnalysis": {
    "Filters": [
        {
            "Key": "ProcessName",
            "Value": "Our.Unique.Namespace",
            "MatchType": "Contains"
        }
    ],
    "Trigger": {
        "Type": "GCHeapSize",
        "Settings": {
            "GreaterThan": 15000,
            "SlidingWindowDuration": "00:00:05"
        }
    },
    "Actions": [
        {
            "Name": "Analyze",
            "Type": "Execute",
            "Settings": {
                "Path": "<path to analysis exe>",
                "Arguments": "-FocusProcessId \"$(Trigger.Process.Id)\" -ReportName \"$(Trigger.Process.Name)-$(Trigger.Process.Id).report\"
            },
            "WaitForCompletion": true
        }
    ]
}

Duplicate of #893, but better explanation of the usage.

These were added in 7.1 and 8.0 Preview 2 earlier this month. See https://github.com/dotnet/dotnet-monitor/blob/main/documentation/collectionrules/collectionrules.md#additional-token-substitution for documentation.


upd endpoint instead of serial

The air part communicates with the flight controller via serial, but the ground part communicates via udp or tcp socket. Is it possible to make it so that the udp port is specified as "master" arg, and preferably two - udp (server) and/or tcp (connect to ip: port)?

Everything is possible, make a PR with your changes


Normalisation of Enumerations

Describe the solution you'd like
Normalize enumerations to lower-case letters and whitespace to underscore

Fixed via #58


Potential memory leak

Describe the bug
This issue is very ambiguous and of lower urgency. I will keep updating every time I have more information.
This was first observed on OSG. This time, it is reproducible on midway2 and midway3. 45GB is NOT enough for processing 5hr long bkg run and 1hr long Kr83m run from raw_records to event_info_double, using 1 CPU for each job.
To Reproduce
Insert the MWE of how to reproduce the error
st.make(...)

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Versions
Tag: 2023.07.2

Sorry, are you processing directly from raw_records to event_info_double?

If we directly process from raw_records to event_info_double on purpose, you will need a large amount of memory. Because the plugins in the middle will be temporarily saved in memory.

Does it mean that all peaklets+merged_s2s+lone_hits will be staged in RAM instead of disk?
On Sep 6, 2023, at 1:48 PM, Dacheng Xu @.***> wrote:

If we directly process from raw_records to event_info_double on purpose, you will need a large amount of memory. Because the plugins in the middle will be temporarily saved in memory.
—
Reply to this email directly, view it on GitHubhttps://github.com/XENONnT/straxen/issues/1255#issuecomment-1708189420, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALG57ASRJLV5OAPUPVIPMIDXZBPH3ANCNFSM6AAAAAA4LIDUDM.
You are receiving this because you authored the thread.Message ID: @.***>

Does it mean that all peaklets+merged_s2s+lone_hits will be staged in RAM instead of disk? On Sep 6, 2023, at 1:48 PM, Dacheng Xu @.> wrote:  If we directly process from raw_records to event_info_double on purpose, you will need a large amount of memory. Because the plugins in the middle will be temporarily saved in memory. — Reply to this email directly, view it on GitHub<#1255 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALG57ASRJLV5OAPUPVIPMIDXZBPH3ANCNFSM6AAAAAA4LIDUDM. You are receiving this because you authored the thread.Message ID: @.>

Yes.


Cannot find name 'FetchEvent'

I encounter the following Error using sync-message:

4 export declare function isServiceWorkerRequest(request: FetchEvent | string): boolean;
                                                          ~~~~~~~~~~
  node_modules/typescript/lib/lib.dom.d.ts:13890:13
    13890 declare var TouchEvent: {
                      ~~~~~~~~~~
    'TouchEvent' is declared here.

I'll say immediately, that the Error is avoidable by putting "skipLibCheck": true in the tsconfig.json file.
Still, I'd like to explore different solutions.
This is my tsconfig.json:
{
  "compilerOptions": {
    "baseUrl": "",
    "downlevelIteration": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "importHelpers": true,
    "lib": [
      "es2016",
      "dom",
      "webworker"
    ],
    "mapRoot": "./",
    "module": "es2020",
    "moduleResolution": "node",
    "outDir": "../dist/out-tsc",
    "sourceMap": true,
    "target": "es2015",
    "strict": false,
    "noImplicitAny": false,
    "resolveJsonModule": true,
    "esModuleInterop": true,
    "skipLibCheck": true
  }
}

and my tsconfig.worker.json
{
  "extends": "./tsconfig.json",
  "compilerOptions": {
    "outDir": "./out-tsc/worker",
    "lib": [
      "es2018",
      "webworker"
    ],
    "types": [
      "node",
    ],
  },
  "include": [
    "src/**/*.worker.ts"
  ]
}

I am not sure how to fix the Error without skipping the Library Check.
The interface FetchEvent is defined in node_modules/typescript/lib/lib.webworker.d.ts .
Since the sync-message library is used in the main thread, I did believe that putting the "webworker" lib inside the tsconfig.json would solve it, but the Error still takes place.
On a semi-related note, pyodide throws a similar error.
Error: node_modules/pyodide/pyodide.d.ts:13:22 - error TS2304: Cannot find name 'HTMLCanvasElement'.

13  setCanvas2D(canvas: HTMLCanvasElement): void;
                        ~~~~~~~~~~~~~~~~~

Since HTMLCanvasElement is defined in the lib.dom.d.ts of typescript, but pyodide is being imported in my webworker. Naturally, HTMLCanvasElement is not recognized in the webworker.
Solving one issue would likely solve both these errors.

Here is a relating issue:
https://github.com/microsoft/TypeScript/issues/20595

I solved this problem by putting
declare global {
  export interface FetchEvent{}
}

somewhere in the code.
With that, I'll close the issue.


Refactor MerkleTreeGadget implementation

Description
There are two implementations of MerkleTreeGadget for RescueMerkleTree and RescueSparseMerkleTree that are equivalent except types they use. Recently a bug was found in the impl for RescueMerkleTree that affected also the other and only one was fixed.
This PR proposes a refactor to a common implementation for both types.

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

[x] Targeted PR against correct branch (main)
[ ] Linked to GitHub issue with discussion and accepted design OR have an explanation in the PR that describes this work.
[ ] Wrote unit tests
[x] Updated relevant documentation in the code
[x] Added a relevant changelog entry to the Pending section in CHANGELOG.md
[x] Re-reviewed Files changed in the GitHub PR explorer

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

There is still some work to be done in moving some tests around but I wanted first to check if you like the direction of the change.

There is still some work to be done in moving some tests around but I wanted first to check if you like the direction of the change.

Thanks very much for spotting this. It will be very helpful if you proceed ahead.
Much appreciated!

Ready for review :)

LGTM in general, minor comments above.
Also do you think it's better to rename sparse_merkle_tree.rs as universal_merkle_tree.rs?

@mrain addressed all comments :)


Add JWT Tokens expiration Date

I have created my own JWT Tokens and the payload contains an exp field. However, I have not implemented the JWT expiry mechanism. Maybe you can help to add a time check for the JWT and return an error if the current time has passed the expiration timestamp.

Hey, I would do like to do this one.

Hi @adzo261, Awesome! I will assign this issue to you. It would also be a great help if you could add some unit test cases for your functionality.  You can fork the project and get started! Happy Hacking! Do reach out if you need any help.

Hi @adzo261 , any progress on this issue?

Hi, I was lately busy with some personal commitments. I would finish it by this week.


Looks like impeller do not work as a expected;

Steps to reproduce
MacBook Pro 2020, Intel 5.
[✓] Flutter (Channel stable, 3.22.2, on macOS 14.5 23F79 darwin-x64, locale ru-BY)
• Flutter version 3.22.2 on channel stable at /Users/e/flutter_sdk/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 761747bfc5 (6 weeks ago), 2024-06-05 22:15:13 +0200
• Engine revision edd8546116
• Dart version 3.4.3
• DevTools version 2.34.3
Expected results
Default scrolls
Actual results
Unknown bug using impeller while scrolling or navigating.
Code sample
no code example just run on impeller on ios simulators
Screenshots or Video
https://github.com/user-attachments/assets/ea228503-f8b9-423c-a91c-7b29ec836d3c
Logs
Logs
[Paste your logs here]

Flutter Doctor output
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/e/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
✗ Android license status unknown.
Run flutter doctor --android-licenses to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15E204a
• CocoaPods version 1.15.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2022.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
[✓] VS Code (version 1.91.1)
• VS Code at /Users/e/Downloads/Visual Studio Code.app/Contents
• Flutter extension version 3.92.0
[✓] Connected device (4 available)
• Timur’s iPhone (mobile) • 00008101-001C24C81440001E            • ios            • iOS 17.5.1 21F90
• iPhone 15 Pro (mobile)  • F910194E-B4C8-4C49-B427-8B14F11AE6D4 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-4 (simulator)
• macOS (desktop)         • macos                                • darwin-x64     • macOS 14.5 23F79 darwin-x64
• Chrome (web)            • chrome                               • web-javascript • Google Chrome 126.0.6478.183
[!] Network resources
✗ A network error occurred while checking "https://maven.google.com/": Connection refused

Hi @Timur-hub21, this was reported in https://github.com/flutter/flutter/issues/148660 and has since been fixed. The fix for this should be available in stable 3.22.3 which was released a couple of days ago, see https://github.com/flutter/flutter/issues/148660#issuecomment-2237193254. Kindly upgrade to the new version of flutter stable.
I'll be closing this since it has already been fixed in the latest hotfix to flutter. If you still experience this on stable 3.22.3, kindly leave a comment below and I will reopen this.
Thank you


feat: DefaultGrpcClient(Options) cannot fail

This overload cannot fail, its return type should indicate that.

This change is

Argh, I forgot to say this is part of #4273


How to config MongoDB ReplicaSet on Mainflux?

I can't see guide config MongoDB ReplicaSet on Mainflux
Please help me.

@longlnk Mainflux is coming with helm chart, where you have deployed influx DB reader and writer out of the box, as we consider them as default (there is also nice Grafana integration for PoC's). So peoples can start using it very easily and very fast. There is no MongoDB setup, you have to do it yourself. Its not really complicated at all if you have any K8s experience.

@longlnk Mainflux is coming with helm chart, where you have deployed influx DB reader and writer out of the box, as we consider them as default (there is also nice Grafana integration for PoC's). So peoples can start using it very easily and very fast. There is no MongoDB setup, you have to do it yourself. Its not really complicated at all if you have any K8s experience.

My meaning is how connect to a MongoDB Replica Set, because I save the message out from mongodb-writer to Mongodb Replica Set
Example: mongodb://mongodb0.example.com:27017,mongodb1.example.com:27017,mongodb2.example.com:27017/?replicaSet=myRepl

MongoDB writer does not support Replica Set due to the way connection string is generated. It will attach prefix (mongodb://) and suffix (port) to your string, making it invalid.


Windows update - install loop

Looks like I´m getting into an install loop. As soon as an update is available the badge indicates that there is a new update available.

The Main log shows an exception during updating the state:
[2018-01-30 10:31:38.865] [main] [info] update#setState idle
[2018-01-30 10:32:08.871] [main] [info] update#setState checking for updates
[2018-01-30 10:32:09.944] [main] [info] update#setState downloading
[2018-01-30 10:32:09.955] [main] [info] update#setState downloaded
[2018-01-30 10:32:49.125] [main] [info] update#setState updating
[2018-01-30 10:34:30.988] [main] [info] update#setState ready
[2018-01-30 11:30:51.911] [main] [info] update#setState idle
[2018-01-30 11:31:21.955] [main] [info] update#setState checking for updates
[2018-01-30 11:31:23.079] [main] [info] update#setState downloading
[2018-01-30 11:31:48.278] [main] [info] update#setState downloaded
[2018-01-30 11:34:25.654] [main] [info] update#setState updating
[2018-01-30 11:35:26.964] [main] [info] update#setState ready
[2018-01-30 11:37:18.513] [main] [info] update#setState idle
[2018-01-30 11:37:48.517] [main] [info] update#setState checking for updates
[2018-01-30 11:37:49.621] [main] [info] update#setState downloading
[2018-01-30 11:37:49.642] [main] [info] update#setState downloaded
[2018-01-30 11:49:46.121] [main] [info] update#setState updating
[2018-01-30 11:50:33.132] [main] [error] [uncaught exception in main]: Error: Cannot read property 'indexOf' of null

TypeError: Cannot read property 'indexOf' of null
    at d (C:\Program Files\Microsoft VS Code Insiders\resources\app\out\vs\code\electron-main\main.js:155:770)
    at ChildProcess.<anonymous> (C:\Program Files\Microsoft VS Code Insiders\resources\app\out\vs\code\electron-main\main.js:156:599)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:194:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
[2018-01-30 11:50:33.132] [main] [error] Error: Cannot read property 'indexOf' of null

TypeError: Cannot read property 'indexOf' of null
    at d (C:\Program Files\Microsoft VS Code Insiders\resources\app\out\vs\code\electron-main\main.js:155:770)
    at ChildProcess.<anonymous> (C:\Program Files\Microsoft VS Code Insiders\resources\app\out\vs\code\electron-main\main.js:156:599)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:194:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
    at Timeout._onTimeout (C:\Program Files\Microsoft VS Code Insiders\resources\app\out\vs\code\electron-main\main.js:90:585)
    at ontimeout (timers.js:386:14)
    at tryOnTimeout (timers.js:250:5)
    at Timer.listOnTimeout (timers.js:214:5)
[2018-01-30 11:51:22.463] [main] [info] update#setState ready
[2018-01-30 11:53:20.028] [main] [info] update#setState idle
[2018-01-30 11:53:50.144] [main] [info] update#setState checking for updates
[2018-01-30 11:53:51.350] [main] [info] update#setState downloading
[2018-01-30 11:53:51.360] [main] [info] update#setState downloaded
[2018-01-30 11:54:01.909] [main] [info] update#setState updating
[2018-01-30 11:58:24.973] [main] [info] update#setState ready
[2018-01-30 11:59:19.331] [main] [info] update#setState idle
[2018-01-30 11:59:49.334] [main] [info] update#setState checking for updates
[2018-01-30 11:59:50.076] [main] [info] update#setState downloading
[2018-01-30 11:59:50.083] [main] [info] update#setState downloaded
[2018-01-30 12:00:07.427] [main] [info] update#setState updating
[2018-01-30 12:01:04.628] [main] [info] update#setState ready
[2018-01-30 12:01:22.783] [main] [info] update#setState idle
[2018-01-30 12:01:52.787] [main] [info] update#setState checking for updates
[2018-01-30 12:01:53.536] [main] [info] update#setState downloading
[2018-01-30 12:01:53.542] [main] [info] update#setState downloaded

We're enabling this only for insiders, so moving to February.

@egamma If update has been working fine for you, just mark it as verified.


CSV endpoints added to get reports via Email

Description: This PR adds endpoints for downloading the CSVs containing figures data along with edly-panel-app
JIRA: https://edlyio.atlassian.net/browse/EDLY-1939

Failing tests...


added Faroe Islands

Fixes #2959

@trescube @iandees do you guys know where this is here: http://results.openaddresses.io/?runs=all#runs

It might be missing because it never successfully ran?


feat(Pointer): rotate bezier pointer cursor to hit surface

Bezier Pointer base rotates to match normal direction of collision surface.

superseded by https://github.com/thestonefox/SteamVR_Unity_Toolkit/pull/553


explicitly set log level when adding any logger is ignored / depends on defaultDebugLevel [Swift]

Adding a logger as in the following example does not work as expected with 2.0.0-rc2
DDLog.addLogger(DDTTYLogger.sharedInstance(), withLevel: DDLogLevel.Info)
DDLogInfo("test")

Though the logger's level is set to .Info, there is no log output.
Setting the default log level global var makes the difference:
defaultDebugLevel = DDLogLevel.All // must be .Info at least to see the log output
DDLog.addLogger(DDTTYLogger.sharedInstance(), withLevel: DDLogLevel.Info)
DDLogInfo("test")

This sounds right to me. The global level must be set. The logger log level will only filter messages that pass the global level. The global level should be the most permissive of all the loggers' levels

I guess you are right. Just verified with CocoaLumberjack 1.9 and it also behaves the way you describe. I wrongly presumed that setting an explicit log level for a logger would overwrite the global default log level.

I think that logically it should work the other way around. Probably the problem is that there is no "use default" log level to ignore the logger level and fallback to the global level.

I think this is a very debatable subject :) (since obviously we can discuss about it). For me, the global level says which log statements are active and which are ignored. Meaning that if I set the global level to Info, I do not care about Debug or Verbose logs. Then the logger log level can help say a certain logger doesn't need all the logs that were set globally (i.e. a logger to a 3rd party like Crashlytics should not carry over Info logs, just Warn and Error).
I can also understand @rivera-ernesto 's statement.  Ideally, one should be able to set a certain logger to a more permissive level. i.e. global level to Info, but the file logger could set the level to Verbose and therefore include all the logs.
Going into the current implementation details, I'm not sure how to implement this. Right now, the global log level will prevent some logs (with the level greater than the global level) from being sent to the loggers.

@bpoplauschi Was there any resolution to this? Ideally i'd like to have something like this:
#ifdef DEBUG
static const int ddLogLevel = DDLogLevelVerbose;
#else
static const int ddLogLevel = DDLogLevelError;
#endif

So that the console log is clean in release builds....but to also have a verbose file logger. Am I understanding the last comment correctly that this is not possible?

@johnryan the code you posted should work as you expect, I use a similar approach.

@bpoplauschi that actually wasn't working...ended up having to do this:
in my .pch file so that logs wouldn't get filtered out in the macros.
static const int ddLogLevel = DDLogLevelVerbose;

then in my app delegate:
#ifdef DEBUG
static const int logLevel = DDLogLevelVerbose;
#else
static const int logLevel = DDLogLevelError;
#endif

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{

    [DDLog addLogger:[DDASLLogger sharedInstance] withLevel:logLevel];
    [DDLog addLogger:[DDTTYLogger sharedInstance] withLevel:logLevel];

    self.fileLogger = [[DDFileLogger alloc] init];
    self.fileLogger.rollingFrequency =  60 * 60 * 24; // 1 hour rolling
    self.fileLogger.logFileManager.maximumNumberOfLogFiles = 7;
    self.fileLogger.maximumFileSize = 384 * 1024; // 384K
    [self.fileLogger setLogFormatter:[[DDLogFileFormatterDefault alloc]init]];
    [DDLog addLogger:self.fileLogger withLevel:DDLogLevelVerbose];

    ...
}

You can just add this
#ifdef DEBUG
static const int logLevel = DDLogLevelVerbose;
#else
static const int logLevel = DDLogLevelError;
#endif

to the .pch

@bpoplauschi
Thats what I originally had, but that created the issue that Release builds wouldn't send DDLogVerbose logs to the file logger as they'd all be filtered out by the LOG_MAYBE macro.
Is that expected?

I think Release builds should not send the verbose logs, so for me is expected. You can decide to change that if you need them.

Ouch, I was just bitten by this. :-) I also would expect that logger level setting will override global level.


Is this project DEAD?

I don't see any activity happening around this project for more that a half of the year. There are also a bunch of pull requests, which are ready to be merged, but they are not. There are also numerous security issues, reported by users in issues and nobody looking into addressing those. Does all this project is dead?
If someone know any fork, which is alive, please leave link here - GitHub reporting 1007 forks of the project, so there is a chance some of them are in better shape than original project is.

Hello ava1ar,
I am the owner of this project. This project is not dead.
Since I want to keep the stability and functionality of SoftEther VPN, I need to review and test all patches submitted through Github or email. As my policy I have put the high priority on the stability and functionality than the rapidly merging of every submitted patches.
While I desire to perform them as soon as possible, my time to review them are very limited because this project is non-commercial and I have daily jobs to do in working days. Therefore, merging patches submitted from several contributors often needs some months especially when I am too busy.
As exceptions I respond to any critical vulnerabilities (e.g. privilege escalation or arbitrary code execution) as soon as possible which are reported through the security reporting email address. (the address is on the header of all source code files.)
Therefore, if you are in hurry to use some particular patches on the pull requests on this Github, you have three options:

Fork this project and apply patches to the destination project.
Apply patches to the local working directory to build your own binary.
Please be patient for next release.

Anyway it is very welcome that someone will have a forked project to maintain the "fast track" of SoftEther VPN, similar to fast track builds of Technical Preview of Windows 10.

well, on May 26 you asked me "one or two"
https://github.com/SoftEtherVPN/SoftEtherVPN/pull/229
I answered. and what happened ? nothing.
it would be really nice to hear something from you.
I beleive there was a reason os asking "one or two". And some action should happen after answer.
but it looks like project is rather dead. nothing happens. it is what people call "being dead"

dnobori,
I undestand your care about the stability and this is very important, but there is one thing, which is more important than stability - this is security. SoftEtherVPN is directly related to security and all security issues with the product should have super priority. But what I see instead - there are multiple reports about the security issues:
https://github.com/SoftEtherVPN/SoftEtherVPN/issues/120
https://github.com/SoftEtherVPN/SoftEtherVPN/issues/147
https://github.com/SoftEtherVPN/SoftEtherVPN/issues/179
and none of them are addressed within years! I.e. on Arch Linux I can't even build SoftEtherVPN without applying patches, since it already dropped SSLv3 support from its OpenSSL package. Also, due to luck of TLS 1.2 and SHA256 I can't connect to SoftEtherVPN using up-to-date OpenVPN client. I used to use SSTP for Windows client, but recently switched to Strongswan + IKEv2, since Strongswan supports certificate-based authentication.
When it first appeared in Open Source world, there was a lot of hope in community about this project, but now, years later almost no hope left. Is there any roadmap your are following to see what to expect in future? Will we get some usable interface for server administation from Linux? Will we get some usable Linux client? Will we get support for certificate authentication for non-EtherIP protocol?
Please don't get this post wrong - I am not blaming you or demanding anything right here and right now. I just want to say we as users and contributors need more clarify in project priorities and future in general. Jope you get my point.

Hello.
It is good that someone wrote this topic because I am worried about all good open source projects that one day will die leaving us with running apps on servers, desktops etc.
First read this article about patching bugs:
"lesson is that there needs to be more quality control on patches submitted through Github, because unfortunately there clearly is scope for a malicious actor to wreak havoc."
http://www.fionacoulter.com/blog/improving-quality-control/
this article is very popular by security researchers...
It is a cliché, but according to my knowledge every open source startup project ends when the person creating it is absorbed by commercial projects and there is no time for extra work. The same propably is with SE. As dnobori wrote he need to review and test all patches and issues that is time consuming. SO the question is what we can do together to push this project further.
@ava1ar thanks for sharing knowledge about LINUX problems. We are testing several platforms, virtualization, server setups etc. and from about 2-3 months we got problems to setup any OPENVPN connection (which was working earlier this year) to SE VPN from several distros (mainly CentOS, Debian and it's clones). We lost several hours and I think it is shame that Linux doesn't have stable SE support. (I will test Strongswan)
I don't think that server administration for Linux is essential because CLI is very good in SE and for me the most important is to have more CLI features and some sort of API support than another admin panel.

just donot die

I kinda gave up waiting for updates. There is sufficient information from all those tickets to fork your own high security build.
Things to update:
cipher_list entry needs to be updated to discard all insecure ciphers (most of them lol?)
Replace all those SSL_CTX_set_ssl_version calls with higher TLS versions in their arguments. No more SSLvn, low TLS, etc.
Things to watch out for:
Those proto SSL_CTX calls mentioned in some of the tickets are from OpenSSL 1.1. They won't compile if your linux distro is still using 1.0.1.
Going down this path will require full client and server recompiles. All the users will need their software updated.

What is currently the best maintained fork?

I believe your answer is "yes":

The "Issues" section is going to be closed at the end of the year, no replacement has been announced
The forums are filled with spam posts
Lots of PRs that haven't been acted upon.
Time, this is a very complicated project. I'm sure the author(s) are simply busy with other projects that help them pay the bills.

ava1ar,
#120 is not critical vulnerability. It is by design like a Windows security protocol on the CIFS includes the client computer's node information on the negotiation phase as the Windows server will log them on the security log, and so helpful to perfoem troubleshooting in the viewpoint of VPN server administrators in organizations. If there is a demand to change this client behavior it is very easy to disable it on the client side.
#147 and #179 is not critical vulnerability. Accepting SSLv3 by default is still necessary in this phase for backward compatibility since there are still users using SSLv3-only VPN clients in Japan. Also, any TLS-only VPN clients will never connect to the server in SSLv3 according my understand. Therefore virtually there are no practical threat on accepting SSLv3 in the present time. However, it is sure that disabling SSLv3 by default is important to enlighten users to do not use SSLv3. In fact, users using SSLv3 only clients are only in Japan. To balance both side of users, I need write some codes to decide the default behavior by the user's region or language, or ask the user to remain/disable SSLv3 at the installation point.

@baimafeima I didn't look. I merely built my own version using the source and following the responses to the tickets.
For us, we had to comply with PCI DSS 3.2. That meant that not even TLS 1.0 was allowed. The current release is coded to only attempt using TLS 1.0 when you disable SSLv3. So if you only recompiled the server to support TLS 1.2, the existing client will fail to connect. dnobori will basically need a have a new client version that steps through multiple protocol handshakes to handle backward compatibility while not falling over when connecting to higher security servers. I just didn't have the patience to do that and just tailored it to our requirements.

For the "Issues" forum:
Currently, this project has two duplicated forums: Issues and VPN Users Forum. The actual usage of both forums are very similar. It is very inefficient for users to seek for / post to both forums to ask questions or post feature requests.
The VPN Users Forum has been active before I created this GitHub repository. Spam posts are bothering. While there is a problem of spam posts, spams are periodically removed, and the forum has some anti-spam script features to avoid them as possible.

For the fundamental problem that this project seems very slow in a certain perspective:
My policy to merging pull requests in this repository was wrote in my above comment. The stability and backward compatibility deserves than promptly merging, except critical vulnerability. While I am making my effort to increase speeds, some people have dissatisfaction to my pace.
Therefore, there are two possibilities I'd like to suggest:

I will create a fast track (development, unstable) repository on GitHub.
The fast track repository will accept pull requests (roughly and promptly than the stable repository) with minimum security check.

Responsible volunteer (s) will create and own a forked repository for fast track. He (they) will manage it. I will announce that the new repository is SoftEther's official fast track repository. The new repository may inherit the "SoftEther" as the project name if he (they) decide it, or may change the name. He (they) will own the fast track project. I have no authority to manage the fast track project as a dictator.

In both choices, users can choose one of the two versions (stable or fast track). The difference between (1) and (2) is the responsibility and the redundancy. For redundancy and rapidness, I thought (2) is better than (1).
Also there might be other ideas here.
I'd like to discuss.

Thanks for the updates on our concerns @dnobori. Just my two cents on this. The forums are pretty clunky and difficult to use, search, and follow. GitHub has is much more welcoming and easier to use. To add to the usability, most users of free software that are willing to file bug reports already have a GitHub account or trust it to some extent. Maybe instead of general purpose forums that your team has to maintain, creating a subreddit might be more helpful. The purpose is not to move things around for convenience, but to hep make it easier and accessible for SE users to participate in a way that is productive and reduces the noise for everyone.
For the TLS related issues, I think the primary concern is administrative concerns. For example, telling the server to only use TLS, and then to see SSLv3 pop up in the cipher list is concerning. I, personally, would like to see more control over the cipher list, and simply receive a warning in the GUI or CLI about backward compatibility issues. A lot of us have to comply with certain regulatory issues or auditing bodies, and this would definitely help us deploy and champion the project.
Thanks again for your work in making sure that the project remains current and stable.

xortim,
Thank you for your comment. As you mentioned, I admit that the VPN Users Forum has a problem of comfort. The difficult problem is that I cannot rapidly respond to posted questions, troubleshooting requests and feature requests posted to Issues. A new solution for fundamentally reform is necessary as some people here are pointing out.
I would like to continue to discuss on this problem here to find a way to satisfy contributors and users.

dnobori,
While I can't necessarily help with the deep, code related issues with the project. I can, however, volunteer some time to help moderate a subreddit or forum, and assist with high-level usage related issues as time permits. I'm sure there are some other users that may be willing to pitch in, and help reduce the noise for you.

I think your fast track repository is a good solution to the problem. The biggest challenge is finding the right person or persons to take that on.
One suggestion is to start with option one (where you provide a development/unstable branch) and work with the top contributors on vetting an official forked project owner.

xortim,
Thank you for your comment. If we start with option (1), I'd like to integrate all history to the new repository. I don't know well about GitHub, so I'd like to be advised if the following steps are possible.

Create a new repository by forking from this repository.
(e.g. "SoftEtherVPN/SoftEtherVPNDev". Please suggest another good repository name,)
Integrate all posted issues and pull requests from this repository to the new repository.
(Is it possible?)
Add some volunteers/contributors (if there are appropriate people) to the member of the project so that they can easily review and accept pull requests.
For a certain time later, I will transfer the owner authority to the appropriate successor (s) on the SoftEtherVPNDev repository (if there are appropriate successors).

to dnorbori, and contributors:
I have used OpenVPN for the last couple of years as it met my needs at the time. I stumbled across this project a couple of days ago and tested it out on my home lab.  It is a very cool project, and it seems to work very well, and is very fast.  I am glad to read it is not dead, and is still being worked on.
I compiled under Ubuntu 16.04 LTS w/ OpenSSL 1.0.x with the pull from #208.  I am somewhat green to programming but know enough to be dangerous. I was hoping I could force TLS 1.2 connections only, but was unable to achieve that goal. Once I enforced TLS and disabled SSL V2, V3, and TLS 1, and 1.1, I could no longer connect with the client or GUI server manager under windows.
I look forward to seeing this project move forward however, more specifically, support for a TLS 1.2 only option for both server/client. Keep up the great work.

@cr9c1 Your mistake is that you only did a compile for the server version. The clients connect only with TLS 1.0, so you need to compile that same code under Windows to get new versions of the client and GUI.
If your current VPN client (NOT the VPN Server GUI) throws an error about protocol when connecting to your version of the Server, you are on the right path.

@SplatterPaw  Thanks -- I figured that may be the case. I had actually set out to take the same code to my visual studio machine, but I'm running 2015 Community and it didn't play well with it at all.  Are you saying if I successfully compile the same code under VS 2008 that I did under Linux, it'll spit out some TLS 1.2 windows clients that will work?

Yes, you will need VS2008 and the required service packs as per the build instructions.
Both server and client codebases uses that Mayaqua/Network.c (assuming that is what you have changed).

I changed all the files from #208 yes.  Thanks for the heads up, I'll give that a go and see how I fare.

I got it all compiled under VS2008/SP1 but still no go, will not connect to server with SSLV2/3, and TSLv1/v1.1 disabled on the server end, error code 2, protocol error.I appreciate the assistance you offered, though. It was worth a shot.

These are the changes I made for TLS. Pls match them up with the existing code before making the changes:
function -> *NewSslPipe
// Create a new SSL pipe
SSL_PIPE *NewSslPipe(bool server_mode, X *x, K *k, DH_CTX *dh)
{
	SSL_PIPE *s;
	SSL *ssl;
	SSL_CTX *ssl_ctx = NewSSLCtx(server_mode);

	Lock(openssl_lock);
	{
		if (server_mode)
		{
			SSL_CTX_set_ssl_version(ssl_ctx, TLSv1_2_server_method());

			AddChainSslCertOnDirectory(ssl_ctx);

			if (dh != NULL)
			{
				SSL_CTX_set_tmp_dh(ssl_ctx, dh->dh);
			}
		}
		else
		{
			SSL_CTX_set_ssl_version(ssl_ctx, TLSv1_2_client_method());
		}

Make sure you used the right arguments for the right sections.
function -> StartSSLEx
/*
			if (sock->AcceptOnlyTls == false)
			{
				SSL_CTX_set_ssl_version(ssl_ctx, SSLv23_method());
			}
			else
			{
				SSL_CTX_set_ssl_version(ssl_ctx, TLSv1_method());
			}
*/
			SSL_CTX_set_ssl_version(ssl_ctx, TLSv1_2_server_method());

			Unlock(openssl_lock);
			AddChainSslCertOnDirectory(ssl_ctx);
			Lock(openssl_lock);
		}
		else
		{
/*
			if (client_tls == false)
			{
				SSL_CTX_set_ssl_version(ssl_ctx, SSLv3_method());
			}
			else
			{
				SSL_CTX_set_ssl_version(ssl_ctx, TLSv1_2_client_method());
			}
*/
			SSL_CTX_set_ssl_version(ssl_ctx, TLSv1_2_client_method());
		}

In this part I am ignoring the checks and enforcing fixed restrictions.

Worked perfect, verified with a packet capture as well. Thanks so much!

hi cr9c1,
can you share your builds and your code?
thanks

@maurerr The only changes I made were the changes proposed by @SplatterPaw
Aside from that, I also found a patch to add the ECDHE ciphers, and the build I'm working on right now currently has TLS v1.2 only, and ECDHE-RSA-AES256-GCM-SHA384 as the only cipher.  I'm still figuring github out but if you want what I've got in the meantime, I can try to get it to you. I've got another patch I found to fix a memory leak with SSL I have yet to apply, but if you want I can email you what I've got so far, just let me know what you want (until I figure out how use this to upload code changes/differences/etc.

zip archive with source code for linux would be fine - i can built my own bin from there.
but i havn't worked with vs2008 so i would need your windows binary build if you can post it.
thanks

I can do that. let me apply the SSL memleak patch real quick and build it and I'll see if I can get the zip archive uploaded of the linux source and the windows binaries.

@maurerr Try https://github.com/cr9c1/softether-4.21.9613-tls1.2-ecdhe
The windows binaries are under releases/pre-release, source code is there as well. I think I did it right, anyhow.

Dear dnobori, xortim  and others.
First of all dnobori, thanks for all your efforts. This is truly an amazing project and it looks like you've been doing a lot of heavy lifting by yourself, so thank you very much.
First of all, I think there should be a wider discussion on whether to go with option (1) or (2) and invite those who contribute or are willing to contribute.
Same question goes for the issues/vpnusers. Why use subreddit? There are much better options like gitter, stackoverflow clones, simple email list, etc.. You get my point
All I'm trying to say is please take some time consider all options and involve many people that can bring something to the table, as these decisions will affect us as users/contributors for years to come. Most importantly, if planned right, this project will sky rocket and will benefit millions of users

Seems like this project needs some trusted people who can accept PRs to a testing repo and work on a roadmap for the work that really needs to be done. I came across SoftEther while looking for an easier ad-hoc solution than OpenVPN, and it looks really great, but I'm not thrilled about the idea of implementing my security layer in something that takes a long time to get issues fixed. I could see this becoming very widely used if the workflow can be got right.

@dnobori @ava1ar @chipitsine @cenobitz @aicochow Hello There!. Regarding the issue of forum of SE, I've created this forum https://seswan.com for that purpose and because I had, like many of you, disappointed things about it. Anyway, you are invited to support me with this forum and I can dedicated a good time for the maintenance of it. Let's give it a try! and enhance and improve the quality of the forum that is intended to server people who cares about SoftEther project!

@cr9c1 You sure your ECDHE ciphers are working? I am not sure if the TLS code in SoftEther has Ephemeral Key Support.

Yeah, I'm sure.  At least, according to a wireshark packet sniff and Firefox, they're working.

Today I reviewed and merged following pull requests and released the new version (SoftEther VPN 4.22 Build 9634). The other pull requests will be reviewed as soon as possible.
Also, as the first step of reformation, I am willing divide this project into two repository: stable and development. On the stable repository, I will be the single administrator so far. On the development repository, I will call for administrators who will have the authority to accept pull requests from contributors.
https://github.com/SoftEtherVPN/SoftEtherVPN/pull/85
https://github.com/SoftEtherVPN/SoftEtherVPN/pull/96
https://github.com/SoftEtherVPN/SoftEtherVPN/pull/107
https://github.com/SoftEtherVPN/SoftEtherVPN/pull/127
https://github.com/SoftEtherVPN/SoftEtherVPN/pull/128
https://github.com/SoftEtherVPN/SoftEtherVPN/pull/133
https://github.com/SoftEtherVPN/SoftEtherVPN/pull/165
https://github.com/SoftEtherVPN/SoftEtherVPN/pull/178
https://github.com/SoftEtherVPN/SoftEtherVPN/pull/180
https://github.com/SoftEtherVPN/SoftEtherVPN/pull/184
https://github.com/SoftEtherVPN/SoftEtherVPN/pull/189
https://github.com/SoftEtherVPN/SoftEtherVPN/pull/204
https://github.com/SoftEtherVPN/SoftEtherVPN/pull/208
https://github.com/SoftEtherVPN/SoftEtherVPN/pull/217
https://github.com/SoftEtherVPN/SoftEtherVPN/pull/229
https://github.com/SoftEtherVPN/SoftEtherVPN/pull/231
https://github.com/SoftEtherVPN/SoftEtherVPN/pull/232
https://github.com/SoftEtherVPN/SoftEtherVPN/pull/241
https://github.com/SoftEtherVPN/SoftEtherVPN/pull/248

why dividing into 2 repositories ?
fast-track might be git branch, for example

The reason is because I am not familier with Git.

It could help to understand the Gitflow Workflow - https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow

Thank you. It could be great. But still I think dividing into two repositories would make it simple, avoiding problems, due to my Git skill.

Nobori san,
two branches master and devel is optimal way to achieve the outcome.  I do
not wish to track a second repository, and merging later will be more
difficult.
On 29 November 2016 at 17:14, Daiyuu Nobori<EMAIL_ADDRESS>wrote:

Thank you. It could be great. But still I think dividing into two
repositories would make it simple, avoiding problems, due to my Git skill.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/SoftEtherVPN/SoftEtherVPN/issues/268#issuecomment-263752957,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AARer7KsWFMcR7sDiKHrt6auj7UlgLrIks5rDM3ZgaJpZM4KqeJA
.

Then it would be nice that I am going to fork this repository into a new second repository "SoftEtherVPN_Stable", and after that, use this current repository "SoftEtherVPN" as the primary development repository. All of this Issues forum and current pending pull requests will continue on the "SoftEtherVPN" repository.
The "SoftEtherVPN" repository will have appropriate committers other than myself, and will have more lightweight policy to accept pull requests and further modification. The goal is to make "SoftEtherVPN" having democratic management.
The "SoftEtherVPN_Stable" repository will have only single committer (myself), and will merge patches from the "SoftEtherVPN" manually only when I decide to do so.
Any comments are very welcome.

@dnobori , I think many people here can volunteer in maintaing git branches and help you with git flows. for example, I can.
I think it is good idea to move such activity to community

Thank you, but I would like to divide the project into two repositories, like Fedora and RHEL. In this example, Fedora is the "SoftEtherVPN" repository. RHEL is the "SoftEtherVPN_Stable" repository. In other words, the stable repository is like a Long-Term Service Branch. "SoftEtherVPN_Stable" is the slow track build, and will be a conservative branch. In this purpose I think it is better to make an isolated "SoftEtherVPN_Stable" branch in GitHub rather than using branches in the single repository.

In the above analogy, I'd like to move the activity for Fedora to the community, and would like to handle RHEL by myself. Users can individually choose one from the two forks. Most users will use the fast track builds, but small number of users (e.g. enterprise users) will prefer to use the stable and conservative builds. To fulfill both demands, it would be better that I will have the sole responsibility to ensure the integrity of the conservative build.

@dnobori  this is not a bad idea, especially if you want to be the sole maintainer of the stable repo, since github doesn't allow to assign maintainers to one branch only, but to the whole repo.
One issue that everyone should think of about the 2 repo solution is the issue tracker. People will probably submit the same issue twice and we need to come up with a solution that this does not happen (or minimize it)

Solution: Disable opening issues in the stable repo, only open issues on the development repo. Issues would be opened in the development repo. Then a fixed in the development repo, then a patch applied on the stable repo (or cherry-pick). The development repo can have a branch that tracks the stable repo to ease preparation of the patch.

Hmm. This could work, but what about errors that are in the stable repo but not in the dev repo. This could happen since patches will be applied here and there, so the code is not 100% identical.
I'm just trying to cover the bad scenarios here

@moatazelmasry2 The dev repo would have a branch that is tracking the stable repo's main release branch, so people would just open issues there and say what version they were using like any other bug.

Thank you for comments. I am considering to do the following things:

Create a new conservative repository named "SoftEtherVPN_Legacy" (this name is better than "SoftEther_Stable".)

I will be the sole maintainer of "SoftEtherVPN_Legacy".
I will import new feature from "SoftEtherVPN" to "SoftEtherVPN_Legacy" manually by my decision.
I will import bug fixes from "SoftEtherVPN" to "SoftEtherVPN_Legacy" manually as soon as possible.
The "Issues" and the "Pull Requests" will be hidden on the "SoftEtherVPN_Legacy" repository.

Keep this current "SoftEtherVPN" repository without changing the repository name (to avoid confuse users by changing the URL.)

I will add some maintainers to this repository.
I will also be one of the maintainers.
Some delegated maintainers will have authority to control the source code, including accepting Pull Requests.

For the official binary download site http://www.softether-download.com/,  my idea is:
I will add two dropdown items "SoftEther VPN (Legacy)" and "SoftEther VPN (Modern)" on the top page.
I will share the credential to upload new binary files on this download site to some trusted maintainers.
Maintainers will be able to upload new builds to the download site.
Maintainers will have the credential to edit https://www.softether.org/ in real-time.

Legacy seems like it will be retired at some point leaving only the other repository - I definitely prefer Stable or Long Term Support, or even Enterprise, though that tends to imply extra features. The current repo seems like it could be labelled Testing, Development or Unstable.
There are precedents for this kind of naming, particularly with Debian: https://www.debian.org/releases/.

Probably, Long Term Support sounds good. In this case the name will be "SoftEther_LongTerm".

I suppose that the current repository should not labeled "Testing" or "Unstable". The current repository itself will have some branches, and "Testing" or "Unstable" should be roles of some branches (not entire the repository.) Then labeling "Development" on the current branch is very appropriate in my sense.

Master is normally considered development. This is the norm with say the
Linux kernel. I agree a stable or release branch for the non-dev tree would
also mimic the norm in other projects.
-Joel / @aenertia
On 30 November 2016 at 10:49, Daiyuu Nobori<EMAIL_ADDRESS>wrote:

I suppose that the current repository should not labeled "Testing" or
"Unstable". The current repository itself will have some branches, and
"Testing" or "Unstable" should be roles of some branches (not entire the
repository.) Then labeling "Development" on the current branch is very
appropriate in my sense.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/SoftEtherVPN/SoftEtherVPN/issues/268#issuecomment-263958905,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AARer3ifbBQseOqcQRuL_6RAUi8mMXU3ks5rDcUmgaJpZM4KqeJA
.

Are there any updates on this issue? Should there be a vote or a decision soon? An unstable/test/development repo will really help push this project forward

I'd like to point this out.  I kinda feel Github Issues is the better way to go.  Just sayin' :P

I have to say that this conversation has been great and also think that seeking advice from the Debian community way of doing things is a good idea. Let us just not get stuck on the precise wording as picking none or any for the two branches/repositories leaves the need for explaining the situation.
In Debian terms a release is always stable, so everything with a version number has to be stable. The newest (highest number) version is also supported, removing the need for a specific supported release. Testing for the next version is on-going and has no numbering although if one feels the need for such it could be latest stable + 1.
Overall though these are very different kinds of projects and I feel that a singular (single use case) piece of software does not need to be as strict as Linux distribution and these kinds of labeling efforts can be approached a little more lightheartedly. Except for the piece considered stable for which I kind of like the term "Robust"  as the term implies it is not easily penetrated.

Is there any update on the progress of a 'fork' of this project?

SoftEther is easily thwarted nowadays by DPI and throttling and fingerprint of unique SSL handshake. And especially UDP acceleration packet drop is used to disrupt SoftEther by letting first few packets and then dropping random packets (30-50% packet loss). It needs integration with KCP on UDP acceleration side, also it needs ability to set and change UDP acceleration port ranges (port range targeted and dropped by ISPs).
Also needed is built-in traffic obfuscation (for both tcp and also udp packets) to scramble packets using different methods (maybe integrate pluggable transports) or emulating HTTP packet to beat traffic shaping against long https sessions.
It is sorely in need of modernization.

This post is referenced here: https://opensource.com/open-organization/17/4/open-leadership-softether

That's an interesting article and expresses the problem very clearly, unfortunately it offers no solutions. What can be done to move to a more dynamic model of development that will protect the life of the project and enhance the stability, reliability and security of the project?

This is such an interesting project that should stay alive as the ultimate alternative VPN solution. I am so sold that I have deployed this in production and boys, no regret. My only concern is the lack of clear sight sustainability of this project with Daiyuu Nobori  being the only driver. And also there no information about the project roadmap anywhere on the official website nor on any forum.
@dnobori, can you offer us some update on this concern.
Cheers

I'm sorry for my late response for the planning to fork this repository.
Because of my lack of capacity, my response to pull requests for this repository has been delayed frequently.
To solve this problem, I'd like to call three (or more) new development board members.
I posted the following thread. Please kindly read the self nomination process if interested.
https://github.com/SoftEtherVPN/SoftEtherVPN/issues/341

That's fantastic news, I look forward to this project moving ahead - thanks for the update. :)
Unfortunately I'm not a developer so I can't do much in that area, any chance we could get some movement for the forums getting cleaned-up from all the spam/spammers on there?

https://github.com/SoftEtherVPN/SoftEtherVPN/issues/341

https://github.com/SoftEtherVPN/SoftEtherVPN/issues/341
New maintainer needed

I think that this issue can now be closed.


Version 5.1

Fixes: #1559

[x] File ./package/version has been bumped to NEW_MAJOR.NEW_MINOR.0, and ./package/version.sh sub has been invoked.
[x] CHANGELOG.md has been updated with new features.
[x] krun help script is correctly reflecting the available options
[x] All *Options.java files are up-to-date.
[x] K active projects page is up-to-date (receiving commits in the last 3 months).
[x] Audit of warnings in regression test-suite and tutorial.
[x] Audit package dependencies in package/.

To "Audit warnings/errors", I just grepped for [Warning] and [Error] in the test-suites and checked that each occurence made sense for the test.
To "Audit package depnedencies", I:

organized/sorted the lists of package dependencies in each package,
changed from using lib*-dev packages on debian-based distros to the proper lib*-NNN packages, and
quickly scanned through for anything obvious that could be removed (didn't find anything).

Evidence this works: https://office.runtimeverification.com/jenkins/blue/organizations/jenkins/k/detail/PR-1921/11/pipeline/

Nope, didn't end up removing any dependencies, just re-ordered and tried to change some lib*-dev to lib*NNN, but turns it it didn't work for those ones.


master -> live

Docs Build status updates of commit d03d41d:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/TOC.md
:white_check_mark:Succeeded
View

docs/concepts/package-installation-process.md
:white_check_mark:Succeeded
View

docs/create-packages/Symbol-Packages-snupkg.md
:white_check_mark:Succeeded
View

docs/create-packages/set-package-type.md
:white_check_mark:Succeeded
View

docs/docfx.json
:white_check_mark:Succeeded

docs/index.md
:white_check_mark:Succeeded

docs/index.yml
:white_check_mark:Succeeded
View

docs/reference/cli-reference/cli-ref-install.md
:white_check_mark:Succeeded
View

docs/reference/cli-reference/cli-ref-long-path.md
:white_check_mark:Succeeded
View

docs/reference/msbuild-targets.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


wifi retry mechanism

Haseena patched this to make it work on amlogic, the wifi plugin gets activater later there.
Let me ask her to comment

isn't it better to listen for Wifi plugin activation then? versus checking again with a retry timeout?

Please see:
https://github.com/mlapps/com.metrological.app.RDKSplash/commit/073b0c15138e06d1528274665f04e763eb541b6d
I think that will work for this case as well. On wifi control notification, we recheck the plugins state and recheck the state of the connection.
Made part of https://github.com/mlapps/com.metrological.app.RDKSplash/pull/5

Thanks @wouterlucas, that changes are fine for me

Sure thing, thanks for confirming Haseena!


Fire event on Scroll end of the app screen

Hi, I want to fire an event on scroll end of the app screen. I have a list of component and at the end of the scroll end, I want to fire an event to add more data to that list. I tried with content onScroll event. But it doesn't seem to work. Is there any better way to detect scroll end of the screen?

https://stackoverflow.com/questions/50981737/fire-an-event-on-scrollend-of-the-screen

https://github.com/GeekyAnts/NativeBase/issues/1168#issuecomment-328489168

@rbsl-yasmin try something like this
Code
import React, { Component } from 'react';
import { Container, Header, Content, Text } from 'native-base';

export default class App extends Component {

  isCloseToBottom = ({ layoutMeasurement, contentOffset, contentSize }) => {
    return layoutMeasurement.height + contentOffset.y >= contentSize.height - 1;
  };

  render() {
    return (
      <Container>
        <Header />
        <Content
          onScroll={({ nativeEvent }) => {
            if (this.isCloseToBottom(nativeEvent)) {
              console.warn("Reached end of page");
            }
          }}>
          <Text style={{ padding: 20 }}>Test</Text>
          <Text style={{ padding: 20, }}>Test</Text>
           ...
           ...
        </Content>
      </Container>
    );
  }
}

Gif

@akhil-geekyants Your solution is working. But as I saw in the src code native base list component is building on ListVIew of react native. so why onendreached and onendreachedthreshold is not working when I use these function with the List component of native base ?

@rbsl-yasmin NativeBase List is deprecated. Use React Native FlatList instead.

@rbsl-yasmin Any update?

I am using the same code but no success.
<Container>
            <Header />
            <Content
                onScroll={({ nativeEvent }) => {
                    console.log("in scroll");
                    console.log(this);
                    if (this.isCloseToBottom(nativeEvent)) {
                        console.log("Reached end of page");
                    }
                }}
                scrollEventThrottle = {1000}
                style={{paddingLeft: PADDING_XS, paddingRight: PADDING_XS}}
            >
                <UpdateScreen projectDetails = { JSON.parse(navigation.getParam('details')) </UpdateScreen>
            </Content>
        </Container>

onScroll function is not getting called.
native-base: 2.8.1
react-native: 0.57.1

Hi, i managed to fire a console.warn event upon end reached in a scrollview, but it fires twice in the console, and i am trying to achieve cleartimeout/clearinterval when scrollview reach end. So i think both the clear functions fire twice as well resulting in misbehave of app after resetting the timeout and intervals. Any idea why it fires twice or how to ensure it doesnt fire multiple times? thank you

Same as @tarun29061990 , the onScroll function on <Content> is not getting called

Any update ?


Save connection details as GlobalSettings

Server URL, Server Port, and SlotName will be saved as GlobalSettings.
Also adjusts OnLoadLocal to noop if SlotName is empty.  For a real save,
this will never be the case -- but apparently OnLoadLocal is also called
for the menu and in other cases which was causing the restored global
settings to be consistently overridden with their defaults.
Compatible with #60, but does not require it.  Related issue #45

This breaks eventual slot reconnect as local settings are used per save slot. Saving them globally would break Slot #1 if someone uses Slot #2 for AP as well. I am unsure that merging this is best.

They remain saved as local settings as well, so loading any save would overwrite the global settings (and effectively reset them to whatever was in that save file.)
In fact, I spent entirely too long troubleshooting before discovering that OnLoadLocal was being called before a save was loaded before the main menu, so it was consistently overwriting the global settings.


install error - missing HTTParty

script/rails g wepay_rails:install
/Library/Ruby/Gems/1.8/gems/aws-s3-0.6.2/lib/aws/s3/extensions.rb:206:in `const_missing': uninitialized constant WepayRails::Payments::Gateway::HTTParty (NameError)
from /Library/Ruby/Gems/1.8/gems/wepay-rails-2.1.0/lib/wepay-rails.rb:36
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:68:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:68:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:66:in `each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:66:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:55:in `each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.15/lib/bundler/runtime.rb:55:in `require'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.15/lib/bundler.rb:120:in `require'

I tried adding httparty to the gemfile and that didn't help.
Not sure what the issue is... I'm running Ruby 1.8.7 and Rails 3.0.9

Thanks for reporting this. Can you do me a HUGE favor and add:
require 'httparty'
to the top of your lib / wepay-rails.rb file in your gems directory?
Let me know if that works - if so, I will add the require to the code and patch it.

Thanks for the fast response! That did it!

You got it buddy! Thanks for turning in the bug. I'll add the line and push a patch tonight.

added require at the top of wepay-rails.rb. Marking as fixed.


Wrong API version on Azure endpoint?

Hi when I request the API I get the following response:
:uri https://bali.openai.azure.com/openai/deployments/gpt-4-0613/chat/completions?api-version=2023-12-01-preview, :content-type-params {}, :version :http-1.1, :body {"error":{"code":"401","message":"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}}}
; Caught an exception during OpenAI API call: Interceptor Exception: status: 401

I compared the two strings and the only difference is the API version:
Used by the API:
https://bali.openai.azure.com/openai/deployments/gpt-4-0613/chat/completions?api-version=2023-12-01-preview
Provided by azure:
https://bali.openai.azure.com/openai/deployments/gpt-4-0613/chat/completions?api-version=2023-03-15-preview
What am I missing? Here's the code:
response (api/create-chat-completion
                          {:messages [{:role "user" :content dynamic-message}]
                           :temperature 0.8
                           :max_tokens 4096
                           :top_p 1
                           :model "gpt-4-0613"
                           :frequency_penalty 0.0
                           :presence_penalty 0.0}
                          {:impl :azure
                           :api-key api-key
                           :api-endpoint api-endpoint})

I found where it is set in the code but I'm too new to know how to proceed :)
(azure.clj)
(defn patch-params [params]
{:api-version "2023-12-01-preview"
:deployment-id (:model params)
:martian.core/body (dissoc params :model)})

Yes works perfectly thank you, I'm sorry I missed this! Appreciate the help 🙏


conformance: add option to annotate Namespaces

What this PR does / why we need it:
Adds the option to annotate Namespaces created by the conformance tests.
What type of PR is this?
/kind feature
Does this PR introduce a user-facing change?:

NONE

Added in https://github.com/kubernetes-sigs/gateway-api/pull/1101


WIP: Update api

What does this implement/fix?

Does this close any currently open issues?

Explain your solution

Any other comments?

I have no plans to update this now. Closing it


Meson definitions for 1.10.0

I assume you have to create the new 1.10.0 branch. Thanks!

Thank you for contributing!


Move to dotnet 5.0

The reasoning is pretty clear: a move to dotnet 5.0/dotnet core allows for the programming to be multiplatform.

(CI Fails because the appveyor VS 2017 image doesn't contain .NET core at all afaik)

(CI Fails because the appveyor VS 2017 image doesn't contain .NET core at all afaik)


Update powerbi-implementation-planning-auditing-monitoring-overview.md

Change Power BI release plan reference to Fabric's.

@denglishbi , can you review the suggested change and accept or reject? Thanks!

#sign-off


Make plugin loading clear

Nowadays plugin loading is kind of "magic" that's hidden deep inside the code of verdaccio.
Plugin installation (especially in dockerized env) does not work. If you install plugin globally verdaccio doesn't see it. If you try to install it into verdaccio folder for some reason after that it couldn't load lodash, express, etc.
Also it's not possible or rather hard to load some forked plugin.
Proposition:
Make a config section where plugins can be directly configured with path to them, etc.

Hi @SkeKKLa,
What exactly do you mean with the following?

Make a config section where plugins can be directly configured with path to them, etc.

Hi @SkeLLLa,
What exactly do you mean with the following?

Make a config section where plugins can be directly configured with path to them, etc.

I'm also curious to know which issues are you facing using plugins with Docker images. However, we have working examples here https://github.com/verdaccio/docker-examples

@DanielRuf I mean to have some kind of dictionary where users can specify what plugins they want to load and from where to load them.
For example, let's say I've added some customization into some existing verdaccio plugin (verdaccio-audit for example). And I've decided to name it foobar. So what I'm talking about is:
{
  plugins: [
    {name: 'verdaccio-audit': dir: '/home/user/foobar'}
  }
}

So here we'll load some code from /home/user/foobar directory and use it as 'verdaccio-audit' module.
Also if for some reason we have some other plugins in node_modules or elsewhere verdaccio will not use them, until they will be specified in plugins section.
@juanpicado There's only one way when all's up and running. So when you're using basic docker image of verdaccio you'll need:

Install dev dependencies via npm i.
Install plugins only to verdaccio working directroy. (e.g. npm i verdaccio-audit). Global installation, installing into/verdaccio/plugins directory doesn't work.
Afterwards run npm run code:docker-build again. Elsewere you'll get a lot of weird module not found errors.
Optionally remove dev dependencies npm prune production.

Install plugins only to verdaccio working directroy. (e.g. npm i verdaccio-audit). Global installation doesn't work., installing into/verdaccio/plugins directory may not work in some cases.

Thanks for the reply, but I'm still confused about the reason of this request, does the following example does not work for you?
// Dockerfile
FROM verdaccio/verdaccio:3

RUN npm i && npm install verdaccio-xxx-plugin-xxx-name

That extends the base image and you are able to install globally other packages.
Why modify the verdaccio Dockerfile  directly? 🤔 I'd be great to know more about your approach.


No ads showing in AdMobBanner

I have the following versions installed:

React Native: 0.52.0
react-native-admob: 2.0.0-beta.4

When I try to display an AdMobBanner, it does not show any ads. I do get to see the following error (on iOS): "Error: Request Error: A network error occurred". However, the device has a working internet connection, so I don't see what could be wrong there. My AdMobBanner code is as follows:
<AdMobBanner
    adSize={"smartBannerPortrait"}
    testDevices={[AdMobBanner.simulatorId]}
    adUnitID={ADMOB_UNIT_ID}
    onAdFailedToLoad={error => console.log(error)}
/>

The issue is happening on both iOS (simulator and real device) and Android (only tested on a real device). Any idea what could be the reason for the error I'm seeing?
Edit: on Android the exact error message is: "Error: The ad request was unsuccessful due to network connectivity.". Again, the device itself has no connectivity issues as it can successfully retrieve other information in the app from the internet.

what was the issue? I am experiencing the same issue :(

@LandDragoon did you find the solution I m also getting same issue ?

I am experiencing the same issue :(


Syncing Published with Master

Proposed changes

Unreleased project version (optional)

Related issues (optional)

Deploy preview for docsdocker ready!
Built with commit 094d94f7ef7d1c0ab80550396a7c5a199decd761
https://deploy-preview-9827--docsdocker.netlify.com


The intercom adapter does not load the Intercom API correctly

The intercom adapter does not always load the Intercom API correctly as it's dependent on window.load.

At the end of this line the Intercom JS snippet depends on window load/onload. However, when the adapter is initialized this event has already been triggered.
We should be able to replace that if block with a single call to l().


Firebase_Auth Example for Google Signin target Macos give MissingPluginException

Bug report
The example at: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_auth/firebase_auth/example/lib
gives the following error when using the Google Login option:
flutter: MissingPluginException(No implementation found for method init on channel plugins.flutter.io/google_sign_in)
Steps to reproduce
Steps to reproduce the behavior:

Create a project in Android Studio and create a Macos project using:
flutter create --platforms=windows,macos,linux .
Create credentials using Firebase console, as described, and install plist in xcode
Build and run for macOS
Select Google Login

Expected behavior
I expect the example to work.
Sample project
I'm attaching the dart and  pubspec.yaml files
Additional context
Add any other context about the problem here.

Flutter doctor
Run flutter doctor and paste the output below:
Click To Expand
doctor --verbose
[✓] Flutter (Channel master, 2.3.0-2.0.pre.147, on macOS 11.2.3 20D91 darwin-x64, locale en-US)
    • Flutter version 2.3.0-2.0.pre.147 at /Users/rudyfoldenMBP/Developer/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 7d46d43635 (2 hours ago), 2021-05-12 18:59:02 +0200
    • Engine revision f3847febb2
    • Dart version 2.14.0 (build 2.14.0-108.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/rudyfoldenMBP/Library/Android/sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.5, Build version 12E262
    • CocoaPods version 1.10.1

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.54.3)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.20.0

[✓] Connected device (1 available)
    • macOS (desktop) • macos • darwin-x64 • macOS 11.2.3 20D91 darwin-x64

• No issues found!
Process finished with exit code 0

Flutter dependencies
Run flutter pub deps -- --style=compact and paste the output below:
Click To Expand
Changing current working directory to: /Users/rudyfoldenMBP/AndroidStudioProjects/firebase_authtest
Dart SDK 2.14.0-108.0.dev
Flutter SDK 2.3.0-2.0.pre.147
firebase_authtest 1.0.0+1

dependencies:
- cupertino_icons 1.0.3
- firebase_auth 1.1.4 [firebase_auth_platform_interface firebase_auth_web firebase_core firebase_core_platform_interface flutter meta]
- firebase_core 1.1.1 [firebase_core_platform_interface firebase_core_web flutter meta]
- flutter 0.0.0 [characters collection meta typed_data vector_math sky_engine]
- flutter_signin_button 1.1.0 [flutter font_awesome_flutter]
- google_sign_in 5.0.2 [google_sign_in_platform_interface google_sign_in_web flutter meta]

dev dependencies:
- flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters charcode collection matcher meta source_span stream_channel string_scanner term_glyph typed_data]

transitive dependencies:
- async 2.6.0 [meta collection]
- boolean_selector 2.1.0 [source_span string_scanner]
- characters 1.1.0
- charcode 1.2.0
- clock 1.1.0
- collection 1.15.0
- fake_async 1.2.0 [clock collection]
- firebase_auth_platform_interface 4.2.2 [firebase_core flutter meta plugin_platform_interface]
- firebase_auth_web 1.1.2 [firebase_auth_platform_interface firebase_core firebase_core_web flutter flutter_web_plugins http_parser intl js meta]
- firebase_core_platform_interface 4.0.1 [collection flutter meta plugin_platform_interface]
- firebase_core_web 1.0.3 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
- flutter_web_plugins 0.0.0 [flutter js characters collection meta typed_data vector_math]
- font_awesome_flutter 8.12.0 [flutter]
- google_sign_in_platform_interface 2.0.1 [flutter meta quiver]
- google_sign_in_web 0.10.0 [google_sign_in_platform_interface flutter flutter_web_plugins meta js]
- http_parser 4.0.0 [charcode collection source_span string_scanner typed_data]
- intl 0.17.0 [clock path]
- js 0.6.3
- matcher 0.12.10 [stack_trace]
- meta 1.3.0
- path 1.8.0
- plugin_platform_interface 2.0.0 [meta]
- quiver 3.0.1 [matcher]
- sky_engine 0.0.99
- source_span 1.8.1 [collection path term_glyph]
- stack_trace 1.10.0 [path]
- stream_channel 2.1.0 [async]
- string_scanner 1.1.0 [charcode source_span]
- term_glyph 1.2.0
- test_api 0.3.0 [async boolean_selector collection meta path source_span stack_trace stream_channel string_scanner term_glyph matcher]
- typed_data 1.3.0 [collection]
- vector_math 2.1.0
bash-3.2$

Archive.zip

Hi @rlfolden
This is caused by google sign-in not being supported on MacOS
https://github.com/flutter/flutter/issues/46157
Closing due to there being an open issue to track this (and this isn't the repository for it).
Thank you


mac small sample

Hello, your repository is great. I've tried to use it on mac, but

I end up with this strange result, see attachment. It creates stiched screenshots of my home screen instead of map. Any idea why is that?

For new os terminal must have permission. thanks


#4997 Allow for link-time dispatching

based on https://github.com/scala-js/scala-js/pull/4988 ~and WIP writing tests (link-failed scenario, AnalyzerTest, OptimizerTest, and suites), but the overall design can be reviewed~ ready for review :)
closes https://github.com/scala-js/scala-js/issues/4997

This commit introduces linktime dispatching with a new LinkTimeIf IR node. The condition of LinkTimeIf will be evaluated at link-time and the dead branch be eliminated at link-time by Optimizer or linker backend.
For example,
import scala.scalajs.LikningInfo._

val env = linkTimeIf(productionMode) {
  "prod"
} {
  "dev"
}

The code above under .withProductionMode(true) links to the following at runtime.
val env = "prod"

This feature was originally motivated to allow switching the library implementation based on whether it targets browser Wasm or standalone Wasm (see https://github.com/scala-js/scala-js/issues/4991).
However, it should prove useful for further optimization through link-time information-based dispatching.
LinkTimeIf IR Node
This change introduces a new IR node LinkTimeIf(cond: LinkTimeTree, thenp: Tree, elsep: Tree), that represents link-time dispatching.
LinkTimeTree is a small set of IR tree evaluated at link-time.
Currently, LinkTimeTree contains BinaryOp, IntConst, BooleanConst, and Property.

BinaryOp representing a simple binary operation that evaluates to a boolean value.
IntConst and BooleanConst holds a constant of the type.
Property contains a key to resolve a value at link-time, where LinkTimeProperties.scala is responsible for managing and resolving the link-time value dictionary, which is accessible through CoreSpec.

For example, the following LinkTimeIf looks up the link-time value whose key is "scala.scalajs.LinkingInfo.esVersion" and compares it with the integer constant 6.
LinkTimeIf(
  BinaryOp(
    BinaryOp.Int_>=,
    Property("core/esVersion"),
    IntConst(6),
  ),
  thenp,
  elsep
)

LinkingInfo.linkTimeIf and @linkTimeProperty annotation
This commit defines a new API to represent link-time dispatching: LinkingInfo.linkTimeIf(...) { } { }, which compiles to the LinkTimeIf IR node. For example, linkTimeIf(esVersion >= ESVersion.ES2015) compiles to the IR above.
Note that only symbols annotated with @linkTimeProperty or int/boolean constants can be used in the condition of linkTimeIf. Currently, @linkTimeProperty is private to scalajs (users cannot define new link-time values), and only a predefined set of link-time values are annotated (productionMode and esVersion for now).
When @linkTimeProperty(name) annotated values are used in linkTimeIf, they are translated to LinkTimeValue.Property(name).
LinkTimeProperties to resolve and evaluate LinkTimeCondition/Value
This commit defines a LinkTimeProperty that belongs to the CoreSpec (making it accessible from various linker stages). It constructs a link-time value dictionary from Semantics and ESFeatures, and is responsible for resolving LinkTimeValue.Property and evaluating LinkTimeCondition.
Analyzer doesn't follow the dead branch of linkTimeIf
Now Analyzer evaluates the LinkTimeIf and follow only the live branch. For example, under productionMode = true, doSomethingDev won't be marked as reachable by Analyzer.
linkTimeIf(productionMode) {
  doSomethingProd()
} {
  doSomethingDev()
}

Eliminate dead branch of LinkTimeIf
Finally, the optimizer and linker-backends (in case the optimizer is turned off) eliminate the dead branch of LinkTimeIf.

I pushed commits that addresses the review so it's easy to find diff, but I'll squash them into the first commit before merging

I think I have addressed everything :)

This feature was originally motivated to allow switching the library implementation based on whether it targets browser Wasm or standalone Wasm

Where are we (the Scala.js project) in terms of committing to this?
IIUC true link time dispatching is not necessary for optimizations: Inlining / folding in the optimizer is sufficient (and used a lot) to optimize behavior at link time and dead code eliminate unneeded things. This is as long as the eliminated code branch also links (which for optimizations is typically the case).
My concern here is that, unlike the WASM backend, we're committing to a new public API which we'll have to maintain. (it is true that e.g. #4998 is proposing public API / IR changes motivated by WASM, but the changes themselves - IMO - improve the IR spec either way).
I'm sorry this comment comes quite late on this PR. I have been focusing my attention on getting the initial WASM PR merged.

This has yet to be agreed on, indeed.
There are at least two things we can do with link-time tests for JS only, that we cannot do with link-time optimizations. They boil down to the same root cause: things where the alternative wouldn't link in the non-chosen branch.

Using ES features from newer ES versions that refuse to link on older versions. For example, **, which refuses to link < ES 2016. Concrete use case: optimize Float.parseFloat to use JS bigints instead of java.math.BigInteger; currently we cannot do that because the branch using bigints needs to use ES' ** operator.
Using different kinds of imports based on the module kind. We have one example in our own test suite, for the exportsNamespace. I would be surprised if there aren't any use cases in the wild.

If we generalize to user-defined link-time properties, I expect people will start using it for linking different code---including different JSImports, which cannot be done with optimizations only---for browser versus Node.js.

Thanks @gzm0 for your comment!
I apologize for the confusion in my previous message; I should've added some examples how this conditional linking feature can be used in JS backend.
You're right that eliminating dead branches is typically handled by the optimizer. However, as Sebastien pointed out, there are use cases where conditional linking is essential, as it ensures that dead branches are eliminated at link-time, even without an optimizer.
While this feature was initially introduced for the Wasm backend, I believe that it is self-contained and would also be beneficial for the JS backend, and worth changing the IR.

I've been thinking about this, and also in the context of https://github.com/scala-js/scala-js/pull/4993#discussion_r1712938559 . I think I've found a more holistic design. It would be composed of two steps:

Introduce a LinkTimeProperty(name, tpe) extends Tree

It could possibly extend Literal, although that might not be wise. A LinkTimeProperty would represent any link-time constant property. It would replace most of JSLinkingInfo: esVersion, useECMAScript2015Semantics, productionMode, linkerVersion and later isWebAssembly. A LinkTimeProperty will be guaranteed to be replaced by a constant Literal in the emitted code (typically already in the optimizer).
The only sub-property of JSLinkingInfo that it cannot represent is fileLevelThis, since its replacement cannot be a Literal. We would then offer a different node to get access to the file-level this. IMO we could use a JSGlobalRef("this") for that purpose, as the semantics are basically the same as global refs ("this" is not otherwise a valid name for a JSGlobalRef, since it is a JS keyword).

Introduce LinkTimeIf

Its cond would then be a regular Tree (not a LinkTimeTree), with additional well-formedness conditions for a "link-time tree": it can only be a Literal, a LinkTimeProperty, or one of the allowed UnaryOps and BinaryOps with link-time tree operands.
The advantages of this approach are:

No separate structure for link-time trees -> codegen is simplified.
JS-independent mechanism to replace JSLinkingInfo.
Decouple link-time properties from link-time if's.

For backward compatibility of JSLinkingInfo, I think we could do the following:

As a deserialization hack, replace JSSelect(JSLinkingInfo(), StringLiteral("...")) by the appropriate LinkTimeProperty or JSGlobalRef("this") (for known correct properties).
-> this way the optimizer does not need to deal with JSLinkingInfo anymore
Either of two things:

Keep supporting JSLinkingInfo in the emitters (pro: we keep the implied semantics that there is a unique, sealed $linkingInfo object; con: well we still need to support it through the pipeline)
As a deserialization hack, replace isolated JSLinkingInfo() by an inline ObjectConstr(...) with all the existing properties mapped to the appropriate LinkTimeProperty/JSGlobalRef. (pro: it truly disappears from the IR; con: it loses the mentioned implied semantics)

@gzm0 @tanishiking How does that sound?

@sjrd
I guess one of the largest benefits of your proposal is around IR changes:
The current approach requires adding all LinkTimeTree nodes to the IR, in addition to LinkTimeIf, and the number of IR nodes (in LinkTimeTree) might continue to increase in future.
On the other hand, with the proposed method, the only IR trees that need to be added are LinkTimeIf and LinkTimeProperty. Since the other IR trees will reuse existing literals, the number of nodes should not increase in the future.
In that sense, I like your idea 👍 That change may mitigate the @gzm0's concern about the IR changes.
Regarding No separate structure for link-time trees -> codegen is simplified.
I'm not sure it really simplifies the code generation (frontend genJSCode).
The current complexity of the code generation (in genLinkTimeTree) is mainly due to handling invalid input errors for cond in linkTimeIf. Even if we reuse the IR-trees, I don't think it would necessarily simplify things
(as long as we validate the cond input in the frontend, If the frontend doesn't report errors for cond input, we can simplify the frontend codeGen. However, in that case, users wouldn't be able to recognize invalid input until IRChecker runs at link time).

Confirmation questions

We're going to compile runtime.linkingInfo.xxx into LinkTimeProperty("xxx", ...) within genJSCode, correct?

For example, Select(Runtime_linkingInfo, name) will compile into LinkTimeProperty(...), except for fileLevelThis, which will compile to JSGlobalRef("this").

With this approach, we can remove the @linkTimeProperty annotation since members of scalajs.LinkingInfo that refer to scalajs.runtime.linkingInfo will automatically compile to LinkTimeProperty, am I right?.

(Or we could keep the annotation for potential future use with custom link-time properties.)

Either of two things: ...

This is a backward compatibility solution for isolated JSLinkingInfo(), correct?
I think deserialization hack would be nice, but we can keep supporting JSLinkingInfo() and introduce the hack later, right?

Regarding No separate structure for link-time trees -> codegen is simplified. I'm not sure it really simplifies the code generation (frontend genJSCode).

Right, maybe not. It depends how it's done.

We're going to compile runtime.linkingInfo.xxx into LinkTimeProperty("xxx", ...) within genJSCode, correct?
For example, Select(Runtime_linkingInfo, name) will compile into LinkTimeProperty(...), except for fileLevelThis, which will compile to JSGlobalRef("this").

Yes, that's right.

With this approach, we can remove the @linkTimeProperty annotation since members of scalajs.LinkingInfo that refer to scalajs.runtime.linkingInfo will automatically compile to LinkTimeProperty, am I right?.

Since it is very likely that we'll want custom ones at some point, IMO we can keep the annotation to leave the compiler generic.

Either of two things: ...

This is a backward compatibility solution for isolated JSLinkingInfo(), correct?

Yes.

I think deserialization hack would be nice, but we can keep supporting JSLinkingInfo() and introduce the hack later, right?

It's not impossible, but if we do that there is no good reason to introduce the deserialization hack now even for the non-isolated ones. So then it would make more sense to keep the extraction in the optimizer as well. It's not that complicated, TBH:
https://github.com/scala-js/scala-js/blob/ede4dc1f70b416a3d3a5d4c27b64608656e77525/linker/shared/src/main/scala/org/scalajs/linker/frontend/optimizer/OptimizerCore.scala#L4810-L4832

Introduce a LinkTimeProperty(name, tpe) extends Tree

I think we should definitely do that. That JSLinkingInfo is a JS object clearly has become a hindrance for multiple parts of the pipeline.

we keep the implied semantics that there is a unique, sealed $linkingInfo object

I would drop these semantics. The LinkingInfo object clearly is in the runtime subpackage which (by convention?) is internal.
What isn't clear to me yet, is how we manage the allowed name / type pairs: how / where do we decide if a LinkTimeProperty node is valid or not.

Introduce LinkTimeIf

Regarding that, I'm not sure @sjrd's proposal changes a lot w.r.t. to my concerns about this TBH: Even if the interface becomes simpler (say, because we can re-use trees) than proposed in this PR, we still commit to a significant additional feature.
Regarding the use cases for this outside of WASM (collected from comments, please forgive me if I missed one):

Using ES features from newer ES versions that refuse to link on older versions. For example, **, which refuses to link < ES 2016. Concrete use case: optimize Float.parseFloat to use JS bigints instead of java.math.BigInteger; currently we cannot do that because the branch using bigints needs to use ES' ** operator.

Fair, I can see that.
For context: Judging from the errors in Analysis, the following are dependent on a linking time options (and could IMO reasonably be expected to be used under the link time if flag):

Dynamic imports
import.meta
new.target
**

Using different kinds of imports based on the module kind. We have one example in our own test suite, for the exportsNamespace. I would be surprised if there aren't any use cases in the wild.

Hum, wouldn't the current features deal just fine with this? Basically, define different JSImports for ESM / CJS and then with an if, just select the one you want. Post optimizer, one symbol is going to be gone, so the import won't be emitted.

You're right that eliminating dead branches is typically handled by the optimizer. However, as Sebastien pointed out, there are use cases where conditional linking is essential, as it ensures that dead branches are eliminated at link-time, even without an optimizer.

Yes, I can see that. And I agree that having a guarantee is better than it "working by happenstance".
For me the main question here is: is it better enough that it warrants the maintenance cost for us? (example: https://github.com/scala-js/scala-js/issues/2948).

Using different kinds of imports based on the module kind. We have one example in our own test suite, for the exportsNamespace. I would be surprised if there aren't any use cases in the wild.

Hum, wouldn't the current features deal just fine with this? Basically, define different JSImports for ESM / CJS and then with an if, just select the one you want. Post optimizer, one symbol is going to be gone, so the import won't be emitted.

Right ... kind of. But then a codebase that relies on that would only work when the optimizer is enabled. That's not great if you need to troubleshoot an optimizer issue, or if you want to debug your program without the optimizer enabled (for a better one-to-one mapping of the source code to the target, which can notably improve stack traces).

Introduce a LinkTimeProperty(name, tpe) extends Tree

I think we should definitely do that. That JSLinkingInfo is a JS object clearly has become a hindrance for multiple parts of the pipeline.

we keep the implied semantics that there is a unique, sealed $linkingInfo object

I would drop these semantics. The LinkingInfo object clearly is in the runtime subpackage which (by convention?) is internal.
What isn't clear to me yet, is how we manage the allowed name / type pairs: how / where do we decide if a LinkTimeProperty node is valid or not.

IMO we do that during the reachability analysis. We can't really do it in the ClassDefChecker unless we make class def checking core-spec-dependent, but that doesn't seem right to me. We also can't do it later than reachability, at least if the point is to put in link-time conditions at some point, since we need to resolve the latter to complete the rechability analysis.
Reachability analysis makes sense to me, as we can consider that we are linking with a particular map of link-time properties. Also we can naturally report any mismatch as linking errors, which are our only true user-space errors at link-time.

One more thought: we still need to determine whether we want a LinkTimeIf before implementing LinkTimeProperty.
If we don't want a LinkTimeIf, then we can still rely on the optimizer to inline methods like LinkingInfo.esVersion. That means the body of def esVersion can be a LinkTimeProperty. Consequently, we don't need an annotation for them. A unique primitive scalajs.linkTimeProperty("someConstant") can do the job.
If we do want a LinkTimeIf, we need the LinkTimeProperty to be inserted at the call site of def esVersion. In that case we need an annotation (but no primitive) so that we can define each link-time property individually. The annotation becomes part of the public ABI/API of esVersion.

Right ... kind of. But then a codebase that relies on that would only work when the optimizer is enabled. That's not great if you need to troubleshoot an optimizer issue, or if you want to debug your program without the optimizer enabled (for a better one-to-one mapping of the source code to the target, which can notably improve stack traces).

That is a good point (and one that at least to me has not been explicit yet).

RE how to implement LinkTimeProperty:

If we do want a LinkTimeIf, we need the LinkTimeProperty to be inserted at the call site of def esVersion. In that case we need an annotation (but no primitive) so that we can define each link-time property individually. The annotation becomes part of the public ABI/API of esVersion.

Good point, but IIUC nothing prevents us from doing this later?

A unique primitive scalajs.linkTimeProperty("someConstant") can do the job.

Maybe a nit, but it needs a type parameter as well, no? So scalajs.linkTimeProperty[String]("someConstant")?
In any case, I would not expose this primitive until (and if) we have a way to inject custom link time properties into the linker (if we even want that at all).

Good point, but IIUC nothing prevents us from doing this later?

That would be possible, yes, but we would be left with a useless primitive on our hands, unless ...

In any case, I would not expose this primitive until (and if) we have a way to inject custom link time properties into the linker (if we even want that at all).

right. We could splice in hard-coded IR in the bodies of those methods like we do for String.charAt.

Maybe a nit, but it needs a type parameter as well, no? So scalajs.linkTimeProperty[String]("someConstant")?

Oops, indeed. Which makes it a bit difficult, actually, since we have to preserve that type across erasure.

If we don't want a LinkTimeIf, then we can still rely on the optimizer to inline methods like LinkingInfo.esVersion. That means the body of def esVersion can be a LinkTimeProperty.

When linkingInfo.* is replaced into Literals by optimizer, I'm not clear what the benefits of introducing  LinkTimeProperty without LinkTimeIf. Is it about, making link-time properties customizable?
If eliminating the dead-branch requires the optimizer enabled, I can't come up with a good use-case of LinkTimeProperty (with the same reason as https://github.com/scala-js/scala-js/pull/5000#issuecomment-2308763681) even if it's customizable.

The use case is to get rid of JSLinkingInfo and the fact that it requires a JS object by spec. LinkTimeProperty on its own removes the requirement to rely on a JS object to be able to do optimizations based on linking info.

The use case is to get rid of JSLinkingInfo and the fact that it requires a JS object by spec. LinkTimeProperty on its own removes the requirement to rely on a JS object to be able to do optimizations based on linking info.

Ooh, right, I forgot about it, thanks 😅

One more thought: we still need to determine whether we want a LinkTimeIf before implementing LinkTimeProperty.

From #4991 point of view, I think we can proceed without LinkTimeIf for now, relying on the optimizer for link-time dispatching. And, we can re-visit introducing LinkTimeIf once the stand-alone Wasm backend is mature enough.
So the question for now would be, do we want reliable link-time dispatch (LinkTimeIf) for things like new.target and **.

For reference, I prototyped the idea of LinktimeProperty https://github.com/scala-js/scala-js/pull/5000#issuecomment-2301320479 in https://github.com/scala-js/scala-js/pull/5025

Closing in favor of https://github.com/scala-js/scala-js/pull/5025 for now


Dynamic circuit limit, Max circuit limit, Offline circuit limit UNKNOWN

The problem
Dynamic circuit limit, Max circuit limit, Offline circuit limit are shown as unknown and don't appear in the history graph
However I can successfully set dynamic circuit limit when the vehicle is charging (confirmed in the Easee App), it's just not shown as an entity or in the history graph

Version of Easee integration having the issue?
0.9.59
Version of Home Assistant Core having the issue?
2024.9.0
Anything in the logs that might be useful for us?
No response
Additional information
No response

This issue is most likely solved in v0.9.60. Please update and test.

tested and ok


Update Repo.prepare_query to check if query explicitly includes soft deleted records

Description:

Some queries explicitly include deleted at records with something like where not is_nil(deleted_at).
This was getting overriden by prepare_query
Ideally this could be addressed by passing the with_deleted option to Repo.all or the like
BUT in some cases these queries were using scrivener to do Repo.paginate, and scrivener does not allow you to pass options

@NOrzechowski test added, grammar fixed