Skip to content

Conversation

@martinhaintz
Copy link

I tried building the sentry-javascript repo locally but had multiple dependency issues.
Therefore I created a devcontainer, which includes all needed dependencies.

In the Dockerfile are now also all needed dependencies shown.

As written in the contribution guide you only have to run yarn which installs the dependencies and with yarn build to start the build.

At the moment the docker image is built locally, but in the future, it can be built in the ci and provided by the GitHub container registry.

I tested it on my MacBook Air M1.

* develop:
  ref: Add external contributor to CHANGELOG.md (getsentry#13500)
  test: Avoid race conditions with symlinks (getsentry#13498)
  fix(node): Suppress tracing for transport request execution rather than transport creation (getsentry#13491)
  ci: Ensure cache save happens after install step (getsentry#13497)
  test: Increase timeout for redis-cache test & docker-compose (getsentry#13499)
  Fix config example in README.md for Nuxt (getsentry#13496)
@martinhaintz martinhaintz marked this pull request as ready for review August 28, 2024 14:25
@mydea
Copy link
Member

mydea commented Aug 28, 2024

What issues did you run into when running the repo locally? I think we'd rather address these issues, generally if you have volta set up there is nothing that should really be volatile when running it locally 🤔

@martinhaintz
Copy link
Author

I encountered multiple dependency conflicts and version mismatches on my M1 Mac. Due to the number of errors I saw, I knew, that installing a bunch of other dependencies and cluttering my system, spending multiple hours just to have a system which (in case of errors, nobody can reproduce) is not the best way to handle these problems.

Instead having a DevContainer offers a consistent, isolated environment that eliminates these issues entirely, ensuring a smooth setup regardless of the developer's local system. This approach also simplifies onboarding for new contributors—everything is pre-configured and ready to go.
In addition, you don't have to resolve GitHub issues whose root cause is either missing/mismatched local dependencies or other problems that are not related to the sentry javascript plugin.

@Lms24
Copy link
Member

Lms24 commented Dec 12, 2024

Hey, I'm going to close this PR as part of a general issue and PR cleanup initiative at Sentry. So far we haven't had requests for dev container setup and as far as I'm aware, you can use dev containers without having to add the config to the repo (one of our colleagues does just that). I get the argument why it makes sense and I'm happy to revisit this once there's more demand for it but for now we'll leave this to individual contributors (internal and external). Thank you nevertheless for contributing!

(Fwiw I also use an M1 macbook and things work generally well, though I'm painfully aware of the sheer size of our repo dependency hell)

@Lms24 Lms24 closed this Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants