You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "mertdotcc (via GitHub)" <gi...@apache.org> on 2023/03/28 05:42:20 UTC

[GitHub] [camel-k] mertdotcc opened a new issue, #4175: Makefile not working on Mac

mertdotcc opened a new issue, #4175:
URL: https://github.com/apache/camel-k/issues/4175

   I am working on [#4146](https://github.com/apache/camel-k/issues/4146) and when I run `make generate` to build my CRDs and all other auto-generated files, I get the following output:
   ```
   go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.6.1
   Installing k8s.io/code-generator tools with version v0.25.6
   #go install k8s.io/code-generator/cmd/applyconfiguration-gen@v0.25.6
   go install github.com/astefanutti/code-generator/cmd/applyconfiguration-gen@pr-144-install
   go install k8s.io/code-generator/cmd/client-gen@v0.25.6
   go install k8s.io/code-generator/cmd/lister-gen@v0.25.6
   go install k8s.io/code-generator/cmd/informer-gen@v0.25.6
   ./script/gen_client.sh
   Generating Go client code...
   ./script/gen_crd.sh
   sed: 1: "/creationTimestamp:/a\  ...": extra characters after \ at the end of a command
   make: *** [generate] Error 1
   ```
   
   When I look at the auto-generated files, I notice this:
   <img width="1485" alt="image" src="https://user-images.githubusercontent.com/41954671/228136974-1b8579c6-e53d-4e45-92ee-a4018459b3bf.png">
   - It doesn't include the comments regarding the license
   - It adds the unnecessary `---`
   - `creationTimestamp` colored-out, not sure what that means
   - `labels` not included
   
   I change the following code in `gen_crd.sh`
   ```
     sed -n '/^---/,/^status/p;/^status/q' "${source}.orig" \
       | sed '1d;$d' \
       | sed '/creationTimestamp:/a\  labels:\n    app: camel-k' >> "$source"
   ```
   to the following one-liner:
   ```
   sed -n '/^---/,/^status/p;/^status/q' "${source}.orig" '1d;$d' '/creationTimestamp:/a\ labels:\n app: camel-k' >> "$source"
   ```
   
   Which helps with the issue I face when running `make generate`. The output with the one-liner change:
   ```
   go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.6.1
   Installing k8s.io/code-generator tools with version v0.25.6
   #go install k8s.io/code-generator/cmd/applyconfiguration-gen@v0.25.6
   go install github.com/astefanutti/code-generator/cmd/applyconfiguration-gen@pr-144-install
   go install k8s.io/code-generator/cmd/client-gen@v0.25.6
   go install k8s.io/code-generator/cmd/lister-gen@v0.25.6
   go install k8s.io/code-generator/cmd/informer-gen@v0.25.6
   ./script/gen_client.sh
   Generating Go client code...
   ./script/gen_crd.sh
   ./script/gen_doc.sh
   Generating API documentation...
   Generating CRD API documentation...
   I0328 07:35:37.555490   33758 main.go:136] parsing go packages in directory github.com/apache/camel-k/v2/pkg/apis/camel/v1
   I0328 07:35:39.506643   33758 main.go:240] using package=github.com/apache/camel-k/v2/pkg/apis/camel/v1
   I0328 07:35:39.506666   33758 main.go:240] using package=github.com/apache/camel-k/v2/pkg/apis/camel/v1/trait
   W0328 07:35:39.525619   33758 main.go:469] not found external link source for type encoding/xml.Name
   I0328 07:35:39.529658   33758 main.go:176] written to ./script/gen_crd/../../docs/modules/ROOT/partials/apis/camel-k-crds.adoc
   I0328 07:35:40.300064   33850 main.go:136] parsing go packages in directory github.com/apache/camel-k/v2/pkg/apis/camel/v1alpha1
   I0328 07:35:42.243031   33850 main.go:240] using package=github.com/apache/camel-k/v2/pkg/apis/camel/v1alpha1
   W0328 07:35:42.255036   33850 main.go:469] not found external link source for type encoding/json.Number
   W0328 07:35:42.255111   33850 main.go:469] not found external link source for type encoding/json.Number
   W0328 07:35:42.255200   33850 main.go:469] not found external link source for type encoding/json.Number
   W0328 07:35:42.255542   33850 main.go:469] not found external link source for type github.com/apache/camel-k/v2/pkg/apis/camel/v1.PodCondition
   W0328 07:35:42.255616   33850 main.go:469] not found external link source for type github.com/apache/camel-k/v2/pkg/apis/camel/v1.IntegrationSpec
   W0328 07:35:42.256015   33850 main.go:469] not found external link source for type github.com/apache/camel-k/v2/pkg/apis/camel/v1.SourceSpec
   I0328 07:35:42.256471   33850 main.go:176] written to ./script/gen_crd/../../docs/modules/ROOT/partials/apis/kamelets-crds.adoc
   Generating CRD API documentation... Done.
   Generating API documentation... done!
   Generating traits documentation...
   Generating traits documentation... done!
   cd pkg/apis/camel && /Users/mert/go/bin/controller-gen paths="./..." object
   cd addons/keda/duck && /Users/mert/go/bin/controller-gen paths="./..." object
   cd addons/strimzi/duck && /Users/mert/go/bin/controller-gen paths="./..." object
   ./script/gen_client_strimzi.sh
   Generating Go client code for Strimzi addon...
   ```
   
   So it seems to work. No errors at least. But when I look at the auto-generated files, they are still not 100% correctly generated.
   <img width="1480" alt="image" src="https://user-images.githubusercontent.com/41954671/228138920-619e1a74-a484-42d4-93c5-f7dd461eab59.png">
   Still, the `labels` is missing.
   
   Any idea why? Any Mac users who are able to run the Makefile scripts with no issues? If so, did you do any Mac-specific configurations?
   
   Many thanks in advance!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] mertdotcc closed issue #4175: Makefile not working on Mac

Posted by "mertdotcc (via GitHub)" <gi...@apache.org>.
mertdotcc closed issue #4175: Makefile not working on Mac
URL: https://github.com/apache/camel-k/issues/4175


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] essobedo commented on issue #4175: Makefile not working on Mac

Posted by "essobedo (via GitHub)" <gi...@apache.org>.
essobedo commented on issue #4175:
URL: https://github.com/apache/camel-k/issues/4175#issuecomment-1486309282

   You need to ensure that `gnu-sed` is used, please read the note in the requirements section https://camel.apache.org/camel-k/next/contributing/developers.html#requirements


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel-k] mertdotcc commented on issue #4175: Makefile not working on Mac

Posted by "mertdotcc (via GitHub)" <gi...@apache.org>.
mertdotcc commented on issue #4175:
URL: https://github.com/apache/camel-k/issues/4175#issuecomment-1487057808

   Alright, I missed that specific note for MacOS users in the documentation. Followed those steps and it solved my issue. Thanks @essobedo!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org