Prevent dragging element when interacting with its children elements

Is there any way to prevent element dragging while interacting with its content? It's strange because the Modal component is a portal, which means it's not inside the draggable element's DOM.
If I move the modal outside the draggable component it works fine, but due to project structure it is required that the modal should be inside the draggable component
Example: https://codesandbox.io/s/dnd-kit-portaled-input-forked-kfskb8?file=/src/SortableItem.js
https://user-images.githubusercontent.com/106147593/178255283-32d3ecb9-6a00-49e2-818b-140feeec07ca.mov
Thank you!

Hey,

It's strange because the Modal component is a portal, which means it's not inside the draggable element's DOM.

It doesn’t matter—that’s how event bubbling works through portals in a React tree, and here’s the relevant thread (facebook/react#11387) if you want to read the whole thing. Take a look at this solution; adding event handlers to the div at line 56 works, but I’m not sure which drag/mouse events you need to keep, so you’ll have to sift through them all.

@awgv It works, thank you!

Just saw this issue too, after ending up on that react issue, after I opened a very similar issue in this repo:
https://github.com/clauderic/dnd-kit/issues/913
Not sure if that workaround with stopPropagating directly inside the portal is good enough for us, because we don't have direct access to the Portal instance, since the modal is from a library too.
But I will certainly check out what options we have, something similar on a lower level might work for us too.

I was able to solve the problem by stopping the mouseDown event from propagating on the children.

I solved it like that

{/** child **}
<div
        onMouseDown={(event) => {
          event.stopPropagation();
        }}
        className="p-4 font-semibold border-b-2 text-left flex flex-row cursor-default justify-between items-center"
      >
You can't  drag me
</div>

This does not work for me @danylo-holovenko
For some reason the event.stopPropagation() is not just working
<motion.section
exit={{ opacity: 0 }}
initial={{ opacity: 0 }}
animate={{
opacity: 1,
transition: { duration: 0.4, ease: "easeInOut" },
}}
onClick={onClose}
className="font-villeray fixed bottom-0 left-0 right-0 top-0 z-[6000] flex w-full items-center justify-center bg-[#000]/40 "
onMouseDown={(event) => {
event.stopPropagation();
}}
>
<motion.div
exit={{ opacity: 0 }}
initial={{ opacity: 0, y: 40, scale: 0.98 }}
animate={{
opacity: 1,
y: 0,
scale: 1,
transition: { duration: 0.4, ease: "easeInOut" },
}}
onClick={(e) => e.stopPropagation()}
className={scrollbar-hide z-[6000] mx-4 flex h-full max-h-[calc(100vh-16px)] w-full items-center justify-center overflow-visible overflow-y-scroll rounded-[10px]}
>
{children}
</motion.div>
</motion.section>


404 Page

According to Trello a better 404 page was one of the bugs and small fixes people could contribute to. I added the path that caused the 404 page, added a link back to the home page, and added a 404 message.
This is my first time trying to contribute to an open source project so let me know if I did anything wrong or anything. Thanks!

Hey, @2016rshah! Telescope has changed a lot in the past months, and there is a new React-based version, Telescope Nova (intro video). If you know Crater, it runs on the latest version.
The Legacy version is no longer supported. I'm closing this issue. By the way, the 404 page works now on Nova 👍
I invite you to check the new version, it's awesome!
Happy hacking! 🚀
Ps: by the way, don't hesitate to join the Slack to ask any question, you are welcome! 👍


Wrap pem in quotes to make Glitch happy

Wrapping the PEM in quotes stops Glitch from spamming error message to the console.
Closes https://github.com/probot/probot/issues/736

I did yes, saw that after
On Sun, Oct 14, 2018 at 11:25 AM Wilhelm Klopp<EMAIL_ADDRESS>wrote:

@JasonEtco https://github.com/JasonEtco you mean like the screenshot in
#736 https://github.com/probot/probot/issues/736 -- or something else?
[image: image]
https://user-images.githubusercontent.com/7718702/46920482-c2d29680-cfa3-11e8-9582-b890a358c160.png
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/probot/probot/pull/737#issuecomment-429649771, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AKKqdAEL7FgCzyzk1JpyYCVNLkhHVkxcks5uk4GBgaJpZM4Xa3Dr
.


(FM-7441) conversion of netdev network_dns to agentless

Requires MODULES-8070 and MODULES-8069 to be completed first in order
for the canonicalize method to be worthwhile and the use of
simple_get_filter for the vrf value.

Codecov Report

Merging #12 into puppet6 will increase coverage by 0.24%.
The diff coverage is 93.1%.

@@            Coverage Diff             @@
##           puppet6     #12      +/-   ##
==========================================
+ Coverage      0.4%   0.65%   +0.24%
==========================================
  Files          171     172       +1
  Lines        21725   21783      +58
==========================================
+ Hits            89     143      +54
- Misses       21636   21640       +4

Impacted Files
Coverage Δ

lib/puppet/provider/network_dns/cisco_nexus.rb
93.1% <93.1%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b972ce5...419926b. Read the comment docs.


Update README.md

I did added my name in the readme

merged one of your pr for the same change do closing this pr


If you stop the debug session when stopped at a breakpoint the test session does not end

Testing #21306

Steps to repro:

add a breakpoint
start debugging
once the breakpoint is hit, click the red box to cancel the debug session
vscode thinks the debug session is still active even thought it is not

Note: Also occurs for pytest in addition to unittest


webpack error

Description
After install the package, I plan to run webpack. there are some errors as follows :
ERROR in ./~/element-react/dist/npm/src/message/Toast.js
Module not found: Error: Can't resolve 'image-webpack' in '/Users/snow_young/secrect/opensource/d3/demo'
@ ./~/element-react/dist/npm/src/message/Toast.js 27:11-42
@ ./~/element-react/dist/npm/src/message/Message.js
@ ./~/element-react/dist/npm/src/message/index.js
@ ./~/element-react/dist/npm/src/index.js
@ ./~/element-react/dist/npm/index.js
@ ./src/main.js
Reproduce Steps

npm i element-react --save
add functions
import { Button } from 'element-react';
ReactDOM.render(Hello, document.getElementById('example'));
run webpack command. and then failed as before.

Error Trace (if possible)
ERROR in ./~/element-react/dist/npm/src/message/Toast.js
Module not found: Error: Can't resolve 'image-webpack' in '/Users/snow_young/secrect/opensource/d3/demo'
@ ./~/element-react/dist/npm/src/message/Toast.js 27:11-42
@ ./~/element-react/dist/npm/src/message/Message.js
@ ./~/element-react/dist/npm/src/message/index.js
@ ./~/element-react/dist/npm/src/index.js
@ ./~/element-react/dist/npm/index.js
@ ./src/main.js
It's better to post up the error stack for us to trace this issue.
Solution
What needs to be done to address this issue? Ideally, provide a pull request with a fix.
I need help from yours.
Additional Information
Any additional information, configuration or data that might be necessary to reproduce the issue.

Can you provide the webpack.config.js and the raw console logs?


unable to install dlib saying cmake must be installed to build dlib and I have cmake installed already

(.venv) mac@MACs-MacBook-Air fr_project % pip install dlib
Collecting dlib
Downloading dlib-19.24.4.tar.gz (3.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3/3.3 MB 3.0 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: dlib
Building wheel for dlib (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for dlib (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [10 lines of output]
running bdist_wheel
running build
running build_ext
Traceback (most recent call last):
File "/Users/mac/PycharmProjects/fr_project/fr_project/.venv/bin/cmake", line 5, in
from cmake import cmake
ModuleNotFoundError: No module named 'cmake'
  ERROR: CMake must be installed to build dlib

  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for dlib
Failed to build dlib
ERROR: Could not build wheels for dlib, which is required to install pyproject.toml-based projects

any help please?


Rest security

Please, test this pull request by executing the app and using postman to login to an account, as I'm having problems with docker and I'm not able to start the app

All is working, waiting for review. Check c3c6500 for instructions


Remove --bs-border-opacity: 1 from .border-* utilities

We set --bs-border-opacity: 1 globally at the :root level, so redeclaring it on every .border-* utility doesn't make much sense. I think we can drop this.

Tested it in border utilities and some components. Indeed it seems safe to drop this :ok_hand:
However, Utilities > Borders > Opacity > How it works would probably need an update:

Drop --bs-border-opacity: 1; in the code shown for .border-success since it is defined in :root.
Modify this part of the description just after which mentions "(with a default value 1 thanks to a local CSS variable)".

Tested it in border utilities and some components. Indeed it seems safe to drop this :ok_hand:
However, Utilities > Borders > Opacity > How it works would probably need an update:

Drop --bs-border-opacity: 1; in the code shown for .border-success since it is defined in :root.
Modify this part of the description just after which mentions "(with a default value 1 thanks to a local CSS variable)".

@julien-deramond Should we do the global value, or use a local one? We use local ones on our .bg-* and .text-* utilities... should we maybe restore the local and remove the global, so they all match?

Yes indeed you could restore the local and remove the global so they all match.
If I am remembering well :thinking: there are some edge cases in https://twbs-bootstrap.netlify.app/docs/5.1/utilities/borders/#additive where you can add .border-danger to .border-top, .border-bottom, .border-bottom-0, etc. (without having to add an extra .border).
After removing the global, maybe you will need to add the following:
"border-color": (
  // ...
  local-vars: (
    "border-opacity": 1
  ),
  // ...
),

Good eyes @julien-deramond. I think the latest commit addresses all concerns. Played around with mixing the utilities and using them on components.

The latest commit addresses all concerns. Also played around with mixing the utilities and using them on components and didn't see any regressions. I "approve" this PR :)
By the way it would be very interesting to have the .border-*-0 (or .border-{top|end|etc.}) + .border-{color} combos automatically visually tested (or with components as well). IMO it shouldn't be in the documentation so having them automatically tested would offer security; we won't remember those edge cases in few weeks or months.

Added some examples @julien-deramond:

Also removed the callout that was now out of date regarding the setting of CSS variables only for utilities. We backtracked from that on .text-* and .bg-* awhile back for backward compatibility. In v6, we'll make these utilities use CSS vars only I believe. More to test on that though when the time comes.


Generic object enhancement.

Some changes to generic object.

Use save! over save to be API call ready.
Convert input to string format as keywords in properties hash are all in string format.

@miq-bot assign @gmcculloug
@miq-bot add_label enhancement
cc @jntullo

Thanks for the update @lfu! 👍

cc @bzwei

Instead of converting all attribute names to string to_s, how about all to symbols?

Instead of inserting require_generic_object_definition for almost every method we can have a before_save hook to ensure the existence of definition.

@bzwei Jsonb column has all keywords stored in String format. So I think String format may be more appropriate.
It is possible that the generic object has the definition in DB but somehow the definition object does not exist. I would like each method checks the existence of the definition before it does the work which may make the debugging easier in the future.

Is it a valid use case that "It is possible that the generic object has the definition in DB but somehow the definition object does not exist"? In a production it is a penalty to validate for every method call. If it is for the debugging purpose then the code should exist only in debug mode (although I don't know how)

@lfu Please review this PR description to make sure it is still accurate.

@bzwei PTAL


Date fields from Contentful is not validated in app

Contentful allows you to enter an endDate, which is before the startDate. This currently crashes the app.
How do we want to deal with this? Validate the dates in the app and swap them?

Wip is being developed in #76


Delete fi directory

Please remove my translation, I'm not sure anymore if you care about contributors and the community who want to help DEXIE to reach a greater audience

I am sorry to hear you feel this way, as well as sorry to hear the harsh words towards dexie team.
The point of community translation has been the same from the very beginning - to make dexie accessible to all users throughout the world by making it understandable and usable for speakers of all languages thanks to the kindness of voluntary community contributions from native and fluent speakers of various languages. We are very thankful to everyone who understands this mission and has contributed their time and knowledge to translate dexie into their language.
We have been accepting all contributions, hoping for every volunteer to be an honest dexie user, willing to help fellow language speakers to use dexie in their native tongue. This has never been a commercial commission but a way for the linguistically-talented community members to help other community members. dexie team has never promised any remuneration for translation. You have never contacted us asking about it beforehand, you joined dexie discord server with a brand new Discord and Github account, performed the translation without saying a word or asking any questions, and eventually quitted when you were told there is no financial reward for voluntary community translation.
I truly hope this is a huge misunderstanding and I am sorry it has happened. Your translation will be removed as you requested.


Emit embedded or inlined structs in Go to correspond with struct unifications in schemas

The Go code generator does not currently handle struct unifications correctly. Rather than either inlining or embedding the type, it simply omits it entirely.
The initial fix here should should embed the type, without any option for inlining. If a use case presents itself, we can add a separate config option to enable inlining later.
This case is covered by the testdata/lineage/unifyref.txtar, and will impact (among probably many others) the Azure Monitor plugin in grafana

Assigning it to @spinillos cause she already started some work 🎉  ➡  #154

Hey @spinillos, @sdboyer,
I see the aforementioned PR has been merged, and indeed the lineage/unifyref case was removed from the ToDo list there. So, can we close this issue? Or is there any other work still remaining?
Thanks!


Some TypeScript files missing in coverage

Link to bug demonstration repository

https://github.com/janek37/nyc-testcase
Expected Behavior
Not ignore files that are not touched by tests.
Observed Behavior
Some files not touched by tests are ignored.
Troubleshooting steps

[x] still occurring when I put cache: false in my nyc config

In the demo repo:

npm install
npm run coverage

Effect: src/foo.ts is ignored in coverage.

Change nyc version in package.json to 14.1.1
Repeat steps 1 and 2

Effect: src/foo.ts is not ignored anymore.
Environment Information

# paste the output here
  System:
    OS: Linux 4.15 Ubuntu 18.04.5 LTS (Bionic Beaver)
    CPU: (2) x64 Intel(R) Pentium(R) CPU G2030 @ 3.00GHz
    Memory: 311.27 MB / 7.66 GB
  Binaries:
    Node: 13.5.0 - ~/.nvm/versions/node/v13.5.0/bin/node
    Yarn: 1.21.1 - ~/.yarn/bin/yarn
    npm: 6.13.4 - ~/.nvm/versions/node/v13.5.0/bin/npm

No reaction for 3 months :(

Can confirm this bug. nyc code coverage report was missing most of our TypeScript files. This was on the latest nyc release, ^15.1.0 and using the recommended TS setup.
As mentioned above, setting the version to 14.1.1 has resolved this for now.

I've noticed this too in a Next.js project. The fix was to install @istanbuljs/nyc-config-typescript" and then add "extends": "@istanbuljs/nyc-config-typescript", to .nycrc.json.


[Counting] Fix leaderboard Error

Replace ctx.guild.get_member() with self.bot.get_or_fetch_member() in counting leaderboard command since cache can not contain the member sometimes and will cause the bot to throw an unhandled error leading to the command not working.

@i-am-zaidali Thank you for bringing this to my attention; however, I will be closing this as the error should not be occurring often enough for immediate concern, and the implementation in this PR needs fixing (get_or_fetch_member takes in 2 arguments: guild and member_id). I will likely be replacing get_member with get_or_fetch_member across all my cogs during the upcoming rewrite, but if this is an immediate problem for your bot, feel free to update what you wish in a fork.


⚠ Bofrost.es has degraded performance

In b33e4f8, Bofrost.es (https://www.bofrost.es) experienced degraded performance:

HTTP code: 200
Response time: 1706 ms

Resolved: Bofrost.es performance has improved in 27c8148 after 6 minutes.


⚠ Bofrost.de has degraded performance

In 802bb13, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1302 ms

Resolved: Bofrost.de performance has improved in 4f8882f.


TINKERPOP-1106 Better handled commit and serialization errors in Gremlin Server.

https://issues.apache.org/jira/browse/TINKERPOP-1106
Both types of errors were causing problems.  For commit errors, the last message from iteration was already sent back to the client as a terminating message so failure on commit after that was ignored by the driver because it had already received the terminator for that request.  Serialization errors didn't break the result iteration loop - they were being handled, but the result iteration was allowed to continue. I'm not so sure that those types of failures weren't leaking transactions either - that should be fixed now too.
This stuff is hard to write tests for with Gremlin Server as I dont' know how to force raise a commit exception for Neo4j.  I was able to test externally with graphs that were easier to force that condition.
I will update CHANGELOG after the merge for this one.
Tested with: mvn clean install && mvn verify -pl gremlin-server -DskipIntegrationTests=false
VOTE: +1

Code looks good, mvn clean install passed...
VOTE: +1

Looked at code. VOTE +1.


Provide companion apply for sbt.internal.io.Source

Ref sbt/sbt#3438

To validate this pull request against other sbt modules, please visit this link.


AttributeError: 'Quart' object has no attribute 'auth_manager' when running app.

Hi! I'm getting this issue when trying to run my app. It happens with Quart-Auth 0.8.0, but not 0.7.0.
I'm using the app factory pattern, like in the docs, but the offending line is in my run.py file, where I do:
app.auth_manager.user_class = AuthUser
AuthUser is a class imported from my models.py file:
class AuthUser(AU):
    def __init__(self, auth_id):
        super().__init__(auth_id)

    @property
    def _user(self):
        user = User.query.get(self.auth_id)
        return user

Has anything changed in the last version?

Nevermind, I just now see this commit and I believe that was it.


example error

I get the following error when I run full_game_random.
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
  File ".\full_game_random.py", line 66, in <module>
    main()
  File ".\full_game_random.py", line 48, in main
    obs = env.reset()
  File "e:\code\machinelearning\env\sc2gym\sc2gym\envs\sc2_game.py", line 72, in reset
    self._init_env()
  File "e:\code\machinelearning\env\sc2gym\sc2gym\envs\sc2_game.py", line 92, in _init_env
    self._env = sc2_env.SC2Env(**args)
  File "C:\Users\Kenneth\AppData\Roaming\Python\Python37\site-packages\pysc2\env\sc2_env.py", line 211, in __init__
    raise ValueError("You must specify the list of players.")
ValueError: You must specify the list of players.

Hi @ChengYen-Tang, can you please provide some more information? Which platform, which game client and version, and which version of python are you running?

I use windows，SC2 client version is <IP_ADDRESS>811, python version is 3.7

I don't have access to a Windows machine to fix this right now, and my wine
installation has recently broken as well. I think I will have to rely on
the community to investigate and fix this.
Contributions and pull requests are welcome.


Amend README to point to the actual course pages.

The README.md file doesn't have a link to the course pages... amend this file so that where it says "This is the source code repository for the Node.js Redis Crash Course", the text "Node.js Redis Crash Course" becomes a link to https://developer.redis.com/develop/node/node-crash-course
This is part of our participation in Hacktoberfest 2021. Learn how to complete this issue here: https://developer.redis.com/hacktoberfest/
Need help or want to talk to us? Join us on Discord where we have a dedicated Hacktoberfest channel: https://discord.gg/ueQwKUh5Z3

@scottajevans I've assigned this to you.

@simonprickett thank you, sorry - I have already created a PR. Hope this is okay!


Calling APIs with bad credentials results in call getting stuck

Hi,
I was writing negative tests where I load invalid Client, secret key and subscription id. I did not get any error when I tried to get SP Token. Furthermore when I called vmclient. ListAll() method. Instead of returning error( In my opinion, it should return error at the previous step itself), the call got stuck. I had to manually kill the program.  Please let me know if this is a bug or whether there is something I should take care of before calling API with invalid credentials.

Howdy, sorry you're running into trouble! This one is totally on us.
There is a known issue with returning multiple channels as the mechanism for supporting LROs. It can cause the behavior you're mentioning. @jhendrixMSFT created a fix, and we're going to be releasing it with v12.0.0-beta. (The current goal is to release that on Monday, the 27th.)

This is orthogonal to LROs as I hit this yesterday.  Part of the problem is that we don't do any validation of parameters up front so things like passing empty strings can cause the same symptom.  The other part is that our retry logic doesn't properly handle failed authentication which needs to be fixed.

Will this fix also going to be released next monday?

Yeah the fix will be included with the v12 release.

What is the updated release of this fix? I believe the v12 version has not been released yet.

Unfortunately v12 has been delayed.  In the interim I will see if we can release an updated go-autorest for inclusion in a patch bump of the SDK.  Also note that if you "go get" the go-autorest repo you can get this fix now.

Hi I see that my latest go-autorest has the below changelog
Bug Fixes

Validate parameters when creating credentials.
Don't retry requests if the returned status is a 401 (http.StatusUnauthorized) as it will never succeed.

However, when I call the API with bad credentials, it is still getting stuck like before. Any idea why this might be happening?

Sorry no idea without any further information.  Have you tried setting a breakpoint in ServicePrincipalToken.refreshInternal() to see what happens?  The request to refresh the token should fail and return a TokenRefreshError, see https://github.com/Azure/go-autorest/blob/cab8279ba5cd5e165c58201f798712f2ec0f49d6/autorest/adal/token.go#L478.

Hi,
From what I have debugged, When we call an API like List or ListAll() etc,  with an invalid credentials, even after the above code returns an error, the code tries to go through delayed retry method.  Highlighted below.
(dlv) n

github.com/Azure/go-autorest/autorest.DoRetryForStatusCodes.func1.1() /home/kiranupadya/godep/src/github.com/Azure/go-autorest/autorest/sender.go:231 (PC: 0x6a23a7)
226:					if err == nil && !ResponseHasStatusCode(resp, codes...) || ResponseHasStatusCode(resp, http.StatusUnauthorized) {
227:						return resp, err
228:					}
229:					delayed := DelayWithRetryAfter(resp, r.Cancel)
230:					if !delayed {
=> 231:						DelayForBackoff(backoff, attempt, r.Cancel)
232:					}
233:				}
234:				return resp, err
235:			})
236:		}
(dlv) n
github.com/Azure/go-autorest/autorest.DoRetryForStatusCodes.func1.1() /home/kiranupadya/godep/src/github.com/Azure/go-autorest/autorest/sender.go:218 (PC: 0x6a23d3)
213:		return func(s Sender) Sender {
214:			return SenderFunc(func(r *http.Request) (resp *http.Response, err error) {
215:				rr := NewRetriableRequest(r)
216:				// Increment to add the first call (attempts denotes number of retries)
217:				attempts++
=> 218:				for attempt := 0; attempt < attempts; attempt++ {
219:					err = rr.Prepare()
220:					if err != nil {
221:						return resp, err
222:					}
223:					resp, err = s.Do(rr.Request())

This retry is what is causing a hang like behaviour in the case of calling an API with invalid credentials. Does this help?

On line 226 what is the value for resp.StatusCode?  It should be 401 (http.StatusUnauthorized).

resp.StatusCode is some garbage value.
(dlv) p resp
*net/http.Response {
Status: "dH�\f%����H�D$�H;A\x10\x0f��\x02\x00\x00H���\x00\x00\x00H��$�\x00\x00\x00H��$�\x00\x00\x00H�T$hH�B\bH�D$pH�J...+842352709868 more",
StatusCode: 11696288,
Proto: "��\x00\x00\x00\x00\x00@Q\" �\x00\x00\x00i�\x00\x00\x00\x00\x00P�( �\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00XG�\r\x00\x00\x00\x00(.��\x00\x00\x00...+11701326 more",
ProtoMajor: 6,
ProtoMinor: 6,
Header: (unreadable input/output error),
Body: (unreadable invalid interface type: could not find str field),
ContentLength: 9748256,
TransferEncoding: []string len: 10, cap:<PHONE_NUMBER>08, [(unreadable could not read string at 0x6567412d72657355 due to input/output error),(unreadable could not read string at 0x615e3a5b5d3a6d75 due to input/output error),(unreadable could not read string at 0x5d3a69696373615e due to input/output error),(unreadable could not read string at 0x746e635e3a5b5d3a due to input/output error),...+6 more],

Hmm I wonder if that's just delve misbehaving.  If you print the value to the console do you see the same thing?

Even if delve was misbehaving, if the status code was 401, I believe the execution of the next lines of code would not have happened. It would have returned an error to the caller.
I did print the resp.StatusCode to the console and I get this.
2017/12/05 10:54:23 /home/kiranupadya/godep/src/github.com/Azure/go-autorest/autorest/sender.go:226: RESPONSE CODE============== 400

Interesting, in my testing I didn't run across a case where the authentication returned a 400.  Can you share your repro program?  I'd like to understand how it works so I can update go-autorest accordingly.

Sure.
keys.subscriptionId = "myBadSubscriptionID"
keys.tenantId = "myBadTenantID"
keys.clientId = "myBadClientID"
keys.clientSecret = "myBadClientSecret"
oauthConfig, autherr := adal.NewOAuthConfig(azure.PublicCloud.ActiveDirectoryEndpoint, keys.tenantId)
spt, spterr := adal.NewServicePrincipalToken(*oauthConfig,
keys.clientId,
keys.clientSecret,
azure.PublicCloud.ResourceManagerEndpoint)
acc.vmClient = compute.NewVirtualMachinesClient(keys.subscriptionId)
acc.vmClient.Authorizer = autorest.NewBearerAuthorizer(spt)
resp, err = acc.vmClient.ListAll()

Thanks I understand it now, I will get this fixed today.

This is fixed in go-autorest v9.5.0.  Thanks for your help with the investigation.
https://github.com/Azure/go-autorest/releases/tag/v9.5.0

Thanks for fixing it.

When i currently attempt using bad credentials in a negative test, i get back the response as invalid request - For example:
azure.BearerAuthorizer#WithAuthorization: Failed to refresh the Token for request to https://management.azure.com/subscriptions/TEST_AUTH_FAIL/resourcegroups?api-version=2018-02-01: StatusCode=400 -- Original Error: adal: Refresh request failed. Status Code = '400'. Response body: {"error":"invalid_request","error_description":"AADSTS90002: Tenant name 'test_auth_fail' specified is not a valid DNS name and not valid external domain format.
Is this the expected output ?
Is there any API that i can invoke directly on authorizer to verify if my credentials are valid or not ?

@karthiksubraveti You can call Refresh() on the ServicePrincipalToken and if err is non-nil it should be an adal.TokenRefreshError.  Here's an example.
func main() {
	tenantID := "bad tenant ID"
	oauthConfig, err := adal.NewOAuthConfig(azure.PublicCloud.ActiveDirectoryEndpoint, tenantID)
	if err != nil {
		panic(err)
	}
	clientID := "bad client ID"
	clientSecret := "bad secret"
	spToken, err := adal.NewServicePrincipalToken(*oauthConfig, clientID, clientSecret, azure.PublicCloud.ResourceManagerEndpoint)
	if err != nil {
		panic(err)
	}

	err = spToken.Refresh()
	if err != nil {
		tre := err.(adal.TokenRefreshError)
		fmt.Printf("%+v\n", tre)
	}
}

Great. Thanks for the quick response.


Suggesting to install bash completion for vagrant from homebrew repo.

The desire for convenience is understandable, but I feel that caveats should address critical issues, not general usage recommendations.
Admittedly, there is no strict policy concerning the content of caveats. @vitorgalvao, if you disagree, feel free to merge.

I agree.
Thank you for the contribution nonetheless, @epsimatic, and apologies for taking so long. Sometimes a submission slips through and no one notices it for a while.

Hmm if we have to turn away something that will improve UX simply for lack of a semantic home, I wonder if there's a missing Cask feature here? It'd be nice to allow Casks to include usage recommendations. I'll spin up an issue.

My biggest issue with it is the more messages we output, the more they all blend and the sooner they’ll start to be ignored. There are some messages that really need to be shown for the experience to not be broken, and if we start to blend many optional suggestions there, users will start to ignore the important ones as well.
I believe the sentiment when a caveat goes by and you missed it should be “wait, what was that? I should go back and check”, and never “wait, what was that? Meh, probably nothing important”.


Don't understand the code.

What do you mean by this line?
Cross entropy between logits and [0,1,2,3,4....,batchsize]
F.cross_entropy(logits, torch.arange(pred.shape[0]))

Yes, there is a dimensional mismatch in this calculation

Yes, there will be a dimensional mismatch from the code

Yes, there will be a dimension mismatch problem from the code point of view

Logits finds the similarity between a prediction and all labels in the batch, it's shape should be [BS, BS]. For example, Logit[i][j] computes the i-th prediction's similarity to j-th label. Ultimately, we'd like the prediction to be most similar to its corresponding label, i.e., i-th prediction should be most similar to i-th label in the batch. This is referred to as "classifying within a batch" in the paper.  Therefore, we use the cross-entropy loss for the "classification" and usetorch.arange(pred.shape[0]) as the ground truth, which means exactly that the i-th predicition's ground truth index is i.
There should be a more straightforward way to implement BMC. I write it this way for conciseness and to show its resemblance to supervised contrastive loss, as explained in Eqn. 3.15.
@painlove1999  Could you provide more information on the dimension mismatch? The current requires both pred and label to be [BS,1].

I have added more descriptions to variable sizes in readme, hope this helps.
def bmc_loss(pred, target, noise_var):
    """Compute the Balanced MSE Loss (BMC) between `pred` and the ground truth `targets`.
    Args:
      pred: A float tensor of size [batch, 1].
      target: A float tensor of size [batch, 1].
      noise_var: A float number or tensor.
    Returns:
      loss: A float tensor. Balanced MSE Loss.
    """
    logits = - (pred - target.T).pow(2) / (2 * noise_var)   # logit size: [batch, batch]
    loss = F.cross_entropy(logits, torch.arange(pred.shape[0]))     # contrastive-like loss
    loss = loss * (2 * noise_var).detach()  # optional: restore the loss scale, 'detach' when noise is learnable

    return loss

Thank you for your answer. I misunderstood that the pred in your code is logits, so its dimension should be [batch, cls_num]. I will try to adapt your code in my program.

Logits 找到预测和批次中所有标签之间的相似性，它的形状应该是[BS, BS]. 例如，Logit[i][j] 计算第 i 个预测与第 j 个标签的相似度。最终，我们希望预测与其对应的标签最相似，即第 i 个预测应该与批次中的第 i 个标签最相似。这在论文中被称为“批次内分类”。因此，我们使用交叉熵损失进行“分类”，并使用torch.arange(pred.shape[0])作为ground truth，这意味着第i个预测的ground truth index是i。
应该有一种更直接的方式来实现 BMC。我这样写是为了简洁，并显示它与监督对比损失的相似之处，如方程式中所述。3.15。
@painlove1999 您能否提供有关尺寸不匹配的更多信息？当前的实现需要pred和labelto be [BS,1]。

Thank you for your answer. I misunderstood that the pred in your code is logits, so its dimension should be [batch, cls_num]. I will try to adapt your code in my program.

Great love the response.
Another question: Is the range of target [0,1] or [0, inf)?

Great love the response. Another question: Is the range of target [0,1] or [0, inf)?

Thanks! Same as the standard MSE loss, the target range can be anything, e.g., in age estimation, the target range is [0, 120]. It can be unbounded as well, i.e., (-inf, inf).


Project scope and future

6to5 has gone a long way in a few short months, since then I've learnt a lot of about maintaining an open source project as well as discovered what I see as shortcomings in the current ecosystem and environment.
There are a lot of complaints about 6to5 not being "future proof". Many are under the assumption that 6to5 will be a stopgap solution until ES6 is supported. I don't agree. I believe that there are things that 6to5 can expand upon to not only become future proof but to potentially influence future standards. 6to5 will always be necessary if you want next generation features, whether this is JSX, ES6, ES7, whatever, support and features can be added more quickly to 6to5 than it can in browsers and environments mainly because 6to5 only has to operate on a subset of the constraints placed on vendors.
Future
Ideally I'd like for 6to5 to be a more general JavaScript of the future transpiler. 6to5 already supports Flow/JSX as well as experimental ES7 features so the name isn't even representative of the project in it's current state although it is in how it's widely used.
A JavaScript transpiler based on future standards and specifications, whether ECMAScript or not, I think is an extremely noble goal. I think there's a large use case for 6to5 beyond just ES6. Having an interopable platform to base code transformations on I think is a very powerful idea. This may mean exposing a very feature-rich core that contains transforms or even exposing a public API.
Some of the decisions will need to be extremely calculated in order to provide a concise and specific goal. I'm well aware of the technical challenges associated with this, feature creep, maintenance etc. I'm not going to put a timeline on any of this. It could be in 3, 6, 12 months, the time is ultimately arbitrary, I'm looking for more general feedback on the concept rather than when it'll be appropriate.
What now?
Please let me know your thoughts, I'm extremely eager to get as much community feedback as possible. I have thoughts on how to go about doing a lot of this, including a modular parser etc that I'll elaborate on if necessary. Thanks to everyone who decides to leave feedback and criticism!
/cc @thejameskyle @eventualbuddha @stefanpenner @gaearon @AluisioASG @ocombe @amasad @timoxley @Dashed @monsanto

first off, congrats on the success of the project and thank you (and contributors) for moving really fast on improving and fixing bugs! :dancer: :dancer:

6to5 will always be necessary if you want next generation features, whether this is JSX, ES6, ES7, whatever,

+1, JavaScript will even become a faster moving language with ES7 and beyond as they'll have a faster release cycle and transpilers will always be needed. It's unfortunate that the name implies a specific version, however, you can always reverse engineer a new acronym (or change the name)

Having an interopable platform to base code transformations on I think is a very powerful idea. This may mean exposing a very feature-rich core that contains transforms or even exposing a public API

Agreed. All the language extensions that came out of Facebook where once experimental internal transforms before they became proposals (es7 spread) or community standards (JSX). Additionally, we do have profiling and other transforms that we'll continue to change and add to. And having an extensible and fast transpiler with a nice API for writing proprietary transforms will always be needed.

including a modular parser etc that I'll elaborate on if necessary

Please do. The parser story in JS is a bit of an unfortunate one at this point. The more parsers we have the harder it will become to make sure all of them are correct and are up-to-date. So I'm interested to hear about what you have in mind.

congrats on the success of the project and thank you (and contributors) for moving really fast on improving and fixing bugs! :dancer: :dancer:

Thanks! It's crazy to see your crappy sideproject turn into something that people are actually interested in and want to use.

It's unfortunate that the name implies a specific version, however, you can always reverse engineer a new acronym (or change the name)

The name is definently going to be changed. Not sure when, not sure what to, but it's definently something I want to do.

Additionally, we do have profiling and other transforms that we'll continue to change and add to. And having an extensible and fast transpiler with a nice API for writing proprietary transforms will always be needed.

Is there currently a platform that you use to develop these already? ie. jstransform, recast

Please do. The parser story in JS is a bit of an unfortunate one at this point. The more parsers we have the harder it will become to make sure all of them are correct and are up-to-date. So I'm interested to hear about what you have in mind.

Basically something similar to marijnh/acorn#168. It'd involve creating yet another parser but it's really the only way in order to properly integrate a solid Parser API. As mentioned in that issue, various hooks would be placed around the "core" parser that shell out behaviour to various submodule parsers. The main hurdle would be performance though, maintaining the performance of acorn (or another parser) while retaining the pluggability would be a difficult problem to solve.

Is there currently a platform that you use to develop these already? ie. jstransform, recast
yes, mostly jstransform, there are things that we're blocked on because at it's current form it doesn't support all the things that ast->ast transform can do.

A public transformer API may be a solid idea then since transformers can be pretty versatile and compact. Take optional.undeclaredVariableCheck or spec.illegalTopLevelThis for example.

I decided to switch to use 6to5 when I saw zero-pain builtin JSX and Flow support and ES7 goodies. I heard this as “we're not afraid to experiment in core and we're not dogmatic purists”, which compelled me to switch. I hope 6to5 retains its spirit of trying out good concepts at fast pace wherever they come from.

Modularity is often the key to success for open source projects. It helps the project grow, it can answer to many use cases and when people want something too specific they can to write their own addon.
Even if there is a small performance loss by making a lot of parts optional (and I'm not sure there would be), the fact that you can opt out of things that you don't need (JSX/Flow for example) will make up for it. In the end it might even be faster.
I heard that you're merging 6to5 with esnext, it might be a good time to rename the project.

BTW I'm really happy 6to5 went Webpack over Browserify kind of modularity, at least for now—it would've been painful to have all these transforms as separate packages and have to “build your own 6to5”. Even if in future we want more pluggable transforms, IMO it's best to retain beginner-friendly batteries-included approach.

@ocombe 6to5 already merged with esnext a month ago. A name change is appropriate but not to esnext which is what I assume you're proposing.
@gaearon Yeah, I'm leaning more towards a powerful transformer API with a lot built-in. Meaning that all official transformers would be in the main package by default and only third party ones would be available elsewhere. I think this is a problem that esnext suffered from, having the main package contain all the modules but also having them all available separately, at least for me, made it very confusing.

It's been a month already? Oh man!
No I wasn't suggesting to change it to esnext, just that merging 2 projects would result in a new entity [name to be defined] :)

@ocombe The merger was done weeks before it was publicly announced :stuck_out_tongue_winking_eye:

I think it's super important to keep the project as standards compatible as possible so while it might not be a stop gap there will be several stop gaps. This project is amazing work and we enjoy using it. I think that a focus should also be producing faster more optimised ES5 code.
I'd also really love to see live-compilation improve. Ideally if it was only a few milliseconds I wouldn't mind the hit of 6to5 on IE10 for instance knowing that other browsers I support will run ES6 code. If I can truly develop ES6 and get 'older browsers' out of the way sacrificing a bit of performance that's awesome for me.
Also allowing easily extending the syntax from the outside of 6to5 would be a great way to test out proposals and new ideas. You've done great work enabling new proposals but it can be even better.

ES6 is dead, it's ES2015 now, so 6to5 should be 2015to5... hmm time to rename the project ! :smile:

my suggestion is naming it as something decoupled from version, something like esnext or jsnext (or something along those lines)

For the parser, maybe checkout the fresh esprima fork, espree that plan to get full support for es2015 asap (see https://github.com/eslint/espree/issues/10).

Don't rename, the ES6 name stuck while its feature set was frozen. And don't rename even if someone else decides to call it something else when there's no new feature change (e.g. ES2015) :smile:

@MoOx The 6to5 parser is already more feature complete and supports more than espree.
@Dashed A rename is still necessary regardless.
Also just so we're clear, the name "esnext" is not appropriate. Not only is it ambiguous but as per my original proposal, it doesn't adequately describe the direction I want to take nor the current status of this project (React, JSX, Flow etc).

@sebmck Out of curiosity, do you have a name in mind? With your ambitious vision for what 6to5 will become, I think the name shouldn't contain cues that subtly reflect towards anything JS (e.g. ES-); and you should probably come up with a random name much in the same manner as istanbul, bluebird, mocha, acorn, etc. Hopefully something that rolls off the tongue well :)

@Dashed No idea :stuck_out_tongue_winking_eye: I guess it's why I didn't want to put a timeline on any of this.

something like asskickify

Name it 20xx, with a mega man logo for maximum credibility.

:+1: love that one :D
On Jan 25, 2015 11:23 PM, "Fabrício Matté"<EMAIL_ADDRESS>wrote:

Name it 20xx, with a mega man logo for maximum credibility.
—
Reply to this email directly or view it on GitHub
https://github.com/6to5/6to5/issues/568#issuecomment-71396934.

Name suggestions:

ESEdge
JSEdge

20xx is cool.
But what about Y2.1K?

Could be "xxxxxxx" for a bit more of future proofness. ;)

Maybe have the name be something related to Transformers. @3rd-Eden suggestions? :smile:

I'd rather this issue not delve into name bikeshedding :stuck_out_tongue_winking_eye:

Ideally I'd like for 6to5 to be a more general JavaScript of the future transpiler.

Isn't it already?
I believe 6to5 is quite mature already. A plugins/external transforms API could be nice, but the centralized/batteries-included approach has worked nicely so far.
Sorry, but I don't quite grasp what kind of feedback you're looking for.

@UltCombo It is, but the branding hasn't quite caught up and to fully realise this a transformer API is necessary.

@UltCombo Mainly just looking for a general :+1: on the overall idea, people are worried about feature creep and have been saying "this is out of scope for this project" which is why I felt the need to detail exactly what this project is and what it's going to be.

:+1: JS.next to JS of today is the way to go.
I probably won't make use of features that are not on ECMAScript standard tracks, but I don't mind the transpiler/transformer supporting them. In fact, I found some ideas in the playground pretty nice -- a couple months ago I had the exact same idea for the mallet operator, except for the name heh.

:+1: on the transformer API, with a design goal being to allow others to hook up new transformers without having to necessarily crack the hood on the 6to5 source (which may also lessen the entry barrier for those who may be intimidated to get something into the 6to5 core).  Also :+1: on the batteries-included approach, but with the suggestion that maybe the 'line in the sand' is to include, by default, only those transforms that represent 'blessed' ES spec items (i.e. those that TC 39 has given the green light).  All others may make sense via 'opt-in' only?  That being said, I like how you've grouped transforms in v3 (es6, es7, playground, etc).

I had the exact same idea for the mallet operator, except for the name heh.

But mallet is way more rememberable than "pipe-pipe-equals". :smile:

@sparty02 All the current transformers would be included out of the box, I'm not comfortable with splitting everything up and putting it into alternate packages as it reduces barrier to use and makes it hard to maintain. Only stable ES features and JSX/Flow will be enabled by default.

@jridgewell hahah nice. My initial idea was something in the lines of "Defaulting assignment operator", but this name would be rather confusing nowadays as default parameters and destructuring defaults only assign a default value when the given value evaluates to undefined, and not falsy. Anyway, mallet is more creative/nicer indeed. :smiley:

One name suggestion that I've come to quite like is "Rosetta".

@sebmck :+1:   Another one that was on my mind was "autobot"  (i.e. because it represents all of the good transformers) :smiley:

@sparty02 Haha, Hasbro sending a cease and desist to an open source project would make a good headline.

@sebmck I don't know how much you've fleshed out of the extensibility stuff, but I just saw your comment about "pluggable parsers not really being feasible."
I agree with you, but I would phrase it as: having both extensible syntax + extensible transformers is not feasible in the general case. This is a well-known compilers problem w/o a silver bullet and I think people expecting to have a "one-size fits all JavaScript extension toolkit" are gonna be disappointed.
There are certain classes of transformers which this can work for (for example, parametric transformers that only transform AST types they extend the parser with), but we'd have to be very careful about limiting scope so this doesn't turn into a waste of time. In specific, non-parametric transformers (like block scoping and generators) are not really possible to compose without one being aware of the other (In 6to5's case, block scoping is aware of generators).
We could just allow 3rd party transformers w/o the 3rd party syntax changes which avoids most of the problems... but, is that very useful?
Maybe all of the above is already known, I just wanted to put it on record.
I think a good first step for us would be to make it easier for people to extend 6to5 via forking the project. Right now it's annoying that acorn-6to5 and regenerator-6to5 are external dependencies--I can't make a single branch with syntax changes and transformer changes. If we inlined them and used git subtree to pull changes from the parent repositories it would be a big improvement I think.
With a healthy ecosystem of forks we could integrate the best ones in the official 6to5 playground, and skip all of the effort involved with making 3rd party APIs and fretting about how they compose.

@monsanto Allowing external transformers without additional syntax is very useful. Here are some potential transformers that you could do off the top of my head (I've included projects that do the same/similar things that will be allowed with the transformer API):

Throw on undeclared variables and offer suggestions based on the levenshtein distance of all other variables in scope.
Rename local variables. (UglifyJS)
Precompute constant expressions and hoist them to avoid reevaluating them. (Closure compiler)
Hoist anonymous functions to top level and append local variables to the params/all calls to avoid multiple evaluation. (This is basically an automated and pragamatic way of doing the types of optimisations @gaearon has been doing with #547 etc)
Turn ifs into binary/conditionals. (UglifyJS)
Inline functions (Closure compiler)
Profiling code
Compile-time linting

It'll be amazing if minifying becomes a 'transformer' of 6to5.

@Dashed It's already possible. The source for UglifyJS isn't very nice and straightforward which is where the transformer API comes in where it allows you to do these kinds of transformations very cleanly and easily.

@monsanto I wasn't actually aware that git subtree was a thing. I'll definently look into it as git submodules are starting to drive me crazy. I'm weary on encouraging forks that coexist by themselves because I don't want fragmentation.

Anything wrong with just naming it 'transformer', 'transformerJS', or some variation of the above?
Not particularly creative but I feel it captures the intent of the project as you've described it fairly well. =)

@lewisl9029 Something more creative is always good. I think a strong character and philosophy is very important.

@monsanto @sebmck I'm also looking forward to Flow exposing an API for analysis/type info I believe we'll be able to do more involved optimizations, things closure compiler does: dead code elimination, inlining etc.
While there are name suggestions flying around I'll drop in mine: RewindJS :stuck_out_tongue_winking_eye:

let's just call it esnext :)

@caridy See my previous comment.

es.future, es.utopia, utopia, amazing-horse-es...

I'd rather this issue not delve into name bikeshedding :stuck_out_tongue_winking_eye:

I've created another issue #596 so this one doesn't go off topic as I'd like for this issue to be exclusively be overall direction discussion.

Oh alright, a separate issue for that topic is better indeed.
As for direction, it looks like you already have solid plans, and I hardly see any good/valid counter-argument.

@sebmck I agree those are good use cases for 3rd party transformers. It was my understanding that you wanted to use to use this interface for language extensions, which none of your suggestions are.
Re forks: without allowing 3rd party syntax modifications, the only way to experiment with language design in the context of 6to5 is via a fork. I agree that reducing fragmentation is a worthwhile goal but unless you plan to accept every language feature immediately, some of these language features will have be maintained separately long-term until they are popular enough to warrant inclusion in 6to5 proper. It's worth keeping this use-case on our radar, which is why I suggested the git subtree stuff.
@amasad I am also interested in this direction. Whole-program dead code elimination is especially attractive in a 6to5 context b/c of the extra structure that ES6 modules give.

@monsanto @sebmck Reading through the feedback above (and some conversations in the Gitter room), it seems that 6to5 is positioned to provide an engine for a lot of different transpilation use cases... those wanting to experiment with new syntax, those wanting to introduce new semantics, and those wanting to use some kind of transform optimizations.  IMO, it would be unfortunate to force people to fork the whole codebase in order to introduce one of these new use cases to the engine.  It seems like too high of an entry barrier.
It would be great to have extension points for each of these scenarios (with the core lexers/transforms leveraging these same extension points).  Maybe some kind of lexer/transform pipeline that someone could tap into with their own custom 'plugin'.  I'm sure there is a lot of work required to support this kind of architecture, but it seems it would pay dividends long term!
Just thinking out loud.... take it with a grain of salt.

I'm really liking the eslint project. Since 6to5 will be supporting syntax (e.g .playground) not fully covered by jshint or eslint, it'll be great if 6to5 could be able to provide eslint rules for transformers it exclusively provides. This would make 6to5 very attractive to other devs.
This would entail a separate project, something like 6to5-eslint-rules.

@sebmck by enabling custom transformations would it be possible to use 6to5 as a javascript macro compiler like mozillas sweet.js? I'd love to be able to use something like the contract syntax by contract.js which are implemented as sweet.js macros.
Right now both projects (6to5 and sweet.js) are mutually exclusive, since 6to5 won't parse the custom macros and sweet.js won't parse es6 or es7 features.

@despairblue Most likely not. It'd require non-trivial parser changes which would require a pluggable parser which has it's own set of engineering hurdles and challenges.

@sebmck integrating sweet.js itself might not be so difficult, it exposes a sweet.expand() method which returns a list of esprima tokens + hygiene information, any syntax it doesn't understand is passed on through, so it could potentially be used as a pre-transformer.

@phpnode What do you mean "passed on through"?

@Dashed How would we provide ESLint rules for syntax that ESLint can't parse?

A possible thing I can do is add some delimiters to the parser so anything between certain comments isn't parsed and is just inserted verbatim into the generated output.
// parse:ignore start
blaasdf

asdfer $#$%#@$%!!!!
// parse:ignore end

@sebmck when using .expand(), any tokens that sweet.js doesn't recognise are simply kept intact, but things that it does recognise get transformed, so, you could have a file like this (let's call it input.sjs):
macro test {
  rule {
    $testName:lit $body...
   } => {
    describe($testName, function () $body...)
  }
}

test "hello world" {
  console.log("this is a test");
}

class Foo {
  // sweet.js doesn't support the `class` keyword so this would normally throw if just using .compile()
}

Calling sweet.expand(fs.readFileSync('input.sjs', 'utf8')) will give me back a list of esprima tokens for that file, but the macro will be expanded, so the tokens actually represent this source:
describe('hello world', function () {
    console.log('this is a test');
});

class Foo {
  // sweet.js doesn't support the `class` keyword so this would normally throw if just using .compile()
}

It should then be theoretically possible to pass this on to 6to5 to use as normal.

@sebmck I'm not familiar with custom eslint rules, as I haven't delved that deep into it yet.
I don't think start/stop delimiters may work, as it may interfere with whitespacing stuff (unsure how much 6to5 tries to preserve).

@phpnode that would also mean that one couldn't use macros inside a class, or a fat arrow function or any other es6 statement, right?

@phpnode Are you proposing using sweet.js as the tokenizer for the parser?
@Dashed Why would whitespace be an issue?

@sebmck I'm only basing my assumption on this:
// parse:ignore start
blaasdf

asdfer $#$%#@$%!!!!
// parse:ignore end

class Test {

}

but, I figured it may not work so well with in-line stuff.

I'm throwing this as a future thing, but I hope there would be a beautifier transform (i.e. don't transform to ES5). Then it'll be awesome to trivially make a 6to5-beautifier plugin for editors like Sublime Text.

@phpnode @sebmck :+1: for some kind of sweet.js compatibility/integration/interop (from either side). I'd love to be able to use my two favourite JavaScript enhancers together. Ping @disnet.

Are you proposing using sweet.js as the tokenizer for the parser?

@sebmck maybe, I think it's worth exploring at least, although @natefaubion informs me that there will be some restrictions if we do it that way - you wouldn't be able to use ES6 features within macros. Personally I'd be ok with that tradeoff.

@chocolateboy I've recently been playing around with 6to5 interop in sweet.js on the es6-modules branch (the es6 parser on this branch is up to date). At the moment this just works by a flag that first compiles everything via sweet.js to a string and then passes the string off to 6to5.
Obviously this is not terribly efficient. It would be better if I could just pass a parser API AST to 6to5.
@phpnode note that sweet.expand actually gives you syntax objects which wrap esprima tokens with a lexical context (hygiene) which is probably not appropriate for 6to5 to consume. Better for sweet.js to figure out the hygiene and give an AST. @natefaubion is right that there is a little complication on the sweet.js side to get 6to5 working inside case macros but I think that's pretty straightforward for us (a compiler flag that says run 6to5 before evaling case bodies).

@disnet There's actually an API for just passing the AST to 6to5, looks like docs for it was lost with the transition to the new website. require("6to5").transform.fromAST(ast, code, opts);.

@disnet awesome to hear that you're already playing with this, won't the problem with sweet.js supplying an AST be that it will have to understand all of the syntax 6to5 already supports, e.g. JSX, flow types etc? Or would you consider dropping the current esprima fork in favour of https://github.com/6to5/acorn-6to5 ?

@sebmck oh cool! I'll play around with that then.
@phpnode true. Switching to acorn-6to5 wouldn't be enough though. Internally sweet.js builds up its own pseudo-AST to allow macros to match :expr and related pattern classes. We would have to extend the internal structure to understand JSX and other non-standards path extensions.
Philosophically sweet.js wants to recognize and parse standard JavaScript with extensions done via macros (this is the value proposition story of macros, in general compilers don't compose but macros do). So sweet.js and 6to5 can have nice interop on the standardized (or standardizing) subset of JS but if you want to use macros and 6to5 extensions the interop story is less great.

sweet.js interop would be HUGE...I'd commit cycles to any effort, ping me if I can help in any way. Otherwise, I'll be experimenting as well.

I'm extremely open to sweet.js interop. Not quite sure how it'd work but it's worth investigating.

So a couple more thoughts to clarify what directions we could take on sweet.js/6to5 interop.
Sweet.js can generate three things that could be fed to 6to5, a string sweet.compile(), an AST sweet.parse(), or an array of syntax objects sweet.expand() (like @phpnode suggested originally).
The string and AST would both have to be syntactically valid JS (we intend to just follow the current ES-whatever spec) which means if you wanted to use both sweet and 6to5 with extensions like JSX this approach wouldn't work. As I mentioned switching to acorn-6to5 isn't enough and the costs of keeping sweet in sync with 6to5 extensions probably isn't worth it.
The benefit of the string/AST approach is that it works right now (for certain values of "works").
The array of syntax objects is possibly the better choice since sweet.js hasn't yet attempted to parse it so the results can be "syntactically invalid" from the sweet perspective but fine from the 6to5 perspective (e.g. code with JSX). However, this approach does requires 6to5 to understand what a syntax object is.
The basic idea to a syntax object is that it wraps a normal token with its lexical context (which is a lazy set of potential renamings). The reason 6to5 would need to be aware of this is because you need to know the parser context to know if you should ask for the renamed version of an identifier (by calling the sweet function resolve) or ask for its original non-renamed version (by just grabbing the token). For example:
var foo = 42;
var o = {
    foo: foo
}

All three foo syntax objects have the same lexical context but the property foo should not have the renaming and only the parser knows this.
This approach still has some limitations on the sweet.js side since we won't know about 6to5 extensions which limits the kinds of syntax macros can recognize:
macro m {
    rule { $x:expr } => { /* ... */ }
}
// fails to match even though the div is conceptually an expr
var d = m <div className="foo" />

But this probably isn't a huge deal and gets us closer to the ideal than the other approaches.

I'm just conscious of performance. Ideally 6to5 and sweet.js have to be aware of each other to implement any sort of elegant interop. One of the ways I can see this potentailly working out is if acorn-6to5 parses the sweet.js macro syntax and when it encounters it pass it onto some sweet.js API to digest. Might be good to create a new issue to track this so it's more consolidated. I'm skeptical that it can be implemented elegantly.

Since this issue was first opened I've been thinking more and more about what 6to5's continued role in the community will be. There has been a bit of confusion in the past as to what will happen with 6to5, which can largely be attributed to its name.
However, the truth is that 6to5 is not going anywhere. Even when ES6/7/2015 is supported across all environments, the excellent work @sebmck and contributors have put into 6to5 will continue to be an important part in the community.
If we look at the current state of JavaScript tooling, there's dozens and dozens of implementations of parsers and transpilers. From compile-to-javascript languages to syntax extensions, from minifiers to beautifiers, linters to code coverage instrumentors, there is a lot of tooling that depends on these two fundamental pieces.
Everyone is constantly re-implementing the same things and it's created an absolute mess, and it's a nightmare for both evolving the language and for beginners to learn/debug.
In the future I think Acorn will largely be the parser of choice for most people (although I'm interested to see what the jQuery foundation does with esprima). Hopefully one of them will become pluggable in the future.
If 6to5 solves the transpiler half of this equation it could unite energy in the community by giving people a common utility to write whatever tool they want.
@sebmck you've spoken to me in the past about how easy it would be for you to add minifying functionality to 6to5, I believe linting was mentioned as well. You've also bragged about how little code it takes to write a new transformer :stuck_out_tongue_winking_eye:.
Giving people the platform to do that would be awesome.
TL;DR Acorn is to Parsers as 6to5 is to Transpilers

@thejameskyle Couldn't have worded it better myself.
This issue can probably be closed since I've outlined the project direction that I want to pursue and there haven't been any major objections. Thanks everyone for the invaluable feedback and criticism! Very excited for the future.

Congratulations. I’m very excited to know that you are committed to being more than just a stopgap measure.

Always have a vision. Why spend your life building other people’s dreams?—Orson Wells


add blas dependency

Checklist

[x] Used a fork of the feedstock to propose changes
[x] Bumped the build number (if the version is unchanged)
[ ] Reset the build number to 0 (if the version changed)
[x] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[x] Ensured the license file is being packaged.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@conda-forge-admin please rerender

Oh, it's r-libcoin that needs an update, not that one.


Upgrade to 5.2 breaks Auth in my case

Laravel Version: 5.2.45
PHP Version: 5.6.28
Database Driver & Version:

Description:
I upgraded my laravel version to 5.2 and I have the following structure:
(Assuming app name is TestApp)
app/
----Models/
--------User.php
When I try to make a Auth::attempt() I get an exception in createModel() method (line 128 of EloquentUserProvider.php) which tries to add a prefixed \ to the namespace of the php class. My model code looks like this:
<?php

namespace TestApp\Models;

class User ...

So the assertion message is this:
exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Class 'TestApp\Models\User' not found'
My auth.php config has a section which looks like this:
    'providers' => [
        'users' => [
            'driver' => 'eloquent',
            'model' => TestApp\Models\User::class,
        ]
    ],

Steps To Reproduce:
Try to use Auth::attempt() with the above mentioned directory structure. (Assuming upgrading from 5.1.*)

Please read the upgrade guide.

@srmklive thanks for the really helpful comments -_-. I followed the upgrade guide. I wouldn't comment here if I didn't go through it. The fix for it was to include the Model explicitly like this:
<?php

namespace Illuminate\Auth;

use TestApp\Models\User;
use Illuminate\Support\Str;
use Illuminate\Contracts\Auth\UserProvider;
use Illuminate\Contracts\Hashing\Hasher as HasherContract;
use Illuminate\Contracts\Auth\Authenticatable as UserContract;

class EloquentUserProvider implements UserProvider
{
...

    /**
     * Create a new instance of the model.
     *
     * @return \Illuminate\Database\Eloquent\Model
     */
    public function createModel()
    {
        //$class = '\\'.ltrim($this->model, '\\'); <-- Unused

        return new User();
    }

I tried flushing the config cache as well. It turns out that it is not available at that point to import the App model.

Okay the problem was fixed by clearing the cache.


write_json

Feature Request
Describe the solution you'd like
Subscribe to the topic published by the pendulum demo/manager/whatever and store the data in a json file (until node is cancelled)
Teachability, Documentation, Adoption, Migration Strategy
json library for python... should be straight forward

to do :

convert msgs to dictionary


v1.9 backports 2021-01-18

#14524 -- jenkinsfile: Allow enabling host firewall in k8s-all CI (@pchaigno)
#14624 -- docs: AKS - remove azure0 from CNI chaining config (@ti-mo)
#14623 -- pkg/kvstore: fix panic when closing etcd connections on error (@aanm)

Once this PR is merged, you can update the PR labels via:
$ for pr in 14524 14624 14623; do contrib/backporting/set-labels.py $pr done 1.9; done

Looks like a duplicate of https://github.com/cilium/cilium/pull/14644, same issue.

Looks like a duplicate of https://github.com/cilium/cilium/pull/14644, same issue.


Widgets

It is not very important, but I think it would be good to add Widgets(with anime/manga stats and history, if it is possible with your current api).

#416


swamp: race in NewSwamp and Core

Found in https://github.com/celestiaorg/celestia-node/pull/334

So this should be fixed after I finish with https://github.com/celestiaorg/celestia-node/issues/371
Some sample runs of the draft(will be closed) https://github.com/celestiaorg/celestia-node/pull/393
https://github.com/celestiaorg/celestia-node/runs/4938174725?check_suite_focus=true


Fix "modification requires exclusive access" crash when building with…

… iOS 11 SDK
Shout out to http://michael-brown.net/2017/swift-and-kvo-context-variables/
Fixes #72.
This fix is probably preferable to full-on Swift 4 migration until https://bugs.swift.org/browse/SR-5752 is dealt with.
(Also kinda feels like we're past due for a version bump?)

accept this PR please, we really need this changes

@JMStack can you point to the PR branch while you wait for upstream to pull in the changes? e.g.
pod 'PullToRefresher', :git => 'https://github.com/MindSea/PullToRefresh', :branch => 'fix-simultaneous-access'

if you use CocoaPods.

up ?

@nolanw , thanks you very much! It's really good solution.


Add ticket type when sending request to RCM

the default type is task, they need to change to ticket type, so we can create with ticket type.
$ jirago --help
Usage of jirago:
-type string
jira issue type (default "Task")

/lgtm


can't run

error: WatchKit Extension has no WKAppBundleIdentifier value in its Info.plist.

Are you using AFNetworking.xcworkspace ?


Report a bug

Dear author,
When run_training, I have this error. Do you have any idea?
Original exception was:
Traceback (most recent call last):
File "/home/chenchen/tools/pycharm-community-2017.3.1/helpers/pydev/pydevd.py", line 1668, in
main()
File "/home/chenchen/tools/pycharm-community-2017.3.1/helpers/pydev/pydevd.py", line 1662, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "/home/chenchen/tools/pycharm-community-2017.3.1/helpers/pydev/pydevd.py", line 1072, in run
pydev_imports.execfile(file, globals, locals)  # execute the script
File "/home/chenchen/tools/pycharm-community-2017.3.1/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/home/chenchen/work/GAN/StyleGAN2_tet/run_training.py", line 857, in
main()
File "/home/chenchen/work/GAN/StyleGAN2_tet/run_training.py", line 852, in main
run(args)
File "/home/chenchen/work/GAN/StyleGAN2_tet/run_training.py", line 820, in run
trainer = get_trainer(args)
File "/home/chenchen/work/GAN/StyleGAN2_tet/run_training.py", line 698, in get_trainer
G, D = get_models(args)
File "/home/chenchen/work/GAN/StyleGAN2_tet/run_training.py", line 664, in get_models
**common_kwargs
File "/home/chenchen/work/GAN/StyleGAN2_tet/stylegan2/models.py", line 826, in init
'num_layers': 1
File "/home/chenchen/work/GAN/StyleGAN2_tet/stylegan2/modules.py", line 1362, in init
ConvUpLayer if use_up else ConvLayer, layer_kwargs, wrap=True, noise=noise))
File "/home/chenchen/work/GAN/StyleGAN2_tet/stylegan2/modules.py", line 188, in _get_layer
layer = layer_class(**kwargs)
TypeError: init() got multiple values for argument 'self'

Hello!
What settings did you use when you ran that code? I can fix the problem if
I am able to reproduce the error. I know where it is happening but I am not
sure why. Because it sounds like the "kwargs" contains a value for the key
'self'. But that dictionary has already popped the 'self' key a few code
lines above.
layer_kwargs.pop('self')
That should have removed the keyword.
You can also try to run the code directly from the command-line instead of
using PyCharm because I have not tested it with PyCharm.
Lets try to solve it!
On Wed, Jan 8, 2020 at 1:55 PM Chen Chen<EMAIL_ADDRESS>wrote:

Dear author,
When run_training, I have this error. Do you have any idea?
Original exception was:
Traceback (most recent call last):
File
"/home/chenchen/tools/pycharm-community-2017.3.1/helpers/pydev/pydevd.py",
line 1668, in
main()
File
"/home/chenchen/tools/pycharm-community-2017.3.1/helpers/pydev/pydevd.py",
line 1662, in main
globals = debugger.run(setup['file'], None, None, is_module)
File
"/home/chenchen/tools/pycharm-community-2017.3.1/helpers/pydev/pydevd.py",
line 1072, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File
"/home/chenchen/tools/pycharm-community-2017.3.1/helpers/pydev/_pydev_imps/_pydev_execfile.py",
line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/home/chenchen/work/GAN/StyleGAN2_tet/run_training.py", line 857, in
main()
File "/home/chenchen/work/GAN/StyleGAN2_tet/run_training.py", line 852, in
main
run(args)
File "/home/chenchen/work/GAN/StyleGAN2_tet/run_training.py", line 820, in
run
trainer = get_trainer(args)
File "/home/chenchen/work/GAN/StyleGAN2_tet/run_training.py", line 698, in
get_trainer
G, D = get_models(args)
File "/home/chenchen/work/GAN/StyleGAN2_tet/run_training.py", line 664, in
get_models
**common_kwargs
File "/home/chenchen/work/GAN/StyleGAN2_tet/stylegan2/models.py", line
826, in init
'num_layers': 1
File "/home/chenchen/work/GAN/StyleGAN2_tet/stylegan2/modules.py", line
1362, in init
ConvUpLayer if use_up else ConvLayer, layer_kwargs, wrap=True,
noise=noise))
File "/home/chenchen/work/GAN/StyleGAN2_tet/stylegan2/modules.py", line
188, in _get_layer
layer = layer_class(**kwargs)
TypeError: init() got multiple values for argument 'self'
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/Tetratrio/stylegan2_pytorch/issues/1?email_source=notifications&email_token=AB3LWHETW5UDS2ORP3UETX3Q4XEL5A5CNFSM4KEH5FQ2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IEYFDTQ,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AB3LWHASJQZYOZB3VIMHN3TQ4XEL5ANCNFSM4KEH5FQQ
.

Thanks for your instruction. I have soved problem. Another question is that how many iterations do your program need to train a face generator (FFHQ)?

Hello! What settings did you use when you ran that code? I can fix the problem if I am able to reproduce the error. I know where it is happening but I am not sure why. Because it sounds like the "kwargs" contains a value for the key 'self'. But that dictionary has already popped the 'self' key a few code lines above. layer_kwargs.pop('self') That should have removed the keyword. You can also try to run the code directly from the command-line instead of using PyCharm because I have not tested it with PyCharm. Lets try to solve it!
…
On Wed, Jan 8, 2020 at 1:55 PM Chen Chen @.***> wrote: Dear author, When run_training, I have this error. Do you have any idea? Original exception was: Traceback (most recent call last): File "/home/chenchen/tools/pycharm-community-2017.3.1/helpers/pydev/pydevd.py", line 1668, in main() File "/home/chenchen/tools/pycharm-community-2017.3.1/helpers/pydev/pydevd.py", line 1662, in main globals = debugger.run(setup['file'], None, None, is_module) File "/home/chenchen/tools/pycharm-community-2017.3.1/helpers/pydev/pydevd.py", line 1072, in run pydev_imports.execfile(file, globals, locals) # execute the script File "/home/chenchen/tools/pycharm-community-2017.3.1/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "/home/chenchen/work/GAN/StyleGAN2_tet/run_training.py", line 857, in main() File "/home/chenchen/work/GAN/StyleGAN2_tet/run_training.py", line 852, in main run(args) File "/home/chenchen/work/GAN/StyleGAN2_tet/run_training.py", line 820, in run trainer = get_trainer(args) File "/home/chenchen/work/GAN/StyleGAN2_tet/run_training.py", line 698, in get_trainer G, D = get_models(args) File "/home/chenchen/work/GAN/StyleGAN2_tet/run_training.py", line 664, in get_models **common_kwargs File "/home/chenchen/work/GAN/StyleGAN2_tet/stylegan2/models.py", line 826, in init 'num_layers': 1 File "/home/chenchen/work/GAN/StyleGAN2_tet/stylegan2/modules.py", line 1362, in init ConvUpLayer if use_up else ConvLayer, layer_kwargs, wrap=True, noise=noise)) File "/home/chenchen/work/GAN/StyleGAN2_tet/stylegan2/modules.py", line 188, in _get_layer layer = layer_class(**kwargs) TypeError: init() got multiple values for argument 'self' — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#1?email_source=notifications&email_token=AB3LWHETW5UDS2ORP3UETX3Q4XEL5A5CNFSM4KEH5FQ2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IEYFDTQ>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB3LWHASJQZYOZB3VIMHN3TQ4XEL5ANCNFSM4KEH5FQQ .

In the stylegan2 paper they iterate over 25 million images before stopping. With a batch size of 32 that means 781,250 iterations.

Oh, such a long time. It will take almost two weeks for me. I will report the results after training. Thank you !

In the stylegan2 paper they iterate over 25 million images before stopping. With a batch size of 32 that means 781,250 iterations.

Yea, it takes very long to train! In the paper they used 8 V100 GPUs and trained for 9 days.
No problem, good luck!

@Tetratrio  Hi, after how many iterations should we expect to see a decent result if we train from scratch? Here is a plot of G_loss (red) and D_loss (blue) for a finetuning experiment (hence the initial dip). I don't see any visual improvements after 10,000 iterations and the discriminator loss also seems to be not helping. The results are decent but lack the high fidelity of the original paper results.

However, I am training on 2300 images, so the small dataset size is likely the issue. Also do you know why no VGG (perceptual) loss is used by stylegan?


[Enhancement] comments on elseif statements

It would be nice if this could be improved to not do this:

But how do I define which comments don't indent，
for example：
if a then
---0
local t  = 123
---1

---2
---3
elseif b c then
end

and only comments
if a then
--body
elseif d then
end

Idk if you can but I would suggest to let the comment where it is when it’s before an elseif.
if a then

    --inside comment
elseif b then

--outside comment
elseif c then
    --something
end

I would consider this feature

If there is no meaningful statement block, the comment is all indented as a block, otherwise comments below the meaningful block are considered to belong to the comments of the elseif/else branch

If there is no meaningful statement block, the comment is all indented as a block, otherwise comments below the meaningful block are considered to belong to the comments of the elseif/else branch

sounds good 👍

this feature has been implemented by option if_branch_comments_after_block_no_indent = true.
The next release, the feature will be available


[Warning] compilation warning ITK_LEGACY_REMOVE

Compilation on Ubuntu 18.04:
/home/mathildemerle/Dev/MUSIC3/medInria-public_ExtProjs/build/ITK/Modules/Core/Common/itkConfigure.h:82: avertissement : "ITK_LEGACY_REMOVE" redefined
 #define ITK_LEGACY_REMOVE

There are a lot of these warnings when you compile from scratch.

Same problem on Windows/VS2015

Closed by PR #407


fix(select): on select reset query

:tada: This PR is included in version 2.12.1 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Scraping Ant does not work anymore

Hi,
I have been using Scraping Ant all the time, but a few days ago I got the message: "This domain no longer works with Scraping Ant, please upgrade your account". I actually still have enough free scrapes.
Can anyone help me with this?

@L4ma Yes, they are blocking their free service from scraping google becuase Google bans ips when they are detected. Its bad for their business. For now, our best bet is scrapingrobot.


Package upgrade: webview_flutter 2.0.8 --> 2.0.14

Summary
Package upgrade: webview_flutter 2.0.8 --> 2.0.14
Changelog
[General] [Change] - Upgrade webview_flutter from 2.0.8 to 2.0.14 (changelog)
Test Plan
Regression test the following areas:
./lib/ui/survey/survey_card.dart
./lib/ui/common/webview_container.dart
./lib/core/utils/webview.dart

Deferred


Port-Address-Translation (PAT)

As ...
Austin - Network Automation Engineer
I want ...
the possibility to model port-address-translation inside of Nautobot. See this for a corresponding NetBox issue.
So that ...
I can accurately model everything that I have configured / want to configure in my network.
I know this is done when...
I have the possibility to model port-address-translation inside of Nautobot. For example:

Traffic hitting the public IP address <IP_ADDRESS> on port TCP/456 gets translated to the private IP address <IP_ADDRESS> on port TCP/50.

Optional - Feature groups this request pertains to.

[ ] Automation
[ ] Circuits
[ ] DCIM
[X] IPAM
[ ] Misc (including Data Sources)
[ ] Organization
[ ] Plugins (and other Extensibility)
[ ] Security (Secrets, etc)
[ ] Image Management
[ ] UI/UX
[ ] Documentation
[ ] Other (not directly a platform feature)

Database Changes
Yes, database changes would be necessary. I don't 100% understand where/how the current NAT model is represented so I can't give exact places where models might have to change or be added.
External Dependencies
None

As of 1.1.0 nautobot-firewall-models comes with the capability of modelling PAT. From my point of view it would make sense to not duplicate this functionality across the ecosystem, just putting this out for discussion.


gulp.lastRun is not a function [2]

var time = gulp.lastRun('build-coffee');

ERROR: gulp.lastRun is not a function
How to know last run time?
How to work this code:
gulp.task 'build-coffee', =>
	gulp.src './modules/**/*.coffee', since: gulp.lastRun('build-coffee')
	.pipe coffee()
	.pipe gulp.dest './build/'

questions

How to know last run time?
How to work this code?
Which version I should use?

Install 4.0
Support questions should be directed to StackOverflow.

Support questions should be directed to StackOverflow.

i dont know, thks


Composite keys result into broken links in swagger.json

Environment
.Net 6
Microsoft.AspNetCore.OData 8.0.4
Swashbuckle.AspNetCore  6.2.3
When an entity has a composite key defined, swagger.json generate paths as "/odata/Products(Key},OtherKey})"
It looks that the problem is in ApiDescriptionExtensions.RelativePathSansParameterConstraints
I would expect ideally the path would be "/odata/Products(Key={Key},OtherKey={OtherKey})"
Model:
public class ProductModel
    {
        public int Key { get; set; }
        public int OtherKey { get; set; }
    }

Startup.cs:
public class Startup
    {
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddControllers()
            .AddOData(opt =>

            {
                opt.Count().AddRouteComponents("odata", GetEdmModel());
            }

            );

            services.AddSwaggerGen(c =>
            {
                c.SwaggerDoc("v1", new OpenApiInfo { Title = "odata8", Version = "v1" });
            });
        }

        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseSwagger();
            app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "odata8 v1"));

            app.UseRouting();

           app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
            });

        }

        private static IEdmModel GetEdmModel()
        {
            ODataConventionModelBuilder builder = new ODataConventionModelBuilder();

            builder.EntitySet<ProductModel>("Products");
            builder.EntityType<ProductModel>().HasKey(r => new { r.Key, r.OtherKey });

           return builder.GetEdmModel();
        }
    }

Controller:
public class ProductsController : ODataController
    {
        /// <summary>
        /// Gets a collection of products
       /// </summary>
        /// <returns>Collection of <see cref="ProductModel"/></returns>
        /// <response code="200">Gets all rproducts</response>
		[Produces("application/json")]
        [ProducesResponseType(typeof(ProductModel[]), StatusCodes.Status200OK)]
        [EnableQuery]
        public IQueryable<ProductModel> Get()
        {
            return new List<ProductModel> {
            new ProductModel{Key = 1 },
            new ProductModel{Key = 2 },
            new ProductModel{Key = 3 },
            }.AsQueryable();
        }

        [EnableQuery]

       public IActionResult Get(int keyKey, int keyOtherKey)
        {
            return Ok(new ProductModel { Key = keyKey, OtherKey = keyOtherKey });
        }

   }

Looks it's related to #2243 . The PR created for that issue seems to be fixing my issue as well. Might as well add test cases for GetSwagger_GeneratesSwaggerDocument_ForApiDescriptionsWithConstrainedRelativePaths


prefetch of the github dependecies is broken

"https://github.com/nmattia/niv/archive/65a61b147f307d24bfd0a5cd56ce7d7b7cc61d2e.tar.gz"
"65a61b147f307d24bfd0a5cd56ce7d7b7cc61d2e.tar.gz"
"17mirpsx5wyw262fpsd6n6m47jcgw8k2bwcp1iwdnrlzy4dhcgqh\n/nix/store/gh8wm362fxk16933sqj8ab2sancl30fs-65a61b147f307d24bfd0a5cd56ce7d7b7cc61d2e.tar.gz-srcd\n"
"17mirpsx5wyw262fpsd6n6m47jcgw8k2bwcp1iwdnrlzy4dhcgqh"
"https://github.com/nmattia/niv/archive/65a61b147f307d24bfd0a5cd56ce7d7b7cc61d2e.tar.gz"
  Writing new sources file
Done: Adding package niv
*Niv> :r

Would need to pass the name into the update function


What's that absurd challenge "Your p element should contain the first few words of the provided additional kitty ipsum text.", trying to say?

Challenge Change the Font Size of an Element has an issue.
User Agent is: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 UBrowser/5.6.12860.7 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.
 But your code is incorrect.
GitHub Issues are for reporting bugs on the website only.
Please use the Help chat room for getting challenge related help.
Happy Coding.


Diagnostics should respect # noqa and similar comments

ptvsd uses # noqa to disable linting for specific lines, for example:
try:
    unicode  # noqa

    def needs_unicode(value):
        return isinstance(value, unicode)  # noqa
except Exception:
    def needs_unicode(value):
        return False

Any diagnostics we output should respect comments like these. I believe there are other ones out there depending on the linter, like #pylint: disable and # NOQA.

Linting could be also disabled for a particular warning.
For example, pylint has the following way of locally disabling a warning:
4.1 Is it possible to locally disable a particular message?
    Yes, this feature has been added in Pylint 0.11.
    This may be done by adding “#pylint: disable=some-message,another-one”
    at the desired block level or at the end of the desired line of code.

This feature would be great to have!
For the record, # noqa also supports disabling specific warnings with # noqa: E731. python-language-server could support that as well.

Partial support for this will come in #1272 (catch-all noqa), but we'll need mappings from other tools' codes in order to go further.

https://github.com/microsoft/python-language-server/pull/1272 adds basic support. New issue will be opened for more advanced cases.


Added gogogate2 cover

Description:
Related issue (if applicable): fixes #
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>
Example entry for configuration.yaml (if applicable):

Checklist:

[ ] The code change is tested and works locally.
[ ] Local tests pass with tox. Your PR cannot be merged unless tests pass

If user exposed functionality or configuration variables are added/changed:

[ ] Documentation added/updated in home-assistant.github.io

If the code communicates with devices, web services, or third-party tools:

[ ] New dependencies have been added to the REQUIREMENTS variable (example).
[ ] New dependencies are only imported inside functions that use them (example).
[ ] New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
[ ] New files were added to .coveragerc.

If the code does not interact with devices:

[ ] Tests have been added to verify that the new code works.

Hi @dlbroadfoot,
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!

Hi @fabaff , I don't  want to rush you but just wanted to check if you require me to do anything else before you want to review this again.
Thanks


Flow type support?

I'm trying to use flow syntax within unit tests, but i don't see any way to test it
 - Error: Line 5: Unexpected token :
        at createError (node_modules/jest-cli/node_modules/istanbul/node_modules/esprima/esprima.js:2392:21)
        at unexpectedTokenError (node_modules/jest-cli/node_modules/istanbul/node_modules/esprima/esprima.js:2467:13)
        at throwUnexpectedToken (node_modules/jest-cli/node_modules/istanbul/node_modules/esprima/esprima.js:2472:15)
        at parseClassBody (node_modules/jest-cli/node_modules/istanbul/node_modules/esprima/esprima.js:5045:21)
        at parseClassDeclaration (node_modules/jest-cli/node_modules/istanbul/node_modules/esprima/esprima.js:5067:21)
        at parseStatementListItem (node_modules/jest-cli/node_modules/istanbul/node_modules/esprima/esprima.js:3935:24)
        at parseFunctionSourceElements (node_modules/jest-cli/node_modules/istanbul/node_modules/esprima/esprima.js:4766:23)
        at parseFunctionExpression (node_modules/jest-cli/node_modules/istanbul/node_modules/esprima/esprima.js:4972:16)
        at parsePrimaryExpression (node_modules/jest-cli/node_modules/istanbul/node_modules/esprima/esprima.js:3232:24)
        at inheritCoverGrammar (node_modules/jest-cli/node_modules/istanbul/node_modules/esprima/esprima.js:2648:18)

I suggest using babel-jest to preprocess your files and strip flow-annotations before tests are being run on them. Follow the guide for React testing on the bottom here: http://facebook.github.io/jest/docs/tutorial-react.html#content
(Note: we are in the process of upgrading babel-jest to babel6. For now I recommend using babel-jest 5 until we have ironed out the issues).

Sorry, i didn’t added testPathDirs to jest, and it didn’t work.

Thanks, problem was exactly with usage of babel 6 ! Babel-jest 5 works like a charm.

@cpojer, that tutorial didn't explain how to install the babel plugin transform-flow-strip-types.  Could we add a note?

I think we should add some notes for this somewhere. cc @hramos.

FWIW Here is the transformer I put together to get jest running with transform-flow-strip-types after npm install --save-dev babel-plugin-transform-flow-strip-types
const babelJest = require('babel-jest');
const jestPreset = require('babel-preset-jest');

module.exports = babelJest.createTransformer({
	plugins: [
		"transform-flow-strip-types"
	],
	presets: [jestPreset]
});

Ooof, I wasn't aware this was an issue people might need help with. If you still think this should be documented, feel free to open a new issue and assign it to me.

The only reason I commented here (which I now realize was closed, my bad) is the last comment saying "yeah, we should document this!"

Yeah! That is on me to document. Unfortunately it's not been on my mind as the issue is closed.

@thomb transform-flow-strip-types plugin (or flow preset) just works with Jest when added to your Babel config.

Hi @thymikee, do you have a sample? I imagine that requires several configurations for prod, dev and testing.

.babelrc
{
  "presets": [
    "flow"
  ]
}

That's all.

Oh, sorry for my ignorance. Thank you so much.

Is it exepected that this doesn't work with jest?
export default class {
  urlsToVisit: { [string]: boolean } = {};
}

Error being Unexpected token:

Flow is supported, if you are getting this error, it's because you didn't properly set up your babel build pipeline.

@cpojer Well I'm using  the flow preset, and I think it's an error specific to jest, given it works fine when I just use yarn run flow.

@aksonov
Finally, can you tell me how to solve this problem?

I am adding a jest feature to unity tests, @thomb, compilation broken. It does not work for me. am I missing anything?

I have the same problem as @rayrutjes. Is there any solution to it?


Create firewall.md

Contains a number of event fields that are useful when analyzing firewall logs.

Any change this is going to be merged?

i'm not a contributor of OSSEM, but just recommending holding off on some of these. as some of these can be migrated into broader context/schema.. such as bytes, direction, action, and
also, do you have the log source data examples for these? similar to how there are examples for something such as: https://github.com/Cyb3rWard0g/OSSEM/blob/master/data_dictionaries/windows/sysmon/event-3.md#data-dictionary


Vararg parameters can cause crashes

Not sure about the exact nature of the problem. When merging a method with vararg parameters, the type of the parameter is expected to be an array type, but sometimes it isn't which causes a crash.

The problem seems to be that I'm not resolving the varargs value on parameter nodes.


7-bit sorting passes fail for sm61 w/ large-values

Issue is that we're not tracking the right number of bins-per-thread when the radix-digits is not an even multiple of CTA-size.

Fixed


add a global --silent flag

Description
Provide a global --silent flag that suppresses all output to stderr and stdout generated before the primary command output.
Use Case
AGC has a --verbose flag but not a symmetric --silent flag. When writing automation scripts that use AGC, the "info" level outputs from AGC add unnecessary noise to logs that would be collected.
Proposed Solution
Examples without --silent:
deploy context
$ agc context deploy spotCtx
2021-12-10T23:34:33Z �  New version of agc available. Current version is '1.1.1'. The latest version is '1.1.2'
2021-12-10T23:34:33Z �  Deploying context(s)
Deploying resources for context 'spotCtx'... [____________________________________________________________________________________]6.6s

workflow status
$ agc workflow status
2021-12-10T23:32:46Z �  Showing workflow run(s). Max Runs: 20
WORKFLOWINSTANCE        spotCtx 08307c79-4646-484f-8cc1-dd9bd62981cc    true    EXECUTOR_ERROR  2021-12-01T21:11:06Z    words-with-vowels
WORKFLOWINSTANCE        spotCtx 4aece5da-a55a-4a50-a2ea-38af75253ab6    true    COMPLETE        2021-12-01T21:11:04Z    read
WORKFLOWINSTANCE        spotCtx 535b65db-1a96-44da-8001-6cf441be872d    true    COMPLETE        2021-12-01T21:11:03Z    hello
WORKFLOWINSTANCE        spotCtx 813d5afb-f036-4a34-ab3a-753333f7e539    true    COMPLETE        2021-12-01T21:11:01Z    haplotype
WORKFLOWINSTANCE        myContext       f32d5908-7b3b-4e45-852a-0624ce836a39    true    EXECUTOR_ERROR  2021-12-01T21:10:55Z    words-w

Examples With --silent:
deploy context
$ agc context deploy spotCtx --silent
# console blocks until deployment completes
# does not show progress indication
DETAIL  Agc-Context-Demo-pwymingJKP3z-spotCtx-cromwellNestedStackcromwellNestedStackResourceF3-1PZMXWV3W3HRM-ApiProxyAccessLogGroup0E050698-LU7oiUdu3HLi       s3://agc-733263974272-us-east-2/project/Demo/userid/pwymingJKP3z/context/spotCtx        Agc-Context-Demo-pwymingJKP3z-spotCtx-cromwellNestedStackcromwellNestedStackResourceF3-1PZMXWV3W3HRM-EngineLogGroup893F148F-4EP5SB3KqBW8       STARTED       /aws/lambda/Agc-Context-Demo-pwymingJ-CromwellWesAdapterLambda-dxSjjgl3ApuI      https://d1jhugndd0.execute-api.us-east-2.amazonaws.com/prod/
SUMMARY true    256     spotCtx

workflow status
$ agc workflow status --silent
WORKFLOWINSTANCE        spotCtx 08307c79-4646-484f-8cc1-dd9bd62981cc    true    EXECUTOR_ERROR  2021-12-01T21:11:06Z    words-with-vowels
WORKFLOWINSTANCE        spotCtx 4aece5da-a55a-4a50-a2ea-38af75253ab6    true    COMPLETE        2021-12-01T21:11:04Z    read
WORKFLOWINSTANCE        spotCtx 535b65db-1a96-44da-8001-6cf441be872d    true    COMPLETE        2021-12-01T21:11:03Z    hello
WORKFLOWINSTANCE        spotCtx 813d5afb-f036-4a34-ab3a-753333f7e539    true    COMPLETE        2021-12-01T21:11:01Z    haplotype
WORKFLOWINSTANCE        myContext       f32d5908-7b3b-4e45-852a-0624ce836a39    true    EXECUTOR_ERROR  2021-12-01T21:10:55Z    words-w

Other information

Re-opening for now since it's been reverted


Behavior when a pvc is deleted ?

What
As I'm reading the documentation I'd like more detail about this:

TopoLVM does not care about Retain reclaim policy because CSI volumes can be referenced only via PersistentVolumeClaims.

is the PV retained or deleted once the pvc deleted?

It should depend on the reclaim policy of the StorageClass.
If it is Retain, the PV should be retained.

Ok Thank you !