text:
Issues with running API Migration Tool

We are migrating from on premises version to public cloud.  How to provide "to": version information for edge public cloud. This information need to be set into config.js
https://github.com/apigeecs/apigee-migrate-tool/blob/master/config.js

When running this tool I am getting below error. I am guessing it is due to cert issue. We are using our company signed ssl certificate for management server. Please let us know workaround for this.

Running tasks: exportAll
Running "exportAll" task
Running "exportProxies" task
========================= export Proxies ===========================
getting proxies...https://:/

Error: unable to verify the first certificate

Hi @kurtkanaskie , @adamjonescdk
I am trying to export data from 4.17.05 version of apigee. I used both http and https urls for management servers but it is failing with ">>null" as output.
++++++++++++++
Running tasks: exportProxies
Running "exportProxies" task
========================= export Proxies ===========================
getting proxies...http://xxxxxxx:8080

null
+++++++++++++

Can you please check if this version of Apigee supported by this tool?
Regards,
Satyendra

Hi @kurtkanaskie ,
Thanks for reply. Yes I can make management API call using curl. And Yes, We do curl -k for management API call.
We have another sandbox environment where management server is just http (not https) and it doesn't work with plain http.
Running tasks: exportProxies
Running "exportProxies" task
========================= export Proxies ===========================
getting proxies...http://xxxxxxx:8080/

null

===========
Regards,
Satyendra

I tried with just exportDevs only instead of exportAll it is not working. Here is the output
Running tasks: exportDevs
Running "exportDevs" task
========================= export Devs ===========================
getting developers... http://xxxxxx:8080
getting developers...http://xxxxxx:8080/v1/organizations/xxxxx/developers

Hi @kurtkanaskie
I resolved the certificate error issue. I am facing issue running importKeys. It imports credentials but developer apps have pending api product approvals. Out of 95 Apps 53 apps are having pending api product approval. Not sure if it is issue with migrate tool of something wrong in cloud management Api .
Regards,
Satyendra

Hi @kurtkanaskie
Thanks for reply. Looking into logs. It appears that tool is maping the approval call and getting back the correct response code 204 but when looking in apigee portal it is still showing Pending status.
Resp [204] for email_removed@brinker.com - app-web - OrderMgmtProduct - **key_removed** - https://api.enterprise.apigee.com/v1/organizations/org_name/developers/email_removed@brinker.com/apps/app-web/keys/**key_removed**/apiproducts/OrderMgmtProduct?action=approve ->
I tried the same api call using curl/postman got 204 response but this time app got approved successfully.
Is it something Apigee Management API blocking the approval status when we are running this tool in batch mode. When this tool runs it makes series of api calls to approve the api products. For example I have 10 API products for a given app. I see only one api product is in approved state for a given app rest 9 stay in pending state. Even though API returns success code 204  for all of them. In the next run another api product get approved. I tried to run multiple time an individual app like below
grunt importKeys -v --src=./data/apps/*/app-web
At this point I am not sure if it is the migration tool issue or Apigee Management API issue. But I am sure this was tested before. Tagging more folks to this. Guys Please help me.
@vinit4u16  @jerrylawson  @swilliams11  @giteshk  @stevetraut

Hi @kurtkanaskie ,
Regarding API Product approval, there's separate code to set status, there
may be an issue with that.
See:
https://github.com/apigeecs/apigee-migrate-tool/blob/99a6ac3fd37823a9da761f46d40ee1a7c3f5bfe7/tasks/app.js#L207
I worked with Apigee support on why management api for product approval giving successful response but it is not approving the all the products associated with a developer app. Apigee support said this API call is asynchronous so it returns a success response immediately and product approval happens in background. it has some traffic limit it seems.
They said if you make your client synchronous and introduce a delay (like 1/2 sec) then it will work. So is it possible for you to update your script to make product approval synchronous and introduce delay with some milliseconds. I am not a javascript expert so I am requesting you to send me updated scrip and i will test it in our environment and let you know. Appreciate your help in this matter. It will be helpful to other users who wants to use this in future.
Regards,
Satyendra

Hi @kurtkanaskie ,
Can you please help?

Hi @kurtkanaskie ,
Thanks for reply. Yes I can make management API call using curl. And Yes, We do curl -k for management API call.
We have another sandbox environment where management server is just http (not https) and it doesn't work with plain http.
============== Running tasks: exportProxies
Running "exportProxies" task ========================= export Proxies =========================== getting proxies...http://xxxxxxx:8080/ ">>" null
=========== Regards, Satyendra

Hi @satyendrasrivastava may I know what is your solution regarding error you encounter here when exporting?

@satyendrasrivastava
What have to done to resolve the cert issue?

@satyendrasrivastava @kurtkanaskie
We are on Apigee edge and we are trying the export the Products and ran into the same issue i.e
" Running "exportProducts" task
========================= export Products ===========================
getting products...https://api.enterprise.apigee.com

null"

Can you please help by providing what was done to fix the issue.
And we tried to export Developers and this time the tool is making a call to Apigee to get the developers but failed as
"Running tasks: exportDevs
Running "exportDevs" task
========================= export Devs ===========================
getting developers... https://api.enterprise.apigee.com
getting developers...https://api.enterprise.apigee.com/v1/organizations/dish-nonprod/developers

Note: Basic auth always returns 401 for user accounts that have MFA enabled.
https://docs.apigee.com/api-platform/system-administration/basic-auth
Or maybe you just mistyped your password.
To validate your password, login to the UI at https://login.apigee.com
If necessary, reset your password at https://login.apigee.com/reset"

Inputs are much Appreciated

authors: mavicponiente saimalipatel satyendrasrivastava vamsivarmask

repo: apigeecs/apigee-migrate-tool

license: mit

license_source: bigquery


text:
Datastore

We need some way of storing data. This issue will be updated as we figure more out.

I really want this!
A couple of things that have been suggest to be and things I was thinking myself:

A centralised database where companies can add their logos and you can always get it in various sizes and formats.
A phone book that's free and API friendly.

I have been taking an extensive look at the AWS infrastructure. They provide a lot of useful ways to solve our problems.

Does the advania hosting setup provide some sort of hosted NoSQL like AWSs DynamoDB?
I kind of don't want to run our own database and would like to use something like that or just move completely to AWS and use their database solution.

Nope, unfortunately :/ We could host our own, but it would add some ops to the stack

After having used AWS extensively for the last couple of months, I'm more and more inclined to recommend moving APIs there completely.. They solve so many issues so easily, like scaling, load balancing, storage, etc. etc. etc. - cost is trivial, we could find a sponsor/sponsors willing to help us with it (I'll help with finding that if you guys want, kolibri has fx shown interest in that)..
Example setup I've been working with lately; kubernetes cluster with load balancers fronting X number of pod instances that can automatically scale up (basically runs itself).. I could show you guys live examples if we meet up when you get home @kristjanmik

Yup, we use AWS pretty extensively at PV and it's really, really, really nice.

@benediktvaldez I'm down. The problem with hosting stuff outside of Iceland is the roundtrip to scrape the data.
Iceland -> request from Iceland 10ms + 10ms both ways + source server delay  < 100ms total with response
hosted in Ireland -> request to server from Iceland 50ms one way + server requests a site in iceland 50ms + server gets data back 50ms + server sends data back to requester in Iceland 50ms over 200ms
This can get out of hand pretty quickly,  but it is a tradeoff we can look into if we do more caching

Yeah I think caching should solve this adequately - personally think the tradeoff is worth it..
Let's revive the APIs meetups when you get back ;)

Yeah we have to! It is probably more fun to meet up during the summertime, last few times were so cold!

source: gharchive/issue

authors: benediktvaldez koddsson kristjanmik

repo: apis-is/apis

license_type: permissive


text:
When a video stops exactly on the end of a slice we get a 400 error uploaded file is empty

Describe the bug
When a video stops exactly on the end of a slice we get a 400 error uploaded file is empty error. this only seem to happen on Apple desktop devices not on mobile and only on safari browser. We found the problem when we record and automatically stop the recording at 2 minutes with a timeslice of 3000ms. We have a workaround to change the timeslice to 4100ms so that it wont have an empty packet for the last one. But if a user stops the recording on the end of a slice we might still get the error.

To Reproduce
Steps to reproduce the behavior:

Record exactly 2 minutes with timeslice of 3000ms with the continious upload feature
And test on safari on a macbook (not on mobile device)

Expected behavior
When a video stops on the end of a timeslice it should not give a 400 error.
Screenshots

Environment (please complete the following information):

OS: Apple Mac OS
Browser: safari
Version: macOS Monterey

FYI, the Macbook I was using was running Apple silicon in case it makes a difference. The system clock may behave slightly differently than on the Intel silicon models.
I keep this MBP up to date at all times.
Hardware Overview:
Model Name:	MacBook Pro
Model Identifier:	MacBookPro18,2
Chip:	Apple M1 Max
System Software Overview:
System Version:	macOS 12.4 (21F79)
Kernel Version:	Darwin 21.5.0

Hi Rudolph & Chris,
Thanks for these details, we'll fix that issue as soon as possible

Hi @rvddekock & @tpak ,
We've released a v1.0.4 that should fix your issue. Can you confirm?
Thanks,
Olivier

I will try today and let you know.
On Tue, May 24, 2022 at 7:32 AM Olivier Lando @.***>
wrote:

Hi @rvddekock https://github.com/rvddekock & @tpak
https://github.com/tpak ,
We've released a v1.0.4 that should fix your issue. Can you confirm?
Thanks,
Olivier
—
Reply to this email directly, view it on GitHub
https://github.com/apivideo/api.video-typescript-media-recorder/issues/8#issuecomment-1135929541,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAFH24ROIBSYUMBIX4F5LLVLTK7HANCNFSM5WLLX2RA
.
You are receiving this because you were mentioned.Message ID:
@.***
com>

--
Chris Tirpak
@.***
+1.719.439.8865 (m)

@olivierapivideo I can confirm this appears to work correctly now. Thanks for the fast turnaround on this and also the player rotation issue yesterday!

authors: olivierapivideo rvddekock tpak

license: MIT

license_source: github-api


text:
Failed to parse GraphQL file (Unsupported token $)

When apollo-android update 1.0.0 to latest version, I encountered this issue.
* What went wrong:
Execution failed for task ':app:generateDevelopmentDebugApolloClasses'.
>
  Failed to parse GraphQL file <file path>
  Unsupported token `$`

Failure:
query XXX($id: ID!, $first: Int, $offset: Int) {
  xxxConnection(filter: {id: [$id]}) {
    totalCount
    edges {
      node {
      }
    }
  }
}

Success:
query XXX($id: [ID!], $first: Int, $offset: Int) {
  # diff ↓
  xxxConnection(filter: {id: $id}) {
    totalCount
    edges {
      node {
      }
    }
  }
}

Duplicate with https://github.com/apollographql/apollo-android/issues/1558

@martinbonnin Thanks! 🙏 When will be released?

We don't typically announce releases dates but you should already be able to test using the snapshots.

I planned to do a new release today

Fixed in https://github.com/apollographql/apollo-android/releases/tag/1.1.2

authors: martinbonnin rnitame sav007

repo: apollographql/apollo-android


text:
Fix query watcher not calling status events

Fixes #2096
Fixes #1805

Fix an issue where the callback wrapper was not properly calling the original callback

Also fix an issue regarding idling resources. The tracker was called only when there is an error. It should also be called when call is completed.

First added the failing test case provided by @odlund and then verified the fix.

Added ApolloWatcherService into the sample.

Ok. Last commit broke other tests. Maybe I will create a separate PR for fixing IdlingResource.

source: gharchive/pull-request


text:
Broken link in console error

There is a broken link in this error log when using apollo for angular:
invariant.esm.js:29 You are using the simple (heuristic) fragment matcher, but your queries contain union or interface types. Apollo Client will not be able to accurately map fragments. To make this error go away, use the IntrospectionFragmentMatcher as described in the docs: https://www.apollographql.com/docs/react/advanced/fragments.html#fragment-matcher

I didn't find a proper angular link, but this looks like a replacement
https://www.apollographql.com/docs/react/data/fragments/

IntrospectionFragmentMatcher was removed in v2.0, so it's not relevant anymore
see https://apollo-angular.com/docs/migration#breaking-cache-changes for details

authors: fetis kasarda

repo: apollographql/apollo-angular


text:
Freezes with asian characters in style font-familiy name

To Reproduce
Step by step instructions to reproduce the behavior:

run sanitizeHtml('x')

Expected behavior

Execute in reasonable time

Describe the bug

That snippet takes 4.91s on my computer. With larger html it won't finish.

Details
Version of Browser

Google Chrome version 83.0.4103.116 (Official Build) (64-bit)

Server Operating System:

Ubuntu 18.04.4 LTS

on second thought: it gonna be owe font-family regexp with causes the problem

repo: apostrophecms/sanitize-html


text:
Multi region support

This PR adds multi-region support for the currently existing collectors.
It uses a new AWS_REGIONS environment variable that can either take a comma-separated list of regions or the special case 'all' (retrieves all regions from the account).
The old variable AWS_REGION will take precedence if specified however.
Right now the multi-region implementation for the RDS exporter is:
a) not tested - I don't have an environment with RDS instances
b) quite hacky - it simply passes in a list of sessions, constructs all services for those and associates between matching session & service based on the list indices.

have you considered introducing a ConfigMap?
perhaps we would want to have different definitions per exporter, and probably more in the future.
wdyt?

I like the idea of being able to configure each exporter in a configmap - that way we could also add different timeouts or retry strategies depending how each exporter has to handle it.
Only minor drawback is that testing it locally becomes a bit more involved, because it needs a cluster but that should be fine.

A configmap is mounted to a pod and is treated as a file.
So what you really need to do iiuc is to add usage of a configuration file?

Yes I hadn't really thought through the implementation when commenting - that's pretty much what I started with now.
I feel that there is a nicer way to implement the backoff for regions to go  ->  -> ENV Var.
But the current state at least shows the direction this would go.

the comments above are more structural, and i havn't reviewed the actual code yet.
in addition, i think it would make sense to update these docs as part of this PR: https://github.com/app-sre/aws-resource-exporter#configuration

I updated the code with the points from the comments - thanks for reviewing.
I have left the all region in for now, as @iamkirkbater wanted this as an option, so I'd wait for him to see if it is also ok to just list regions explicitly (would make the code a lot easier, so I'm all for it).

@bergmannf - Comment on the all region updated above.  Kill it with 🔥

to prepare for this PR, i am working on creating the configmaps for some environments which will be deployed as a result of merging this PR: https://gitlab.cee.redhat.com/service/app-interface/-/merge_requests/44987
PTAL!

thank you for all the work so far!
do we also need to change route53 in this PR?

I don't think we have to adjust the route53 exporter - I just checked the AWS quotas about route53 and they are all global, so it shouldn't matter which region it uses, so running it against multiple regions is useless.

So we should probably update the config file and docs?

I was thinking the same and updated the config and Readme example.
I still opted to keep the region (but in case of route 53 not as a list), as otherwise we would be back to using a magic constant.

makes perfect sense!
https://gitlab.cee.redhat.com/service/app-interface/-/merge_requests/45020

authors: bergmannf iamkirkbater maorfr

repo: app-sre/aws-resource-exporter


text:
FIX TYPO: Spec.md

behvaior -> behavior

would you mind rewording your commit message to our usual standard? something like
SPEC: fix typo (behvaior -> behavior)
thanks

¿Bueno?

muy bueno, gracias

authors: jonboulle schancel

repo: appc/spec


text:
Improve cli tests

It's take too much time to update cli tests through amp versions.
It's mainly due to the fact we don't get enough information when an issue occurs and we have for each to know which regex was used in the issue, understand it, compare with the real output and got how to fix, relaunch all tests to test the fix, and iterate this way until the good result.
Some regex are not so simple and not completely right. Debug them take time, relaunch tests take time.
We take more time fixing/adapting the test itself than the code which should be tested.
To go faster, it should be good to :

display which test is failing
in case of error, display the executed command, the regex and the output which doesn't match.
if possible display exactly where the problem is in the output (for that, perhaps, use plain texts with variables without regex to describe the expected output and regex only internally to compare the output logical bloc by logical block using the plain text description. This intermediate description layer could allow to know on which logical block the issue occurred)
be able to launch only one test or several specific tests to debug them quicker

Addressed by #1159

I think you meant to reference this PR: https://github.com/appcelerator/amp/pull/1160

yes thanks!

authors: bquenin freignat91 subfuzion

repo: appcelerator/amp


text:
Update component to suit Appear Here's needs

Updates react-input-range to include some other user's works alongside some modifications to make the component more suitable for Appear Here's use of the component

Allows components to be overridden as per https://github.com/davidchin/react-input-range/pull/44
Allows labels to be hidden as per https://github.com/davidchin/react-input-range/pull/24
Removes the unnecessary passing of the component ref into onChange and onChangeComplete callbacks as per https://github.com/davidchin/react-input-range/issues/20
Removes use of ownerDocument which causes issues with redux-form (https://github.com/davidchin/react-input-range/issues/56) and seems to cause us issues too. We've no need to rely on ownerDocument—none of our other components use it—and I can't envisage a scenario where we'll be doing complex work with multiple documents
Fixes renderHiddenInputs as per https://github.com/davidchin/react-input-range/issues/40 and improves the logic around it, including a control to switch it on and off so our nonLinearise() HoF can implement it's own version

good work 👍 bump version and release 💯

authors: NGMarmaduke rdjpalmer

repo: appearhere/react-input-range


text:
Add input argument for saving predictions in Kaggle submission format

Hello, I'm the TA for the Applied Deep Learning (ADL) course, where we plan to use Kaggle as the leaderboard platform. To help students submit in the correct format, this pull request adds an input argument that allows them to specify an output path for saving predictions in the required submission format.
Changes:

Medical Diagnosis Task: This update enables students to save their predicted labels as a CSV file formatted for Kaggle submission.

Text-to-SQL Task: For this task, accuracy is evaluated based on whether the result sets retrieved by the model-generated SQL code exactly match those retrieved by the ground truth SQL command. To facilitate comparison on Kaggle, each result list from the predicted SQL output is hashed (using MD5) as implemented in benchmarks/text_to_sql.py. This allows for direct comparison of hashed values against the ground truth on Kaggle.

Please let me know if you have any suggestions for improvements or if there’s a more effective approach to achieve this functionality.

LGTM.
By the way, is the Kaggle site ready? It would be nice if we can test it. =)


text:
Release: v0.1.0-rc

Please review the changes for this release.

Close because of test

authors: Rex-Appier appier-rophy

repo: appier/appier-ios-framework


text:
Does appium-for-mac supports entire desktop session

Does appium-for-mac supports entire desktop session, something similar to what 'root' session does in appium? This will be required for scenarios when we want to locate pop-up from the application

I had the same question.

Is there a way that we can switch driver session to the pop-up window which ask userName and password?
/AXApplication/ should locate the default front app, but seems it doesn't work for 'SecurityAgent' (UserName & Password prompt)

I am also curious because it seems that Windows has this functionality to launch the "root" application which then allows you to interact with things in their tray app. But I haven't been able to figure out how to interact with say the menubar on Mac.

authors: QITIE cnachiappan jitendrakalyan reder9

repo: appium/appium-for-mac


text:
detect shared printer model on client computers

Hi,
I know operating systems usually detect printer on certain network protocol such as IPP, LPD, SNMP and so on. My problem is I shared a printer via cups and computers cannot detect the printer model, they're just using it like a shared queue without any model specification.
Could you possibly explain is there any way to add a functionality and be able to detect printer model? Like by asking cups what are the printer attributes? does it support duplex? ...
Clients have to find the drivers manually and this sometimes can be so frustrating specially on windows operating system since without knowing printer model it cannot download the proper driver from its database.

What operating systems are your clients using? Any Linux/UNIX-based client won't need this information since it can get it directly from CUPS using IPP. Windows clients use the make and model information supplied by CUPS (either with IPP or via Samba/SMB).

Sorry for the delay, I'm not sure about that. Consider an ubuntu OS, for example, when I want to add an ipp shared printer, after searching, it'll add the printer, it works file. But it does not know about the make and the model (It seems more like a raw queue, am I right?). When I query the ubuntu system via python3-pycups package, I get below result:
{'printer': {'printer-is-shared': False,
  'printer-state': 3,
  'printer-state-message': '',
  'printer-state-reasons': ['none'],
  'printer-type': 2228230,
  'printer-uri-supported': 'ipp://localhost/printers/printer',
  'printer-location': '',
  'printer-info': 'HP LaserJet P2055',
  'device-uri': 'ipp://192.168.16.206:631/printers/HP-LaserJet-P2055',
  'printer-make-and-model': 'Remote Printer'}}

By the way, I checked the cups server, I has any requests from that client.

cupsd.conf configuration
LogLevel debug
PageLogFormat
MaxLogSize 0
# Allow remote access
Port 631
Listen /var/run/cups/cups.sock
# Share local printers on the local network.
Browsing Yes
#Browsing On
BrowseLocalProtocols dnssd
DefaultAuthType Basic
WebInterface No
<Location />
  # Allow shared printing...
  Order allow,deny
  Allow all
</Location>
<Location /admin>
</Location>
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
</Location>
<Location /admin/log>
  AuthType Default
  Require user @SYSTEM
  Order allow,deny
</Location>
<Policy default>
  JobPrivateAccess default
  JobPrivateValues none
  SubscriptionPrivateAccess default
  SubscriptionPrivateValues default
  <Limit Create-Job Print-Job Print-URI Validate-Job>
    Order deny,allow
  </Limit>
  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
  <Limit Cancel-Job CUPS-Authenticate-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <Limit All>
    Order deny,allow
  </Limit>
</Policy>
<Policy authenticated>
  JobPrivateAccess default
  JobPrivateValues default
  SubscriptionPrivateAccess default
  SubscriptionPrivateValues default
  <Limit Create-Job Print-Job Print-URI Validate-Job>
    AuthType Default
    Order deny,allow
  </Limit>
  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>
  <Limit Cancel-Job CUPS-Authenticate-Job>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>
  <Limit All>
    Order deny,allow
  </Limit>
</Policy>

printers.conf content:
<Printer HP-LaserJet-300-400-color-MFP-M375-M475>
UUID urn:uuid:349c8471-0a3a-32d4-47f3-ef9d87e8d623
Info HP LaserJet 300-400 color MFP M375-M475
Location B-Team
MakeModel HP LJ 300-400 color MFP M375-M475 Postscript (recommended)
DeviceURI custom_backend://HP-LaserJet-300-400-color-MFP-M375-M475
State Idle
StateTime 1558183099
ConfigTime 1558183099
Type 8425564
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy retry-job
</Printer>
<Printer HP-LaserJet-P2055>
UUID urn:uuid:147a9a03-e11f-3cbb-5f40-54d7025f8472
Info HP LaserJet P2055
Location NSG Team
MakeModel HP LaserJet P2055 Postscript (recommended)
DeviceURI custom_backend://HP-LaserJet-P2055
State Idle
StateTime 1558183080
ConfigTime 1558183080
Type 8425556
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy retry-job
</Printer>

@GreatBahram
Perhaps I do not fully understand what you mean
but I think you confuse print queues (some kind of "software")
with printer devices (the hardware that actually makes dots on paper).
What is "inside" CUPS are only print queues but never actual printers
so CUPS can only provide information about its print queues,
cf. "CUPS: The server between user and printer" at
https://en.opensuse.org/Concepts_printing
Some print queue information can contains the make and model
of a real printer device but that are just some text fields that
may or may not contain information about the real printer
make and model that is "behind" the print queue,
cf. "The Printer Configurations Dialog" at
https://en.opensuse.org/YaST_Printer
(regardless that it is about the YaST printer module
the general information therein applies everywhere).
Accordingly there is no such thing as
detect shared printer model on client computers

because CUPS never shares a printer device.
Regarding "Printing from Windows to Linux" you may have a look at
https://en.opensuse.org/SDB:Printing_from_Windows_to_Linux

What is "inside" CUPS are only print queues but never actual printers so CUPS can only provide information about its print queues.

You are certainly right. CUPS only knows about the queue. What I want is when I shared a printer via CUPS, CUPS just propagates that information. @michaelrsweet believes cups does that at the moment. But in my case at least neither Unix OS nor windows OS cannot detect the printer.

Accordingly there is no such thing, because CUPS never shares a printer device.

I do know about cups, it's just a queue and so on. But CUPS knows about make and model because it reads the information from the PPD file. I was wonder is there any mechanism or facility to share that information with client computers or not?
By the way thanks for your links

@GreatBahram
thank you for your explanation.
Now I think I understand what you are looking for.
As far as I understand what you are missing in
https://github.com/apple/cups/issues/5580#issuecomment-493677912
(excerpts)
'printer-location': '',
'printer-info': 'HP LaserJet P2055',
'device-uri': 'ipp://192.168.16.206:631/printers/HP-LaserJet-P2055',
'printer-make-and-model': 'Remote Printer'

is that printer-make-and-model should not be Remote Printer
but something like what printer-info is.
I don't know the details behind but I think there is a reason
(I even have an offhanded guess what that reason might be)
why CUPS reports its print queue as a generic Remote Printer
and not as if it was a real printer device like HP LaserJet P2055.
The source code is at
https://github.com/apple/cups/blob/master/scheduler/printers.c#L4997
but without explanatory comments one cannot know the reason
behind why the code is as it is - also neither
https://github.com/apple/cups/blob/master/cups/cups.h#L204
nor
https://www.cups.org/doc/cupspm.html
explain what CUPS_PRINTER_REMOTE actually means.
My offhanded guess what that reason might be is that usually
it would be just wrong to do a local printer setup on a client system
for a remote CUPS queue because a printer setup on a client system
usually means that print job data processing software with printer driver
software is run on the client (i.e. "filtering" happens on the client)
which produces the final printer model specific data so that
printer model specific data would be sent from the client to
the CUPS queue where that data would be again processed
by the filtering that is set up for the CUPS queue but usually
the filtering that is set up for the CUPS queue would fail or
produce a mess so that the final output on the actual printer
device would fail or result a mess, cf. the section about
"Differences in Printing between Windows and Linux" in
https://en.opensuse.org/SDB:Printing_from_Windows_to_Linux
Simply put:
Duplicated print job data processing ("filtering") must be avoided.

Thanks for your explanation.
It's true on some client systems when they chose inappropriate driver, even on Unix machines, there were some problems and sometimes even jobs failed ( I think that was just because of different filtering system that each driver and operating system use), However, that's totally OK in my situation.
And you are right @michaelrsweet, CUPS shows information about  printer make and model, the problem is system-config-printer program on Linux does not read that information and I think that's the case with Windows too.
https://github.com/zdohnal/system-config-printer/blob/83856b9f4f37fe0df0ec23ced15b6f62109f64e2/probe_printer.py#L490

authors: GreatBahram jsmeix michaelrsweet

repo: apple/cups


text:
Add SCLF-0001: JSON Key Strategies

Add a proposal for handling snake and camel case keys in JSONEncoder.

@parkera do you want to merge this or leave it as a PR?

I think I'll go ahead and merge this now.

authors: ianpartridge parkera

repo: apple/swift-corelibs-foundation


text:
Linux i686 Build Support

This unblocks building on 32-bit Linux using the i686 triple.

@swift-ci please test

This should have no impact on libdispatch itself, so I'm going to go ahead and merge this

authors: Kaiede compnerd

repo: apple/swift-corelibs-libdispatch


text:
Add Slice to replace Snippet Chunks

SE-0356 latest changes include parsing "slices" out of snippets.
These are not quite the same as the current "chunks", which were
a speculation that eventually formed into "slices". Deprecate chunks
and add the slice data model.
Move snippet presentation code to a line-based format: slices are represented
simply as a name and index range to pull their code lines.
Add the isVirtual property to modules, for modules that are created
implicitly to hold relationships. When snippet symbol graphs are created,
a fake module is created to hold the snippets, since snippets do not come
from any one module. This property simplifies what is basically just a
heuristic in DocC to a simple factual check.
rdar://95220716
Required for related changes:

https://github.com/apple/swift-docc/pull/338
https://github.com/apple/swift-docc-plugin/pull/20

@swift-ci Please test

Added some round-trip tests for Module.

@swift-ci Please test

@swift-ci Please test

repo: apple/swift-docc-symbolkit


text:
[Bugs?] await keyword mistake order when I use Swift-testing library.

Hello
Apple's new testing library swift-testing may include from Xcode16.
So We started implementing of this library for our product but the format of await keyword order was mistake when I run swift-format command.
Examples
// mistake
#expect await (monitor.isAvailable == false)

// expected
#expect (await monitor.isAvailable == false)

Do we have a workaround?

Synced to Apple’s issue tracker as rdar://128436455

Am I correct in understanding that your original source code was
#expect (await monitor.isAvailable == false)

and that swift-format transformed it to
#expect await (monitor.isAvailable == false)

I was unable to reproduce the issue by creating a file with the first contents (await inside the parentheses) and running swift-format format /path/to/file.swift.
Which version of swift-format do you have installed?

Hi @ahoppen
Thanks for trying to reproduce.
That is correct.
We have v0.53.8 installed
and this is our config
# disable
--disable wrapMultilineStatementBraces
--disable preferKeyPath
--disable preferForLoop

# format options
--stripunusedargs closure-only
--self init-only
--commas inline
--extensionacl on-declarations
--wrapparameters before-first
--wraparguments before-first
--maxwidth 120
--guardelse next-line

# version
--swiftversion 5.9

It looks like you are using https://github.com/nicklockwood/SwiftFormat, not this swift-format. Could you file an issue on that repository?

oh, I had a mistake. sorry

authors: ahoppen psbss

repo: apple/swift-format


text:
Deserialize Clang module search path from DWARF

and adapt the Swift-specific parts to the upstream changes.

@swift-ci test and merge

repo: apple/swift-lldb


text:
Add ability to collect memory limit.

Add ability to collect memory limit.
Reviewer: Jason Molenda
rdar://problem/37686560
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@326374 91177308-0d34-0410-b5e6-96231b3b80d8
(cherry picked from commit 257a4b46cef2034b5f5d334073de61fd39c13f38)

@swift-ci please test


text:
[SwiftLanguageRuntime] Fix language refcount.

This commit has a bunch of improvements:

It moves the logic from wrong ad-hoc calculations in lldb to
an API call to the swift stdlib to retrieve the refcount of
objects.
It refactors the path to exit early for improved readability,
while also adding some comments.
It prints the unowned refcount for objects, previously
absent.

rdar://problem/30538363
rdar://problem/30538399

@swift-ci test and merge

Thanks to @jimingham for teaching me about GetSyntheticValue(), btw.

@slavapestov this fixes the other half of the problem you reported in https://github.com/apple/swift-lldb/pull/150#issuecomment-338533479 . Greg fixed the object printing representation, but the command was broken. Hopefully not having to deal with hand-made calculations in lldb would ensure us to not having to touch this again. Well, modulo bugs, of course.


text:
Remove upper bound for swift-docc-plugin version

Updates the swift-docc-plugin dependency to remove the upper bound (fixed by https://github.com/swiftlang/swift-docc-plugin/pull/96).
This PR is in a draft state so that we can verify that https://github.com/swiftlang/swift-docc-plugin/pull/96 resolves this issue in this project before merging and creating a tag.

@swift-server-bot add to allowlist

authors: Lukasa franklinsch


text:
Add watchOS deployment to PodSpec build script

Motivation:
We support watchOS 6+ with SwiftNIO Transport Services; as such we should
include watchOS as a deployment target for our CocoaPods.
Modifications:

Add a watchOS deployment target to build_podspecs.sh

Result:
Users can deploy to watchOS 6+ with CocoaPods.

@swift-nio-bot test this please

authors: PeterAdams-A glbrntt

repo: apple/swift-nio-ssl


text:
[CI] Add Swift 6 language mode workflow

Motivation
We want to check how our packages perform in Swift 6 language mode.
Modification
This PR adds a new reusable workflow that sets the tools version to Swift 6 and then builds with warnings as errors enabled.
Additionally, I did a bit of cleanup for the workflow names to hopefully make them look nice in every GH Action UI.
Result
We now get a feeling for our Swift 6 language mode compatibility.

Turns out we are not warnings clean on Swift 6 mode 🙃

@Lukasa I think we gotta live with this naming for now on the checks. If you could be so kind and update the branch protection rules hopefully one last time

Have you deliberately not added the repeated name to the integration tests @FranzBusch?

Have you deliberately not added the repeated name to the integration tests @FranzBusch?

Yeah. That's the only way to make this work sadly. Since the other workflows are reusable workflows and the integration tests are just a job of our PR workflow

Why aren't the integration tests reusable? We do have them in other NIO repos.

Why aren't the integration tests reusable? We do have them in other NIO repos.

Yes more repos have a script that executes the integration tests but those are not "standard" commands like swift test. So every repo has to configure its own matrix reusable workflow to call the appropriate script. I see little value in adding a reusable workflow that just calls ./scripts/run-integration-tests.sh. Furthermore, it is totally fine and expected that each repo has their own jobs. For example, the OpenAPI repo has a job to build all of their example packages.
Now coming back to the problem at hand here. The naming that GH is displaying for actions is just different in the different UIs.

On the PR: root workflow name / root job name / reusable workflow job name / unit tests job name / matrix job name
In other UI: root job name then a drop down matrix job name

Ok great, branch changes made.

@Lukasa Thanks. Feel free to approve then

authors: FranzBusch Lukasa

repo: apple/swift-nio


text:
Don't generate format: date as Foundation.Date, use a string

This comment from @yanniks made me check what type we generate for format: date (not date-time), and it's Foundation.Date. That's wrong, as Foundation.Date only represents a full timestamp (aka date-time in OpenAPI terms).
This is an oversight, we should just generate a simple string, as there isn't an obvious currency type to deserialize dates (without time) into.
Should be as simple as removing .date from here.

Hi Honza,
thanks for opening this issue! I agree that changing date values to a string is definitely a better solution than the current implementation, especially since the default ISO8601DateTranscoder is not able to decode OpenAPI date formats at all.
However, I would prefer some kind of predefined date object as the format (yyyy-MM-dd) is fixed. Otherwise, all developers will have to implement their own (de-) serialization, although the OpenAPI specification defines a concrete format.

@yanniks Our approach has been to use platform-specific types when they exist, and otherwise let developers solve it on their side. Unfortunately, I don't think there's a "date" (no time) type in the Swift standard library or Foundation, and I'd prefer we don't try to invent one, so keeping it as the string that arrives in JSON is the right call for now.
Parsing it as Date is a bug, it was never meant to be this way. A contribution with the fix is always welcome 🙂

@czechboy0 Okay, got it! I'll provide a PR that changes this behavior.
By the way: when talking about platform-specific types, is there a specific reason why UUIDs are not represented as Foundation.UUID objects?

Technically, format: uuid isn't part of the OpenAPI 3.0.3 specification, it's just a convention people use, like format: email. We haven't felt we needed to support it yet, for that reason, but I also believe that UUID is defined well enough that it'd be a reasonable thing to do.

repo: apple/swift-openapi-generator


text:
[5.9] Fix iOS buid

Looks like there's an iOS angle to the issue in #6414 as well which I hadn't noticed because I was accidentally building for macOS instead.
(cherry picked from commit 970f7929303cd491b8f1704e23b02ab15091c55a)

@swift-ci smoke test

authors: MaxDesiatov neonichu

repo: apple/swift-package-manager


text:
Lock Improvements for [SR-12851]

This PR contains the following improvements to locks needed for SR-12851.

Added ReadWriteLock.
Added property wrapper @ThreadLocal to address an issue where FileLock could be used in way that would unlock/lock the lock from another thread without the user realizing. --> Making FileLock thread safe
Enabled FileLock to obtain an exclusive or a shared lock.

Please do not merge this without testing on Windows, it will break the s-p-m build.  pthread_* functions are definitely not going to work on Windows.

I am trying to figure the windows thing out right know. I can replace the pthread stuff with GCD.

The tests I've added for FileLock don't seem to run under Windows even before my changes. I keep getting TSCBasic.FileSystemError.unknownOSError.

The property wrapper AutoClosing still feels a bit hacky. I am open for suggestions on wrapping a file descriptor and closing in on release. I need this for the thread local storage to properly close the file descriptor.

@swift-ci please test

@swift-ci please test

@compnerd Do we have any separate Windows CI for TSC right now?

@swift-ci please smoke test

The Swift project moved the default branch to main and deleted master branch, so GitHub automatically closed the PR. Please re-create pull request with main branch.
More detail about the branch update - https://forums.swift.org/t/updating-branch-names/40412

authors: TG908 compnerd neonichu shahmishal

repo: apple/swift-tools-support-core


text:
[SR-12125] String(decoding:from:) doesn't try withContiguousStorageIfAvailable

Previous ID
SR-12125

Radar
rdar://problem/59148099

Original Reporter
@weissi

Type
Bug

Attachment: Download

Environment
swift 5.1 and 5.2 branch

Additional Detail from JIRA

Votes
1

Component/s
Standard Library

Labels
Bug, Performance

Assignee
@milseman

Priority
Medium

md5: 4785e0cdc39c1c82c168b48e24fef33d

Issue Description:
String(decoding:from🙂 does sometimes make intermediate Array copies of the Collection that it receives. That makes sense because the collection might not be contiguous. If however the collection implements withContiguousStorageIfAvailable, then String(decoding:from🙂 should use this.
The attached program shows this (parts reproduced here):
struct MyCollection: Collection {
    let storage: [UInt8]
    typealias Element = UInt8
    typealias Index = Array<UInt8>.Index
    typealias SubSequence = Array<UInt8>.SubSequence
    typealias Indices = Array<UInt8>.Indices

    init(underlying: [UInt8]) {
        self.storage = underlying
    }

    public var indices: Indices {
        return self.storage.indices
    }
    public subscript(bounds: Range<Index>) -> SubSequence {
        return self.storage[bounds]
    }

    public subscript(position: Index) -> Element {
        return self.storage[position]
    }

    public var startIndex: Index {
        return self.storage.startIndex
    }

    public var endIndex: Index {
        return self.storage.endIndex
    }

    func index(after i: Index) -> Index {
        return self.storage.index(after: i)
    }

    func withContiguousStorageIfAvailable<R>(_ body: (UnsafeBufferPointer<UInt8>) throws -> R) rethrows -> R? {
        return try self.storage.withUnsafeBufferPointer(body)
    }
}

func makeString<Bytes: Collection>(_ bytes: Bytes) -> String where Bytes.Element == UInt8 {
    return String(decoding: bytes, as: Unicode.UTF8.self)
}

func testMyCollectionUnsafe(_ array: MyCollection) -> String {
    return array.withContiguousStorageIfAvailable {
        return makeString($0)
    }!
}

func testMyCollection(_ array: MyCollection) -> String {
    return makeString(array)
}

@inline(never)
func doMyCollectionUnsafe() {
    let array: [UInt8] = Array(repeating: UInt8(ascii: "X"), count: 15)
    let myCollection = MyCollection(underlying: array)

    for _ in 0..<10000 {
        precondition(testMyCollectionUnsafe(myCollection) == "XXXXXXXXXXXXXXX")
    }
}

@inline(never)
func doMyCollection() {
    let array: [UInt8] = Array(repeating: UInt8(ascii: "X"), count: 15)
    let myCollection = MyCollection(underlying: array)

    for _ in 0..<10000 {
        precondition(testMyCollection(myCollection) == "XXXXXXXXXXXXXXX")
    }
}

doMyCollection()
doMyCollectionUnsafe()

If we look at all allocations that happen more than once we see only
              libsystem_malloc.dylib`malloc
              libswiftCore.dylib`swift_slowAlloc+0x19
              libswiftCore.dylib`swift_allocObject+0x27
              test`specialized _ContiguousArrayBuffer.init(_uninitializedCount:minimumCapacity:)+0x39
              test`specialized Collection._copyToContiguousArray()+0x4f
              test`specialized makeString<A>(_:)+0x11a
              test`doMyCollection()+0xb2
              test`main+0x13
              libdyld.dylib`start+0x1
              test`0x1
            10000

so doMyCollection allocates 10,000 times but doMyCollectionUnsafe does not.
repro
swiftc -O test.swift && sudo ~/devel/swift-nio/dev/malloc-aggregation.d -c ./test

fixed.

repo: apple/swift


text:
@discardableResult is ignored in global actor context (Xcode 14 only)

A function annotated with a global actor ignores its @discardableResult attribute.
Consider the following:
@MainActor
struct UIStruct {
    @discardableResult
    func discardable() -> Int { 0 }
}

@MainActor
func uiFunction() {
    UIStruct().discardable()  // Warning: Result of call to function returning 'Int' is unused
}

In Xcode 13.4.1, this code compiles without warning. Xcode 14 beta 6 incorrectly warns that the result of the function is unused. In both versions of the compiler, removing @MainActor from the struct and function eliminates the warning.
Tested on macOS 12.5.1
Build setting Strict Concurrency Setting set to Minimal

Duplicated from https://github.com/apple/swift/issues/60276 and resolved by https://github.com/apple/swift/pull/60324
Closing this, thanks @seanmrich!

Sorry for the dupe. Thanks for the quick action!

authors: LucianoPAlmeida seanmrich


text:
Consistently Pass Parameter Flags

This massive pile of code causes the compiler to retain and consistently track parameter type flags through the various representation changes we make during the compilation process.  The idea is that we can rely on these bits instead of InOutType et al. and use them to propagate more structural invariants into lower phases instead of relying on its presence or absence.
This patch also continues the war against InOutType by reducing the usages of is<InOutType> and getAs<InOutType> where possible.  The blessed phase of compilation that should ultimately be able to utter InOutType::get is Sema - though I remain hopeful that we can eventually remove this entirely and just use the parameter bits.  is<InOutType> and getAs<InOutType> are also allowed in the AST Verifier until we can push the InOutType changes down as a proper structural invariant.  Everyone else should only speak about base types or ask Exprs and Decls for further information about inout-ness.
This patch is supposed to be NFC, but enforcing invariants necessitated changing a hack that altered a diagnostic (see test/expr/expressions.swift).

@swift-ci please test

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 201c9e33b41f25e018602fcbe6039e04d30f5533
Test requested by - @CodaFi

Naturally, the compiler crashers caught a leftover debugging assertion.  Hooray for unit testing.

Build failed
Jenkins build - Swift Test OS X Platform
Git Commit - 201c9e33b41f25e018602fcbe6039e04d30f5533
Test requested by - @CodaFi

@swift-ci please smoke test

@swift-ci please smoke test

@swift-ci please test

@swift-ci please test

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 201c9e33b41f25e018602fcbe6039e04d30f5533
Test requested by - @CodaFi

This patch is supposed to be NFC

What is NFC in this context?

NFC means 'No Functional Change'.

Ohhh, I see! Thank you :)

@felix91gr Just an FYI, we have a lexicon file where stuff like that is defined. The location is ./docs/Lexicon.rst.

Just an FYI, we have a lexicon file where stuff like that is defined. The location is ./docs/Lexicon.rst.

Yes, indeed. Thank you! 😊
(I wish Github rendered it properly 🤔. I’m usually browsing repos from iOS, and the rendering of RST isn’t complete in GH yet. I’ll take a full read when I’m back at my notebook ^^)

@felix91gr If you want to convert it to markdown... patches appreciated? = p

Oh. Say no more.
If it’s achievable with MD, I’ll do it!
Right now I’m busy (I’m on holiday ^^), but you can expect me to start on this by next week or so :)

@swift-ci please test

@swift-ci please test

@swift-ci Please smoke test

@swift-ci Please test source compatibility

@swift-ci Please test source compatibility

It would be great if you can rip out all the extraneous whitespace before merging as these tend to interfere with git blame.

Can do.

Also, I'm wondering if each commit builds and passes tests independently in the order they are applied.

Unfortunately, no.  I recommend we squash these changes upon merge.

Two UPasses in the compatibility suite.  // @lplarson

@swift-ci please smoke test

@swift-ci please smoke test

New assertion for the isInOut condition
assert((getKind() == DeclKind::Param) && "querying 'inout' on var decl?");

Is tripping.  Removing it for now.

@swift-ci please smoke test

@swift-ci please smoke test

Whitespace changes only now, then
⛵

@swift-ci please smoke test

@swift-ci please smoke test

authors: CodaFi felix91gr gottesmm rudkx swift-ci


text:
[swiftc (57 vs. 5592)] Add crasher in swift::Parser::parseStmtForEach(...)

Add test case for crash triggered in swift::Parser::parseStmtForEach(...).
Current number of unresolved compiler crashers: 57 (5592 resolved)
/cc @rintaro - just wanted to let you know that this crasher caused an assertion failure for the assertion StartOfControl != Tok.getLoc() added on 2017-08-01 by you in commit 546aeb23 :-)
Assertion failure in lib/Parse/ParseStmt.cpp (line 1839):
Assertion `StartOfControl != Tok.getLoc()' failed.

When executing: ParserResult<swift::Stmt> swift::Parser::parseStmtForEach(swift::LabeledStmtInfo)

Assertion context:
        skipSingle();
    }
    if (Tok.is(tok::code_complete))
      return makeParserCodeCompletionStatus();

    assert(StartOfControl != Tok.getLoc());
    SourceRange ControlRange(StartOfControl, PreviousLoc);
    Container = makeParserErrorResult(new (Context) ErrorExpr(ControlRange));
    diagnose(ForLoc, diag::c_style_for_stmt_removed)
      .highlight(ControlRange);
    Status = makeParserError();

Stack trace:
0 0x0000000003e86f24 PrintStackTraceSignalHandler(void*) (/path/to/swift/bin/swift+0x3e86f24)
1 0x0000000003e87266 SignalHandler(int) (/path/to/swift/bin/swift+0x3e87266)
2 0x00007f79f84f1390 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
3 0x00007f79f6a16428 gsignal /build/glibc-bfm8X4/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
4 0x00007f79f6a1802a abort /build/glibc-bfm8X4/glibc-2.23/stdlib/abort.c:91:0
5 0x00007f79f6a0ebd7 __assert_fail_base /build/glibc-bfm8X4/glibc-2.23/assert/assert.c:92:0
6 0x00007f79f6a0ec82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
7 0x0000000001576d12 swift::Parser::parseStmtForEach(swift::LabeledStmtInfo) (/path/to/swift/bin/swift+0x1576d12)
8 0x000000000157021a swift::Parser::parseStmt() (/path/to/swift/bin/swift+0x157021a)
9 0x000000000156f3b9 swift::Parser::parseExprOrStmt(swift::ASTNode&) (/path/to/swift/bin/swift+0x156f3b9)
10 0x0000000001571301 swift::Parser::parseBraceItems(llvm::SmallVectorImpl<swift::ASTNode>&, swift::BraceItemListKind, swift::BraceItemListKind) (/path/to/swift/bin/swift+0x1571301)
11 0x00000000015568f8 swift::Parser::parseExprClosure() (/path/to/swift/bin/swift+0x15568f8)
12 0x000000000154d893 swift::Parser::parseExprPostfix(swift::Diag<>, bool) (/path/to/swift/bin/swift+0x154d893)
13 0x000000000154c677 swift::Parser::parseExprSequenceElement(swift::Diag<>, bool) (/path/to/swift/bin/swift+0x154c677)
14 0x000000000154b6d6 swift::Parser::parseExprSequence(swift::Diag<>, bool, bool) (/path/to/swift/bin/swift+0x154b6d6)
15 0x000000000154b5b2 swift::Parser::parseExprImpl(swift::Diag<>, bool) (/path/to/swift/bin/swift+0x154b5b2)
16 0x000000000156f519 swift::Parser::parseExprOrStmt(swift::ASTNode&) (/path/to/swift/bin/swift+0x156f519)
17 0x0000000001571108 swift::Parser::parseBraceItems(llvm::SmallVectorImpl<swift::ASTNode>&, swift::BraceItemListKind, swift::BraceItemListKind) (/path/to/swift/bin/swift+0x1571108)
18 0x0000000001525a6e swift::Parser::parseTopLevel() (/path/to/swift/bin/swift+0x1525a6e)
19 0x00000000010c8aa2 swift::parseIntoSourceFile(swift::SourceFile&, unsigned int, bool*, swift::SILParserState*, swift::PersistentParserState*, swift::DelayedParsingCallbacks*) (/path/to/swift/bin/swift+0x10c8aa2)
20 0x0000000001045213 swift::CompilerInstance::performSema() (/path/to/swift/bin/swift+0x1045213)
21 0x00000000004bd856 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) (/path/to/swift/bin/swift+0x4bd856)
22 0x00000000004bc60e swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) (/path/to/swift/bin/swift+0x4bc60e)
23 0x0000000000474c54 main (/path/to/swift/bin/swift+0x474c54)
24 0x00007f79f6a01830 __libc_start_main /build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:325:0
25 0x0000000000472509 _start (/path/to/swift/bin/swift+0x472509)

@swift-ci please smoke test and merge

@swift-ci please test and merge


text:
[4.0] Fix the hang in the SILBuilder::addOpenedArchetypeOperands

The problem is that within SimplifyCFG we call this for an instruction within unreachable code. And within an unreachable block it can happen that defs do not dominate uses (because there is no dominance defined).
The fix is to prevent the infinite loop in addOpenedArchetypeOperands by marking visited instructions.
Fixes  rdar://problem/34602036

@swift-ci please test

lgtm!
Just one small thing: can you add the first paragraph of the commit message also as a source comment -  in a follow-up commit.
Otherwise it's really unclear why this loop can end up in an infinite loop.

@swift-ci please test

Build failed
Swift Test Linux Platform
Git Sha - acf644881720365fdd792635e1b65746804bdb01

@swift-ci please test

authors: eeckstein swift-ci swiftix


text:
Move enums into AttrKind.h.

This reorganization allows adding attributes that refer to types.
I need this for a @_specialize attribute with a type list.
It also simplifies many header includes.
PrintOptions.h and other headers depend on these enums. But Attr.h
defines a lot of classes that almost never need to be included.
@swift-ci Please smoke test

@swift-ci Please smoke test

nice, thanks for reducing the #includes too

authors: atrick lattner


text:
Make the naming of underlying builtin for FP + Vector match Integer.

For stdlib integer types, the builtin wrapped by the Swift type is named value and the init is ( _value: Builtin.xxx). This patch adopts the same scheme for stdlib floating point and SDK overlay vector types, and removes a legacy init for integers that was only needed to support them. There should be no changes visible outside of the stdlib.

@swift-ci Please smoke test.

@swift-ci Please smoke test.

@stephentyrone I'm going to revert this because it broke the source compat suite (not your fault, it's a constraint solver bug).
However what exposed the bug is the addition of new unlabeled initializers on numeric types. I think we want to avoid these because they make the type checker go exponential. Since builtin types are never public, we can change these initializers without breaking anyone.
Do you want to give them labels again on floats and integers?

As long as the initializers are not failable I don't think they're going to cause any problems. If all the overloads in an overload set return the same type we're able to split the constraint system which avoids the exponential behavior.
The problem we have with Int, Float, etc. is that around Swift 3.1 (?) timeframe we introduced unlabeled failable inits.

authors: rudkx slavapestov stephentyrone


text:
[4.2] Several fixes for de/re/-mangling of generic typealiases

Introduce several fixes for mangling and remangling of generic typealiases:

Mangle the generic arguments of a typealias type directly, rather than (incorrectly) mangling the generic arguments of the underlying nominal type, and also account for nested generic typealiases.
Remangle generic typealiases the same way we remangle generic nominal types
Aside: fix remangling of protocol references (we were missing substitutions)
Type reconstruction: guard against demangling the wrong # of generic arguments. This is a hack to avoid crashing; a more complete fix requires deeper changes to the type reconstruction logic.

Fixes rdar://problem/41444286

@swift-ci please test

@swift-ci please test source compatibility

Build failed
Swift Test Linux Platform
Git Sha - 632f62b5c12a4279779fd320b7335f5c2011ce0b

Ugh, forgot to add my local fixes.

@swift-ci please test

@swift-ci please test source compatibility

@swift-ci please test

@swift-ci please test source compatibility

I'm abandoning this; there are too many issues with generic type alias mangling to fix on the 4.2 branch at this time. I'll push a separate PR to disable these manglings, and pursue complete fixes only on master.

authors: DougGregor swift-ci


text:
[sil] Add a template parameter to TypeSubstCloner so that subclasses …

…can inject a SILFunctionBuilder composition class.
This works around a potential circular dependence issue where TypeSubstCloner
needs access to SILOptFunctionBuilder but is in libswiftSIL.
rdar://42301529

@swift-ci smoke test and merge

I think this didn't pick up a commit that I merged right before I kicked it off.

@swift-ci smoke test and merge

@swift-ci smoke test and merge

@swift-ci smoke test and merge

@swift-ci smoke test and merge

@swift-ci smoke test and merge


text:
[libSyntax] Lazily compute a node's text length

Instead of computing the text length of a RawSyntax node when it is created, only compute it when it is accessed. This gives us a small performance win when parsing a libSyntax tree.

@swift-ci Please smoke test

Test failure seems unrelated.
@swift-ci Please smoke test Linux platform

@swift-ci Please smoke test Linux platform