Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gyp: update gyp to v0.9.1 #2402

Merged
merged 1 commit into from May 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion gyp/.github/workflows/release-please.yml
@@ -1,7 +1,7 @@
on:
push:
branches:
- master
- main
Copy link
Contributor

@cclauss cclauss May 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not a fan of master --> main but it is all the rage these daze...

  1. We need to document how contributors change their local forks.
  2. We need to document how contributors change the 29 open PRs.
  3. https://github.com/nodejs/node-gyp/blob/master/.github/workflows/release-please.yml#L6 must change.
  4. We need to document how this change effects the repo chain of gyp-next --> node-gyp --> node.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's in https://github.com/nodejs/gyp-next. The change to main branch has been made in nodejs/gyp-next#103 by @targos . It's out of scope for this repo :)

Copy link
Contributor

@DeeDeeG DeeDeeG May 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's out of scope for this repo :)

👍

If that topic does come up here, or elsewhere in the Node ecosystem, most of the documentation around that from GitHub is collected here: https://github.com/github/renaming/

(Using the GitHub.com UI to rename a branch from master to main will cause GitHub to seamlessly handle most of it behind the scenes, according to the bullet points at the bottom of that repo's README.md.)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every contributor needs to do this for 1. How do they do 2.?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. is done automatically by github when the branch is renamed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Contributor

@cclauss cclauss May 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The destination branches of all 29 pull requests are changed automatically?!?

Like commit into nodejs:master at the top of this page:

gengjiawen wants to merge 1 commit into nodejs:master from gengjiawen:feat/gyp_bump

Cool! Thanks.

Copy link
Contributor

@DeeDeeG DeeDeeG May 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is easier to understand the instructions for 1. with long flags rather than short flags... (And I added links to the git subcommand documentation)

$ git branch --move OLD-BRANCH-NAME NEW-BRANCH-NAME
$ git fetch origin
$ git branch --set-upstream-to=origin/NEW-BRANCH-NAME NEW-BRANCH-NAME
$ git remote set-head origin --auto


name: release-please
jobs:
Expand Down
20 changes: 20 additions & 0 deletions gyp/CHANGELOG.md
@@ -1,5 +1,25 @@
# Changelog

### [0.9.1](https://www.github.com/nodejs/gyp-next/compare/v0.9.0...v0.9.1) (2021-05-14)


### Bug Fixes

* py lint ([3b6a8ee](https://www.github.com/nodejs/gyp-next/commit/3b6a8ee7a66193a8a6867eba9e1d2b70bdf04402))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://www.pylint.org is not something that we use (because we use flake8 instead) so this comment might confuse some readers but we should push forward with this release.


## [0.9.0](https://www.github.com/nodejs/gyp-next/compare/v0.8.1...v0.9.0) (2021-05-13)


### Features

* use LDFLAGS_host for host toolset ([#98](https://www.github.com/nodejs/gyp-next/issues/98)) ([bea5c7b](https://www.github.com/nodejs/gyp-next/commit/bea5c7bd67d6ad32acbdce79767a5481c70675a2))


### Bug Fixes

* msvs.py: remove overindentation ([#102](https://www.github.com/nodejs/gyp-next/issues/102)) ([3f83e99](https://www.github.com/nodejs/gyp-next/commit/3f83e99056d004d9579ceb786e06b624ddc36529))
* update gyp.el to change case to cl-case ([#93](https://www.github.com/nodejs/gyp-next/issues/93)) ([13d5b66](https://www.github.com/nodejs/gyp-next/commit/13d5b66aab35985af9c2fb1174fdc6e1c1407ecc))

### [0.8.1](https://www.github.com/nodejs/gyp-next/compare/v0.8.0...v0.8.1) (2021-02-18)


Expand Down
4 changes: 2 additions & 2 deletions gyp/CODE_OF_CONDUCT.md
@@ -1,4 +1,4 @@
# Code of Conduct

* [Node.js Code of Conduct](https://github.com/nodejs/admin/blob/master/CODE_OF_CONDUCT.md)
* [Node.js Moderation Policy](https://github.com/nodejs/admin/blob/master/Moderation-Policy.md)
* [Node.js Code of Conduct](https://github.com/nodejs/admin/blob/HEAD/CODE_OF_CONDUCT.md)
* [Node.js Moderation Policy](https://github.com/nodejs/admin/blob/HEAD/Moderation-Policy.md)
2 changes: 1 addition & 1 deletion gyp/CONTRIBUTING.md
Expand Up @@ -2,7 +2,7 @@

## Code of Conduct

This project is bound to the [Node.js Code of Conduct](https://github.com/nodejs/admin/blob/master/CODE_OF_CONDUCT.md).
This project is bound to the [Node.js Code of Conduct](https://github.com/nodejs/admin/blob/HEAD/CODE_OF_CONDUCT.md).

<a id="developers-certificate-of-origin"></a>
## Developer's Certificate of Origin 1.1
Expand Down
2 changes: 1 addition & 1 deletion gyp/pylib/gyp/generator/make.py
Expand Up @@ -319,7 +319,7 @@ def CalculateGeneratorInputInfo(params):
CXX.host ?= %(CXX.host)s
CXXFLAGS.host ?= $(CPPFLAGS_host) $(CXXFLAGS_host)
LINK.host ?= %(LINK.host)s
LDFLAGS.host ?=
LDFLAGS.host ?= $(LDFLAGS_host)
AR.host ?= %(AR.host)s

# Define a dir function that can handle spaces.
Expand Down
6 changes: 5 additions & 1 deletion gyp/pylib/gyp/generator/ninja.py
Expand Up @@ -1417,7 +1417,11 @@ def WriteLinkForArch(
is_executable = spec["type"] == "executable"
# The ldflags config key is not used on mac or win. On those platforms
# linker flags are set via xcode_settings and msvs_settings, respectively.
env_ldflags = os.environ.get("LDFLAGS", "").split()
if self.toolset == "target":
env_ldflags = os.environ.get("LDFLAGS", "").split()
elif self.toolset == "host":
env_ldflags = os.environ.get("LDFLAGS_host", "").split()

if self.flavor == "mac":
ldflags = self.xcode_settings.GetLdflags(
config_name,
Expand Down
19 changes: 11 additions & 8 deletions gyp/pylib/gyp/xcodeproj_file.py
Expand Up @@ -138,7 +138,9 @@
"""

import gyp.common
from functools import cmp_to_key
import hashlib
from operator import attrgetter
import posixpath
import re
import struct
Expand Down Expand Up @@ -423,6 +425,8 @@ def _HashUpdate(hash, data):
"""

hash.update(struct.pack(">i", len(data)))
if isinstance(data, str):
data = data.encode("utf-8")
hash.update(data)

if seed_hash is None:
Expand Down Expand Up @@ -1483,7 +1487,7 @@ def TakeOverOnlyChild(self, recurse=False):

def SortGroup(self):
self._properties["children"] = sorted(
self._properties["children"], cmp=lambda x, y: x.Compare(y)
self._properties["children"], key=cmp_to_key(lambda x, y: x.Compare(y))
)

# Recurse.
Expand Down Expand Up @@ -2891,7 +2895,7 @@ def SortGroups(self):
# according to their defined order.
self._properties["mainGroup"]._properties["children"] = sorted(
self._properties["mainGroup"]._properties["children"],
cmp=lambda x, y: x.CompareRootGroup(y),
key=cmp_to_key(lambda x, y: x.CompareRootGroup(y)),
)

# Sort everything else by putting group before files, and going
Expand Down Expand Up @@ -2986,9 +2990,7 @@ def AddOrGetProjectReference(self, other_pbxproject):
# Xcode seems to sort this list case-insensitively
self._properties["projectReferences"] = sorted(
self._properties["projectReferences"],
cmp=lambda x, y: cmp(
x["ProjectRef"].Name().lower(), y["ProjectRef"].Name().lower()
),
key=lambda x: x["ProjectRef"].Name().lower
)
else:
# The link already exists. Pull out the relevnt data.
Expand Down Expand Up @@ -3120,7 +3122,8 @@ def CompareProducts(x, y, remote_products):
product_group = ref_dict["ProductGroup"]
product_group._properties["children"] = sorted(
product_group._properties["children"],
cmp=lambda x, y, rp=remote_products: CompareProducts(x, y, rp),
key=cmp_to_key(
lambda x, y, rp=remote_products: CompareProducts(x, y, rp)),
)


Expand Down Expand Up @@ -3155,7 +3158,7 @@ def Print(self, file=sys.stdout):
else:
self._XCPrint(file, 0, "{\n")
for property, value in sorted(
self._properties.items(), cmp=lambda x, y: cmp(x, y)
self._properties.items()
):
if property == "objects":
self._PrintObjects(file)
Expand Down Expand Up @@ -3183,7 +3186,7 @@ def _PrintObjects(self, file):
self._XCPrint(file, 0, "\n")
self._XCPrint(file, 0, "/* Begin " + class_name + " section */\n")
for object in sorted(
objects_by_class[class_name], cmp=lambda x, y: cmp(x.id, y.id)
objects_by_class[class_name], key=attrgetter("id")
):
object.Print(file)
self._XCPrint(file, 0, "/* End " + class_name + " section */\n")
Expand Down
2 changes: 1 addition & 1 deletion gyp/setup.py
Expand Up @@ -15,7 +15,7 @@

setup(
name="gyp-next",
version="0.8.1",
version="0.9.1",
description="A fork of the GYP build system for use in the Node.js projects",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down
2 changes: 1 addition & 1 deletion gyp/tools/emacs/gyp-tests.el
Expand Up @@ -30,7 +30,7 @@
"For the purposes of face comparison, we're not interested in the
differences between certain faces. For example, the difference between
font-lock-comment-delimiter and font-lock-comment-face."
(case face
(cl-case face
((font-lock-comment-delimiter-face) font-lock-comment-face)
(t face)))

Expand Down
2 changes: 1 addition & 1 deletion gyp/tools/emacs/gyp.el
Expand Up @@ -213,7 +213,7 @@
string-start)
(setq string-start (gyp-parse-to limit))
(if string-start
(setq group (case (gyp-section-at-point)
(setq group (cl-case (gyp-section-at-point)
('dependencies 1)
('variables 2)
('conditions 2)
Expand Down