{"id":13450878,"url":"https://github.com/sconover/rules_intellij_generate","last_synced_at":"2025-03-23T16:32:33.377Z","repository":{"id":26468324,"uuid":"107368446","full_name":"sconover/rules_intellij_generate","owner":"sconover","description":"[alpha] plugin-less bazel/intellij integration","archived":false,"fork":false,"pushed_at":"2023-01-07T02:43:52.000Z","size":327,"stargazers_count":14,"open_issues_count":4,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-07-31T07:15:50.658Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sconover.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-18T06:38:59.000Z","updated_at":"2023-10-23T05:14:12.000Z","dependencies_parsed_at":"2023-01-14T04:43:19.546Z","dependency_job_id":null,"html_url":"https://github.com/sconover/rules_intellij_generate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sconover%2Frules_intellij_generate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sconover%2Frules_intellij_generate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sconover%2Frules_intellij_generate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sconover%2Frules_intellij_generate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sconover","download_url":"https://codeload.github.com/sconover/rules_intellij_generate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221856496,"owners_count":16892452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T07:00:39.687Z","updated_at":"2024-10-28T16:32:05.719Z","avatar_url":"https://github.com/sconover.png","language":"Python","funding_links":[],"categories":["Tooling"],"sub_categories":["Editors"],"readme":"# rules_intellij_generate\n\nAlpha: rule definitions and behavior may change on short notice.\n\nExamines your bazel build and generates a complete set of Intellij project configuration files. This is an alternative \napproach vs [bazelbuild/intellij](https://github.com/bazelbuild/intellij), and akin to the old\n[pants/idea](https://github.com/pantsbuild/pants/blob/d30cca1e0ecb9cc0e1b7e2cd0ff6e7e077e62a52/src/python/pants/backend/project_info/tasks/idea_gen.py) integration.\n\n- _`**/*.iml`_: Intellij module files are based on iml templates under your control, to which this rule adds module and \njar dependency entries based on examination of your bazel build target relationships.\n- _`.idea/modules.xml`_: Automatically creates the Intellij file used to identify all modules in your project.\n- _`.idea/workspace.xml`_: “component” entries you define will be placed in your workspace.xml file.\n- _`.idea/**/*.xml`_: Intellij project-level files, such as run configurations and source formatting rules, may be \ncommitted to your repo and will be placed under the .idea directory, meaning these may be easily shared across a team.\n\n## Example usage\n\nThis repo is split into the [core rules](rules), and a [series of scenarios](scenarios) meant to show how the rules may be typically \napplied, that also form the basis of the [scenario tests](scenarios/scenario_tests/pytest). There is a README in the \nroot of each scenario with a brief description of its purpose.\n\n## Background and Motivation\n\nbazel/intellij originates from Google’s internal approach to Intellij integration. It’s based on a plug-in that puts \nbazel operations at the center of how the IDE does its work.\n\nMany people use this plugin happily and successfully, but its bazel-first philosophy is not without its problems, \nvery well-expressed in \n[this github issue (recommended reading)](https://github.com/bazelbuild/intellij/issues/179#issuecomment-350295025). \nBazel/intellij maintainers state that exploitation\n of Intellij’s module system is a non-goal, whereas for this project it’s a key goal.\n\nThe rules_intellij_generate philosophy sees bazel and Intellij as equal partners interacting at arm’s length. It \nwillingly countenances small compromises away from “bazel purity” so that (for example) the IDE’s code modularity \nfeatures are useful in development. Intellij should work for teams that also use bazel, in the most efficient and \nfully-realized manner as possible.\n\n## Features\n\n- Uses bazel project configuration to generate an intellij project during the bazel build run\n- Maps bazel packages to Intellij modules\n- Maps bazel-specified jar dependencies to Intellij module jar library dependencies\n- Integration point is plain old Intellij config files - there’s no Intellij plugin\n- Express any Intellij module configuration/settings via an entry in iml-types.xml \n([example](scenarios/iml_types.xml))\n- Support for distribution, from files in your workspace, of project-level Intellij xml config \n([example](scenarios/intellij_project_files))\n- Reference to bazel build output locations in Intellij configuration possible via template variables\n\n## Usage\n\nOnce `intellij_module` targets are defined, and an `intellij_project` target exists, run the `intellij_project`\ntarget: this generates the intellij configuration files archive for your project, in sandboxed form. You will need\nto run the `install_intellij_files_script`, found under `bazel-bin`, in order for these files to be installed\nin your workspace.\n\nYou may want to try this out using the scenarios. Once installed, any scenario should be loadable into Intellij,\nby opening up its directory in the IDE as a new project.\n\n## Python\n\nThis project has a dependency on python. For now please make sure you have a python 3 interpreter that's findable \nby the core-bazel [default toolchain support for python](https://github.com/bazelbuild/rules_python/blob/master/proposals/2019-02-12-design-for-a-python-toolchain.md#default-toolchain).\n\nIf you are using pyenv, install a modern 3.X interpreter, and make it findable by the bazel/python default\ntoolchain support using:\n\n```\npyenv global 3.7.0\n```\n\nWhere \"3.7.0\" is the version of your python 3 interpreter.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsconover%2Frules_intellij_generate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsconover%2Frules_intellij_generate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsconover%2Frules_intellij_generate/lists"}