8000 [Monorepo] init by TomasVotruba · Pull Request #609 · deprecated-packages/symplify · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Dec 3, 2023. It is now read-only.

[Monorepo] init #609

Merged
merged 16 commits into from
Jan 29, 2018
Merged

[Monorepo] init #609

merged 16 commits into from
Jan 29, 2018

Conversation

TomasVotruba
Copy link
Member

No description provided.

@TomasVotruba
Copy link
Member Author
TomasVotruba commented Jan 28, 2018

@muglug Could I ask you for help with this? I have no idea how to disable it
https://travis-ci.org/Symplify/Symplify/jobs/334411891

The interface is just semideprecated - method is missing so not usable yet

@muglug
Copy link
Contributor
muglug commented Jan 28, 2018

Add <DeprecatedInterface errorLevel="info" /> to the <issueHandlers> section

@TomasVotruba
Copy link
Member Author

Thank you
And the second issue? It passed before and it should be fine

@TomasVotruba
Copy link
Member Author

Can I ignore just one file for specific rule? I'd like to keep it up for the rest of code

@muglug
Copy link
Contributor
muglug commented Jan 28, 2018

To exclude a given file, you can do

<SomeIssueName>
  <errorLevel="info">
    <file name="path/to/file.php" />
  </errorLevel>
</SomeIssueName>

You can also suppress in the file itself with @psalm-suppress SomeIssueName either at the function level or at the statement level.

@TomasVotruba
Copy link
Member Author
TomasVotruba commented Jan 29, 2018

@muglug Thank you, took a while to figure out typo, but I inspired in other ignored files in the file 👍

<InvalidArgument>
    <errorLevel type="info">
        <file name="packages/EasyCodingStandard/src/DependencyInjection/Extension/CheckersExtension.php" />
    </errorLevel>
</InvalidArgument>

@TomasVotruba TomasVotruba merged commit f579fec into master Jan 29, 2018
@TomasVotruba TomasVotruba deleted the monorepo branch January 29, 2018 09:59
@TomasVotruba
Copy link
Member Author

@carusogabriel Could I ask you for review?

@vitek-rostislav I'm merging this now, to prapare and test subsplit package, but review is still welcomed 👍

Copy link
Contributor
@carusogabriel carusogabriel left a comment

Choose a reason for hiding this comment

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

👍 to me

@TomasVotruba
Copy link
Member Author

@carusogabriel Thanks

Copy link
Contributor
@vitek-rostislav vitek-rostislav left a comment

Choose a reason for hiding this comment

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

Hi, I have added few minor comments and questions :)

@@ -0,0 +1,3 @@
parameters:
build:
'git@github.com:shopsys/product-feed-zbozi.git': 'packages/ProductFeedZbozi'
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it ok to use "live" repository instead of "testing one"? (eg. git@github.com:shopsys/product-feed-zbozi-copy.git)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, this is read only operation. Fetch only

@@ -0,0 +1,46 @@
# Monorepo - Build and Maintain Monorepo like a Boss
Copy link
Contributor

Choose a reason for hiding this comment

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

When reading the file, it is quite unclear to me, why I should create extra project for creating the desired monorepo

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried to rephrase and make the 2 directory issue more clear


## Usage

### 3 Steps to Build Monolitic Repository from Many Repositories
Copy link
Contributor

Choose a reason for hiding this comment

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

The correct term is "Monolithic" :) it misspelled few times across the project

'git@github.com:shopsys/product-feed-heureka.git': 'packages/ProductFeedHeureka'
```

2. Prepare empty directory where, do you want to create your monorepo, e.g. `new-monorepo`. It should be outside current working directory.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think better formulation is "...empty directory where you want to create..." but I am not a native speaker :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed. There was ", do" extra

},
"autoload": {
"psr-4": {
"Symplify\\Monoraper\\": "src"
Copy link
Contributor

Choose a reason for hiding this comment

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

should be Symplify\Monorepo\

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed in following PR. Thanks

*
* Empty directories will remain
*/
public function prependHistoryToNewPackageFiles(
Copy link
Contributor

Choose a reason for hiding this comment

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

again, the name of the method does not reflect its behaviour.

Copy link
Member Author

Choose a reason for hiding this comment

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

How would you name it?

{
public function mergeRepositoryToMonorepoDirectory(string $gitRepository, GitWorkingCopy $gitWorkingCopy): void
{
$remoteName = md5($gitRepository);
Copy link
Contributor

Choose a reason for hiding this comment

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

why?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's actually debug code, since naming remote the same way the repository failed in certain time in development.

Might not be needed anymore, I'll investigate

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, it's still needed. So I've created a special method for that with clear name

# author: https://github.com/emiller
# source: https://gist.github.com/emiller/6769886

## Todo
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this mean that following 2 points are not implemented yet?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is outdated, will be removed in following PR

#
# git-rewrite-history [-d/--dry-run] [-v/--verbose] <srcname>=<destname> <...> <...>
#
# After the repsitory is re-written, eyeball it, commit and push up.
Copy link
Contributor

Choose a reason for hiding this comment

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

typo, repsitory :)

$containerBuilder,
Application::class,
Command::class,
'add'
Copy link
Contributor

Choose a reason for hiding this comment

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

where this come from?

Copy link
Member Author
@TomasVotruba TomasVotruba Jan 30, 2018

Choose a reason for hiding this comment

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

This is method call to add commands. Basicall this does following:

$commands = $this->container->getAllByType(Command::class);
foreach ($commands as $command) {
    $application->add($command);
}

Here is README for the feature.

This aallows extendability over autoconfigure + !tagged approach, which is only local per config. See more in Symfony issue where I explain in more detail.

@TomasVotruba
Copy link
Member Author

Follow up in #613

@TomasVotruba TomasVotruba mentioned this pull request May 27, 2018
5 tasks
@deprecated-packages deprecated-packages locked as resolved and limited conversation to collaborators Oct 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0